[Grub] No entries after Fedora upgrade, using backup disk to boot, somehow that chainloads the new disk, possibly because of same UUID after simple dd command to clone

So I may have done a clone wrong, but the backup disk works. I can’t remember exactly how I did it all, just using two disks, and a separate systen, so the fedora system is not loaded at all.

I literally did

dd if=disk1 of=disk2 bs=4096

since the disk that is now my main setup has the new 4K layout, I think it does anyway, still not sure.

So, I am not using the backup disk as the new upgraded install. It is just a backup. I used the same disk I had been using before the upgrade, and performed the upgrade on that same storage.

Everyone said oh it will be fine, shouldn’t be any issues, glad I did a backup, because when I rebooted, grub only has

UEFI firmware

So, now, I must change the boot order of my system, boot from the backup disk, which works, and it even says Fedora 38 on the menu entry. But here’s the crazy part, it somehow boots a completely separate disk, because I have all the new software in Fedora 40, X is not an option in login etc.

I do have the same UUID for both disks, and somehow, maybe that made this possible?

I’d really like to put the backup disk on a shelf, as that’s what a backup disk is for, and not use it to boot. So, how do I check for a /boot partition, do I need one?

I tried the grub-mkconfig -o /boot/whatever/grub whatever command and it didn’t fix the menu, so I need assistance.

1 Like

Fedora uses the UUID to identify partitions in a system. If you have multiple partitions with identical UUID it’s unclear which one is picked by the system.

The first step to fix this is probably to generate new UUIDs. I’d do that for the new drive (that ensures that the old system keeps working).
In Linux anything is possible with command line options. I recommend the gparted GUI tool for the job.
Simply right-click on an unmounted partition and generate new UUID.


You can find the new UUID by right-clicking on partition and selecting “Information”.

Beware. After this step the partition becomes “invisible” to Fedora (either system). You will have to do two steps to fix the cloned setup.

  1. Update /etc/fstab with the updated UUIDs
  2. Update the grub config, so that it tries to boot the correct partitions.
1 Like

Yeah, I’m beyond surpriser that it boots the new system, that’s wild!

I don’t have a working flash drive, I guess I corrupted mine using it in a virtual machine, and just haven’t bothered purchasing a new one.

I could do this all from the backup system right, so I’ll probably do that.

Then, how do I fix the boot entries?

What if, if I change the UUID, and fstab, I can’t boot the system? I know, I’ll save a .bak file, that should solve that

So if I do all this, I want a sure-fire way to know the system will boot. If I have a backup grub.cfg and backup fstab, will that be enough to keep figuring this out until I get it right?

I’m out of backup disks, they are all now being used.

Easy.

The boot entries live in /boot/loader/entries. You simply open each file and replace all instances of the old UUID with the new UUID pointing to the root file system (saving the file, of course).

  1. On EFI systems UEFI finds the partition with the boot flag on the drive you specified as boot drive (in live system mounted on /boot/efi). This starts the process looking for the boot partition (in live system mounted on /boot) which is specified in the /boot/efi/EFI/fedora/grub.cfg file. The UUID in this file will point there.
    You can update this manually, but ideally you should use the grub tools for this. I’m pointing you here for you to verify the setup is correct.
  2. The next step in the boot process grub loads the boot menu from the file /boot/grub2/grub.cfg. It also contains UUID entries that need to point to the correct partitions. Again - the grub tools should update, you should validate correct entries.
    Confusingly, this file uses grub terminology.
  • the UUID in the “kernelops” variable points to the the linux root partition.
  • the UUID in “root” variable points to /boot partition
  • the UUID in “boot” variable points to EFI partition (in fat file system).
1 Like

Take a read through this too I think it will clarify what you need to do

https://fedoraproject.org/wiki/GRUB_2#Updating_the_GRUB_configuration_file

obscura1725413036974

1 Like

I think I need help completely re-installing grub.

I have enough information to tweak the files, I can edit grub from backup disk, and load ipgraded fedora 40.

But I son’t think the disk is setup right because uefi says

No bootable media found.

No idea how to solve this, already tried

sudo grub2-install /dev/sdb

without progress

1 Like