Grub not picking the latest kernel automatically on boot

Hello there, when rebooting my machine, the latest installed kernel is picked during the boot process, all good, but in case I shutdown and start it again (cold reboot), the grub menu shows no countdown and I have to select manually a kernel. I am on Fedora 43 xfce.

I decided to install fedora 43 xfce on a virtual machine (since I thought the grub config would differ from mine since it remained untouched the last 2+ years), edited the grub menu there (also run sudo grub2-mkconfig -o /etc/grub2.cfg ) and I saw that it does pick a kernel automatically (i.e. in a virtual environment works, in bare metal does not)

This is now my /etc/default/grub (same as the one working from a fresh install in a virtual machine)

GRUB_TIMEOUT=3
GRUB_DISTRIBUTOR=“$(sed ‘s, release .*$,g’ /etc/system-release)”
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT=“console”
GRUB_CMDLINE_LINUX=“rd.luks.uuid=luks-14f068cc-3b2b-4227-a4e2-5375316de012 rhgb quiet”
GRUB_DISABLE_RECOVERY=“true”
GRUB_ENABLE_BLSCFG=true

any idea on what could be the reason of the latest selected kernel not being picked automatically after a cold reboot? Thank you for reading these lines

Try this and check if the issue persists:

sudo grub2-editenv - list
sudo grub2-editenv - create

It is often cause by a value in the grubenv file. To list

sudo grub2-editenv - list

If you have the variable “saved_entry” in the listing, run this to clear it

sudo grub2 -editenv - unset saved_entry

In addition to what the others already said, one possible reason for this is that /boot is on BTRFS file system (which is not the default, but it can be set up this way, AFAIK). This prevents grub from writing to the grubenv file.

Hi Lars,

$lsblk -f

outputs ext4 as the /boot’s filesystem, the issue seems to be something else. Thank you for your answer

Hello Vladislav, that did not solve the issue.

after

$sudo grub2-editenv - create

now

$ sudo grub2-editenv - li

outputs

boot_success=0

but now the grub menu shows the countdown for about ~0.1 seconds and then the countdown is gone and no kernel is automatically picked. Thank you for your reply

That is fixed in Fedora 44.

That is the purpos of the line env_block=512+1 line in the grubenv file.