Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I need to change the UUIDs of the /boot, /, and /home partitions for a Linux distro which I boot through the grub code in the /boot partition, and still have the distro finds its partitions. What is the best way to do this ?
My current plan is to generate new UUIDs, edit /etc/fstab and replace the relevant partition entries with the new UUIDs, reboot into gparted live, change the UUIDs of the partitions, and then reboot the distro. But I think I still need to do something with grub in the /boot partition so that this works.
As a side note I have multi-boot software that can boot any bootable partition, so the issue is not pointing my computer to the distros /boot partition, which the multi-boot software does flawlessly in order to transfer control to the boot software in that partition.
Which distro? The grub configuration files may have different locations/names depending on the distro. For *buntu based distros and probably debian as well see:
Which distro? The grub configuration files may have different locations/names depending on the distro. For *buntu based distros and probably debian as well see:
The grub.cfg location depends on whether you are using a traditional bios(/boot/grub2/grub.cfg) or UEFI(/boot/efi/EFI/fedora/grub.cfg). It appears that the root partition is set in grub.cfg using UUID by default so if you change root's UUID you will also have to change it in grub.cfg. I would go over the above documentation carefully and check things against what you currently have on your Fedora installation. Not being familiar with Fedora and not having access to your box so I could go back and forth between your current grub configuration files and the Fedora documentation, any further advice I give you would be just guessing and not very helpful.
Once booted into Fedora, the grub2-mkconfig command will regenerate a new grub.cfg file with appropriate UUIDs whether using UEFI or otherwise. To get booted into Fedora using Grub after having updated /etc/fstab and partition UUIDs, you can edit the kernel cmdline on the fly via the E key, changing the existing root=UUID=foo to the applicable root=/dev/sdZY format, or root=LABEL=volumelabel format. You can simplify updating /etc/fstab by using unique humanly memorable volume labels, set with e2label, tune2fs or other tools, instead of humanly incomprehensible UUIDs.
None of the above is unique to Fedora, except for the command in some distros, Debian and its derivatives in particular, is grub-mkconfig rather than grub2-mkconfig. What may differ from your expectation is Fedora by default usually incorporates LVM into the partition mix, but volume labels are volume labels whether on partitions or not. Use volume labels and you should quickly be good to go.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.