# I don't want to use disk UUID on Fedora 19. but how? [closed]

Hi All,

I've just installed fedora 19 after long time I've been using fedora 11. And it seems the using UUID for the disk partitions are default on fedora 19, but is there any way not use the UUID or disable the UUID for the disk partitions?

edit retag reopen merge delete

### Closed for the following reason question is not relevant or outdated by sideburns close date 2015-03-07 20:43:16.004432

1

Why do you want to disable the use of UUIDs for mounting? This prevents problems caused by device renaming (when adding a new disk causes what used to be something like "sda" to become "sdb") or problems caused by failing to label a filesystem (when you're trying to mount LABEL=root but oops, you for to set the label). You can just go ahead and replace the UUID=... in /etc/fstab with a device path, LABEL=..., or anything else supported by mount.

( 2013-11-05 14:15:25 -0600 )edit

Sort by » oldest newest most voted

This is a bad idea generally. However, if you insist, you can find out what device is referred to by a specific UUID by running readlink /dev/disk/by-uuid/…. Then replace all occurrences of UUID=… in /etc/fstab with the actual device. Beware that if you change your partitioning (or insert a new disk) in the future, things could break.

more

For instance when you use systemimager you don't want UUIDs. They will be correct for the image but not for the machines the image is to be installed on. Before you mention that everyone should use kickstarter, there may be valid reasons people do not want to use that, too. For instance in a multi-distro environment. I just want the option to NOT use UUIDs, and instead use LABEL, PARTLABEL or simple device files. They appear in fstab, grub.cfg and initramfs. They hinder imaging systems, but also when you need to replace your disk for upgrade or repair.

( 2015-03-07 16:43:53 -0600 )edit

lsblk and blkid are your friends to see all information about labels/uuids/devices

more

Thanks for the answers and comments. Actually there is 0% chance to add / remove / exchange hard disk for my situation. So, I don't worry about device name getting changed after reconfiguration.

I'm making a small USB based installer which is booting by itself and preparing hard disk partitions and formatting. And I am copying the root file system which is created on my build server to another computer which is being configured by the USB based installer.

In this case, I need to copy the Kernel image and initramfs image to the computer which is prepared by USB installer. But since the initramfs has been prepared from the build server which is not the computer actually running the kernel and initramfs, the UUID information which initramfs has and UUIDs which are from actual hard disk of the computer which will run the kernel and initramfs are mismatched and boot does not proceed. And finally it dropped to the Dracut prompt.

I think if I don't use the UUID scheme at all, this mismatch will not happen. Do you think it is wrong understanding? If so, please correct me.

And that's why modifying the /etc/fstab using the actual disk name does not help.

more

I am not sure if this will answer your question, but, from this description I suggest you take a look at kickstart - http://docs.fedoraproject.org/en-US/Fedora/19/html/Installation_Guide/ch-kickstart2.html IMO kickstart is the best tool for automated installations and why re-create the wheel by writing a custom script?

( 2013-11-06 11:29:12 -0600 )edit

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.

more