E2label

From LQWiki
Jump to navigation Jump to search

Is a program used to read and/or place disk labels on partitions. You can then refer to the label instead of the device.

eg before:

> % cat /etc/fstab
> /dev/sda1        /       ext3    defaults   1 1
> /dev/sdb1        swap    swap    defaults   0 0
> % e2label /dev/sda1 /
> % e2label /dev/sdb1 SWAP

Once the labels have been applied, you can then refer to those labels when mounting them.

eg after:

> % cat /etc/fstab
> LABEL=/          /       ext3    defaults   1 1
> LABEL=SWAP       swap    swap    defaults   0 0
> % e2label /dev/sda1
> /