How do I find out the label of a swap partition?

Charles Curley charlescurley at charlescurley.com
Mon Aug 15 02:49:43 UTC 2005


How do I find out the label of a swap partition?

I'm working on bare metal recovery
(http://www.tldp.org/HOWTO/Linux-Complete-Backup-and-Recovery-HOWTO/index.html). Now
that Fedora uses labels to identify swap partitions as well as file
system partitions, I need to learn what the swap partition label is so
that the bare metal recovery scripts can properly make the swap
partitions.

I can learn the labels of the file system partitions with mount -l,
but that does not help with swap partitions.

I could parse /etc/fstab, but that may not be accurate, e.g. I changed
my fstab to use the device name for swap, but there is a label on the
partition. Also, with the current problem of garbage labels for the
swap partitions, it is hazardous anyway.

-- 

Charles Curley                  /"\    ASCII Ribbon Campaign
Looking for fine software       \ /    Respect for open standards
and/or writing?                  X     No HTML/RTF in email
http://www.charlescurley.com    / \    No M$ Word docs in email

Key fingerprint = CE5C 6645 A45A 64E4 94C0  809C FFF6 4C48 4ECD DFDB
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20050814/7dd62574/attachment-0001.sig>


More information about the fedora-list mailing list