How to set the UUID on a swap partition?

Charles Curley charlescurley at
Wed Nov 7 16:07:50 MST 2007

On Mon, Nov 05, 2007 at 08:02:52PM -0700, Charles Curley wrote:
> How does one set the UUID of a swap partition to a given value?

> I have a kludge: put an e2fs file system on the partition, assign the
> UUID, then run mkswap on it. It's ugly, but it gets you there. Is
> there a better way to do this?

Actually, that doesn't even work. mkswap always assigns a new UUID
even if there is already a valid one. Grumble.

Yes, I can edit /etc/fstab. And there are other places to edit as
well. My problem is tied in with this bug: There
is a workaround at

Not good.


Charles Curley                  /"\    ASCII Ribbon Campaign
Looking for fine software       \ /    Respect for open standards
and/or writing?                  X     No HTML/RTF in email    / \    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: Digital signature
Url : 

More information about the PLUG mailing list