Grub not selecting newest installed kernel by default, must manually set default each upgrade

Which Linux distro are you using? Which release version?
Fedora 41 Workstation

Which kernel are you using?
6.13.8-200
6.13.9-200

Which BIOS version are you using?
v3.07

Which Framework Laptop 13 model are you using?
AMD Ryzen™ 7040 Series

Hello!

Class is almost about to begin and I’m trying to iron out the last few wrinkles of my installation which is now functioning very well.

My final issue I’m having with my Fedora installation is that Grub does not automatically set the newest installed kernel as default, and continues to boot into the kernel that I had previously set to default.

The /etc/default/grub configuration file has “GRUB_DEFAULT=saved” set. Grub does not seem to respect this, as it still defaults to the previous kernel, even if I have successfully booted into the newest manually.

I have been using the following grubby commands to view and set my default kernel each upgrade:

sudo grubby --info=ALL | grep -E "index=|kernel="
sudo grubby --set-default-index=0

Any help or advice would be appreciated!

You want GRUB_DEFAULT=0 if you want the newest kernel (menu item 0) to boot by default.

If you want to boot the last choice you selected in grub, you need both:
GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true
and boot can NOT be btrfs.

1 Like

Can you check whether the file /etc/sysconfig/kernel exists? If not you need to create it with contents as shown here: Fedora 39 on the Framework Laptop 13 - #82 by dimitris

2 Likes

Hey, I checked just now and it was missing! I created the file and added the necessary info. I’m going to see if there is a new kernel to test this out, but something tells me this is it. I’ll report back as soon as I have a fresh kernel