Create UEFI entry for new motherboard

Hello all,

Got a question on Fedora 34 UEFI and switching mobo’s.

I just replaced my motherboard and I need to create a new UEFI entry on my Fedora 34 install. Question is how to do so, if the install won’t boot. Windows boots just fine, but the Fedora install isn’t found in the BIOS Boot entry. My Windows and Linux installs are on separate NVME drives, completely independent of each other, and I can see the UEFI partition for the old motherboard. Any advice on how to create a new UEFI entry? Do I just create a new UEFI partition? If so, would I have to boot into a live environment and then chroot to the native install and create it there?

Hardware:
New MOBO: MSI TRX40 Creator
Old MOBO: Gigabyte TRX40 Master
CPU: AMD Threadripper 3960x
RAM: 128GB DDR4 3600

Hi heller128bit,

I’m assuming the only change you made to your system was swapping the motherboard? And you were already dual booting with two NVMe drives before? If so you can try just adding a UEFI boot entry with efibootmgr from a Fedora live boot.

Your command will look something similar to below. You’ll just need to adjust the command to fit your EFI system partition’s location. In this example, -d /dev/nvme0n1p1 points to the drive containing the EFI parition, and -p 1 designates the first partition on the drive as where the bootloader can be found.

efibootmgr -c -L "Fedora" -d /dev/nvme0n1p1 -p 1 -l \EFI\fedora\shimx64.efi

That should add a boot entry and get you to the grub bootloader. If Fedora fails to boot after that that point, then yes you’ll need to chroot the installation and regenerate your grub config. But either way you shouldn’t need to make any partition changes to get it working again.

3 Likes

Hi Four0Four,

Thank you for the feedback. Turns out the place MSI has for selecting the Boot options was a little confusing. Turns out the old Fedora UEFI entry was present and picked up, but I had to do some deeper digging to find where it was to select the option in the BIOS. Once I moved the Fedora entry up to the first boot option I was able to successfully boot into the old install. Everything looks great on the new board. Again, thank you, and I’ll take note of your post.

Since the EFI boot entries (seen via efibootmgr) are stored in NVRAM on the motherboard not on any normal (NVMe, SATA, SAS) storage device, that cannot be the old entry.

The first time you booted Fedora on the new board it was probably just the using the EFI executable at the default x86 64-bit boot path for the drive:

(EFI System Partition)\EFI\BOOT\BOOTx64.EFI

Normally when GRUB is installed it puts a fallback copy of itself there to account for a scenario where the NVRAM is cleared or for some other reason there are no EFI boot entries. I assume your Windows installation provided its own fallback EFI executable at the same location on its drive’s ESP (EFI System Partition), otherwise Windows would not have been able to boot either.

Once Fedora booted it may have created a new boot entry for itself, so if you check now, efibootmgr may have an explicit entry for Fedora, probably using a path like \EFI\GRUB\(something).efi. Of course Windows probably has done the same.

If you did not have separate drives for Windows and Linux, you likely would have needed to edit UEFI entries via efibootmgr as @Four0Four suggested, because an ESP can only have one default boot path, and that would been either an EFI executable for Windows boot or an EFI executable for Fedora, probably GRUB.

Not sure what would happen if you had multiple ESPs, since when glancing through the UEFI specification v2.9 I only see a prohibition on multiple ESPs on removable media (see page 506, the 581st page of the PDF).

1 Like