#How to stop Fedora from modifying the UEFI boot order

24 messages · Page 1 of 1 (latest)

nova gyro
#

I'm multi-booting Arch with Fedora and Windows, UEFI/GPT without secure boot.
Went with systemd-boot on Arch.
All systems are on separate disks with their own ESPs.
Followed the example configuration and it works like a charm:
https://wiki.archlinux.org/title/Systemd-boot#Boot_from_another_disk

The issue is that when I boot into Fedora, the boot order in the UEFI changes, so that it boots first... I suspect this has to do with grub2, but I can't for the sake of me figure out how to change that.

I found this post that detailed a very similar issue on Ubuntu, where it was solved by running dpkg-reconfigure on grub:
https://askubuntu.com/questions/1072986/how-can-i-prevent-grub-updates-from-resetting-my-efi-bootloader

I also found this post that detailed a very similar issue, on Fedora, where it was unsolved... from 2 years ago:
https://discussion.fedoraproject.org/t/how-to-set-to-make-fedora-update-but-not-changing-nvram-and-default-uefi-boot-item/61006

There is also this thread from 6 years ago that discusses the same issue on Debian systems, where they actually mention the --no-nvram flag for grub:
https://help-grub.gnu.narkive.com/XepyV0Hi/uefi-multiboot-control-usurped-with-each-kernel-update

Inspired by the previous link, I sought out how to change that argument. According to the docs, you can make persistent changes using grubby:
https://docs.fedoraproject.org/en-US/fedora/latest/system-administrators-guide/kernel-module-driver-configuration/Working_with_the_GRUB_2_Boot_Loader/#sec-Making_Persistent_Changes_to_a_GRUB_2_Menu_Using_the_grubby_Tool

I tried running sudo grubby --args="--no-nvram" --update-kernel=ALL however it didn't seem to do anything. Rebooted into Fedora, checked the entries and they still got reordered. I've verified that the argument is indeed passed to the kernel using sudo grubby --info=ALL

I'm starting to think this isn't possible on Fedora, and if it is it probably has caveats (like getting re-configured on an update...) Seems like much less of a PITA to install Arch over this right now, lol

fallow lintel
#

@nova gyro show sudo os-prober on fedora and arch please

nova gyro
#

from fedora:
/dev/nvme1n1p3:Arch Linux:Arch:linux
/dev/sdb1@/efi/Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows:efi

i don't have it installed on arch

fallow lintel
#

@nova gyro show me /etc/default/grub

nova gyro
#
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="rhgb quiet --no-nvram"
GRUB_DISABLE_RECOVERY="true"
GRUB_ENABLE_BLSCFG=true
GRUB_DISABLE_OS_PROBER="true"
fallow lintel
nova gyro
#

Yeah, my grub config is from fedora, as I'm using systemd-boot on arch

#

i don't really see how that is useful

fallow lintel
#

change grub default to ="1>2"

#

@nova gyro

nova gyro
#

I'll try it, but afaik that's only for the entries that grub manages right? my issue is that it modifies the boot order on my motherboard

nova gyro
fallow lintel
#

@nova gyro did you update grub before doing that?

nova gyro
#

Yes

fallow lintel
#

sudo update grub?

nova gyro
#

that's not a command

#

do you mean regenerating the config

fallow lintel
#

it's sudo update grub

nova gyro
fallow lintel
#

sudo update-grub

nova gyro
#

that's not a command either

#

i ran grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg to generate the new config

#

although that is the location i found the config in originally, the docs actually say that it belongs in /boot/grub2/grub.cfg on both UEFI and BIOS... so let me try that