You are not logged in.
Pages: 1
Topic closed
Hi everyone,
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
fails.
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)
Offline
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.
Offline
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.
Offline
Please mark your thread [solved] by editing your original post and tagging the subject line. Thanks!
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
Doing it right now.
Sorry!
Offline
Thank you, exactly my issue. Created an account to say thank you! ;-)
Offline
Great, but please don't bump 10 year old threads. Closing.
Online
Pages: 1
Topic closed