Ask Your Question

Revision history [back]

It annoys me people always feel the need to question the question instead of trying to help. There are many situations where you want to avoid using UUIDs. Installing from an image is one example, and of course there is always someone pointing out that kickstart "is better". It is not. Not for every circumstance anyway.

I use a system myself where machines are booted with PXE, then partitioned, then mkfs, and populated with rsync from a master image, and finally booted via kexec. In subsequent boots, the partitioning and mkfs steps are skipped, but not the PXE boot, rsync and kexec. This way you can quickly boot up new machines, virtual machines or real ones. The image machine is a life virtual machine, which can be cloned and versioned.

Obviously I want to avoid UUIDs in several places: In the fstab, in grub.cfg, and in the initramfs. All of these will be incorrect for the to be installed system, because the UUIDs come from the image machine. It gets harder and harder for each new fedora or ubuntu version to work around them, because the distro makers seem of the opinion that everyone should always use UUIDs. It is just crap. What about the person who wants to replace a harddrive for a bigger one, or simply because it was broken? You can clone your system but it will just be unbootable because of the UUID issue. You need to know how to reconfigure your grub.cfg in various distros. Also, when you happen to be stuck in the limited dracut environment, you need to know how to mount all your filesystems, including /proc, /sys and /dev, and then chroot into your root filesystem on disk to be able to fix your initramfs.

For an imaged machine you need to do all these steps as well, but from a script. I tried to use LABEL= or PARTLABEL= in fstab in the image machine, and hoped that when remaking the initramfs, it would pick up these instead of UUIDs. But no, the distro makers insist on them.

UUIDs can be the default, but they should be a CHOICE! Other options should be just simple /dev/sdaX, or LABEL= and PARTLABEL= to specify the / and /boot filesystems.

I am really tired of people who immediately tell me I should or should not do something and not even bother to see the context. Just try to answer the question or just don't bother.