I am new to Archlinux, and after trying many distros it seems to be the exact flavor I was looking for.
This is much more of a curiosity than an issue.
I installed Arch on a laptop so I need swap to enable the suspend to disk feature. I created a swap file according to the (excellent) wiki.
I noticed that if I put the UUID issued by mkswap in fstab unstead of /swapfile (which, I admit, is not what the wiki says) the system wont startup.
So I tried the method given here. But:
# mkswap -U random /swapfile
It is also noticeable that lsblk -f does not see the swap file once created (and I guess it may be linked to the fact that system startup fails?).
Putting /swapfile in fstab (as the wiki says) works fine, but we poor sinners are told here that we shall use UUIDs in fstab. In this case I think the confusion between file systems not loaded in the same order and therefore changing name in /dev is not an issue as the swap filename is unique.
So my question is: what is the UUID returned by mkswap for? is it useful in some way?
Last edited by TheFlyingFrenchman (2013-02-24 13:54:13)
Using UUID or LABEL in fstab will only work for partitions; I don't see how it could work for a file.
mkswap treats the swap file the same way as if it were a partition. You can't, however, use its UUID in any meaningful way.
UUIDs and LABELs are useful because the kernel assigns driver letters in a non-predictable way. The problem they solve doesn't exist with files formatted as swap or some other filesystem; you can refer to these by path.
Ok that was my impression somehow, but I hadn't found it explicitly in any of the wiki or man pages.
I am sure now.
Thank's for the quick and precise answer.
Please mark your thread [solved] by editing your original post and tagging the subject line. Thanks!
Doing it right now.