How to reset kernel to default?

I updated F40 Workstation Gnome last night and the new 6.9.4 kernel breaks one of my bluetooth speakers. It worked fine on all the previous kernels, so I followed this guide (Fedora Docs) to set the default to 6.8.11 for now, until 6.9.5 gets released in which I’ll test it again to see if it fixes my bluetooth speaker issues or not.

Per the guide above I did

scott@fedora:~$ sudo grubby --set-default /boot/vmlinuz-6.8.11-300.fc40.x86_64
The default is /boot/loader/entries/a11a967ec2a64a38880ebc1b36521427-6.8.11-300.fc40.x86_64.conf with index 1 and kernel /boot/vmlinuz-6.8.11-300.fc40.x86_64

My main question really is, when I want to undo or reset this so that the default kernel is always the latest, aka how it is normally the default on Workstation, how would I go about doing that? Cuz I don’t want to have to keep doing this per each new kernel release that comes out. Thanks for any help!

Edit: Here’s the command I used to change it back to the default setting btw:

scott@fedora:~$ sudo grubby --set-default-index=0
The default is /boot/loader/entries/a11a967ec2a64a38880ebc1b36521427-6.9.4-200.fc40.x86_64.conf with index 0 and kernel /boot/vmlinuz-6.9.4-200.fc40.x86_64
1 Like

According to the grubby man page simply change to the index instead of the kernel name [--set-default=kernel-path] [--set-default-index=entry-index] and the default index is always ‘0’ for the newest kernel installed.

1 Like

Been using the index method like Jeff suggests.

sudo grubby --info=ALL | grep -E "^kernel|^index" will list kernels & index numbers.

A bluetooth fix is mentioned in kernel 6.9.5 changelog: Link to kernel 6.9.5 log

If 6.9.5. is not fixing your issue, and it will take time for a fix to come out, you may want to look at /etc/dnf/dnf.conf, as it by default keep 3 kernels installonly_limit=3.
Not sure if Fedora will remove the oldest kernel, if it is set to default, when a new kernel is installed, or if that is even possible.

1 Like

Fedora never removes the active kernel on update.
It will remove oldest none active kernel to keep to the limit.


Thank you for clearing that up, good to know.

Added grubby and removed gnome