Issue:
How do I change the label of a swap partition in Red Hat Enterprise Linux version 4?
Resolution:
It is possible to change the label of a SWAP partition by using the
mkswap command with the
'-L' option.
The command is:
mkswap -L [label] [partition]
Replace <label> with the label you would like to use. Replace the partition with the SWAP partition. If following is the output of
fdisk -l,
Quote:
Disk /dev/hda: 40.0 GB, 40016019456 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 33 265041 83 Linux
/dev/hda2 34 294 2096482+ 83 Linux
/dev/hda3 295 425 1052257+ 82 Linux swap
/dev/hda4 426 4865 35664300 5 Extended
/dev/hda5 426 2383 15727603+ 83 Linux
/dev/hda6 2384 2644 2096451 83 Linux
/dev/hda7 2645 2775 1052226 83 Linux
|
then [partition] would be replaced with
/dev/hda3.
Once the SWAP partition has been labeled, remember to change the
/etc/fstab to reflect the new label.
------------------------
Best Regards,
eUKShane
http://www.eukhost.com