View Full Version : Howto use partition labels and in /etc/fstab?

14th April 2007, 07:47 PM
I deleted some partitions on the hard disk and the partition names of those above it changed.
I have also noticed that in /etc/fstab some of the entries have a LABEL entry in them.

Is there a way of labelling partitions so that some referenced partitions in /etc/fstab don't have to be edited if some partitions are moved or reordered?


14th April 2007, 10:35 PM
You can label linux partitions with e2label.
For example: e2label /dev/hdb2 /

Labeling swap partitions is a little bit different...
For example:
swapoff -a
mkswap -c -v1 -L SWAP-hda3 /dev/hda3
mkswap -c -v1 -L SWAP-hdb3 /dev/hdb3
swapon -a