Trouble replacing the bootloader

Hello, folks! :wave: New Fedora user here :slight_smile:

My problem is most likely not strictly related to Fedora, but I did some distro-hopping this week and now here’s where I’m experiencing it.

The short story

I installed Fedora as a 2nd distro and can’t get its bootloader to show up (I keep getting the one from the other distro). Tried efibootmgr: settings are applied but ignored and reverted after reboot. Tried grub2-mkconfig: says OK but there’s no effect.

The detailed story

My 6-year-old Acer laptop always had some trouble with bootloaders. I had a new/empty disk, installed Debian, then couldn’t get into grub. I had to spin-up a live-USB with boot-repair-disk, only then it worked (don’t know what it did).

So now I just installed Fedora on /dev/sda5 and I still get the grub from Debian which is in /dev/sda1. The boot-repair-disk live USB can’t help me this time, as it complains about not finding Fedora’s grub2-efi (although it’s there). Best it could do was to refresh Debian’s grub, so at least now I have an entry for Fedora in there and can temporarily use that.

I searched this forum and others, and based on what I read I tried playing around with grub2-mkconfig, grub2-install and efibootmgr. They don’t throw errors, but don’t help me either.

I tried:

  • reinstalling grub, as described in the documentation
  • sudo grub2-install --force /dev/sda (I have secure boot disabled)
  • sudo grub2-mkconfig -o /boot/grub2/grub.cfg
  • sudo efibootmgr --bootorder with the appropriate IDs
    • this seems to take effect (sudo efibootmgr with no params shows the new config) but doesn’t actually change anything and after reboot the config is reverted)
    • by the way, the only thing that worked was sudo efibootmgr --bootnext XXXX, but that’s one shot and I’d like something permanent
  • sudo dd if=/dev/zero of=/dev/nvram + reboot
    • because at some point my boot-repair-disk logged something like “Locked NVram detected”
    • this caused my clock to get reset after reboot, but that was about it

Also, fwiw, a few days ago while distro-hopping I installed Manjaro and its bootloader actually got set up! I couldn’t believe it, I just don’t know what their installed did that pleased my laptop. Other distros had the same trouble like I described above.

If anyone has any other ideas, I would love to try them.

I fixed the issue.
What worked, after reading the comments on an efibootmgr issue, was to:

  • enable secure boot from bios
    • “secure boot” was disabled (and false); I actually had to toggle “UEFI” to “legacy” and back so I would get it (disabled and) true
    • I had to set a bios password in order to enable the secure boot setting
  • register Fedora’s shimx64.efi in the secure boot trusted list from bios
  • change the boot order from bios, moving the new “fedora” entry to the top
  • disable secure boot

I think I had secure-boot “on” at that time.

1 Like