Grub menu not updating on kernel change

if you are removing kernels by hand your always need to tell that grub too with “grub2-mkconfig”!

this command is your friend:

[ -d /sys/firmware/efi/efivars ] && sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg || sudo grub2-mkconfig -o /boot/grub2/grub.cfg

it first looks if you’re booting with EFI, according to the output it writes/updates the related grub.cfg.

the above line is a short form [1] of this:

 if [ -d /sys/firmware/efi/efivars ]; then
     sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg;
 else
    sudo grub2-mkconfig -o /boot/grub2/grub.cfg;
fi

if my above command doesn’t fix the problem please look if your /etc/default/grub

has either
GRUB_DEFAULT=saved
or
GRUB_DEFAULT=0

HINT:
everytime you change something in /etc/default/grub you need to run grub2-mkconfig to get your changes active !

[1]
laziness is the art to rest before getting tired !
:slight_smile: