How to control boot order when one boot partition is shared by two Fedora?

I have two Fedora installed to the same disk - two separate rootfs btrfs subvols, and sharing the same boot subvol.

$ sudo tree /boot/loader/entries/
├── 9c3180972d684d3ca465b6f860576696-0-rescue.conf
├── 9c3180972d684d3ca465b6f860576696-5.13.0-0.rc6.20210617git70585216fe77.48.fc35.x86_64.conf
├── f9ea3b2568b54649b0d964d39efafa77-0-rescue.conf
├── f9ea3b2568b54649b0d964d39efafa77-5.12.10-300.fc34.x86_64.conf
└── f9ea3b2568b54649b0d964d39efafa77-5.12.11-300.fc34.x86_64.conf

By default, grub menu will show <9c> before <f9>, so <9c> will be booted first.

How can I have grub to boot latest kernel version of <f9> by default?

What needs to be done when there are kernel updates?

Should I make changes when <f9> is booted, or when <9c> is booted?

I believe whichever received the last kernel update should be the one which is booted by default. Having 2 different fedora versions means you must do something every time the kernel is updated to keep your boot order since grub gets updated with the new kernel. With them sharing a boot partition you have volunteered yourself to do a lot of extra admin with the (almost) weekly kernel updates.

Is that easily done with grub? You can set the boot order but it is an index value which in your case will change as kernels get installed/removed.

If nobody else has an easy way to do it in grub you might consider switching boot loaders. With systemd-boot you can set the default entry using a wild card which solves that problem.

As a last resort I suppose you could change the machine-id for one of the installs so it came alphabetically first.

1 Like

Yes. That’s why I am asking for experience sharing.

systemd-boot will be my next target to try.

I just want to see if there is a way with grub to doing it.

1 Like