Impossible to update Grub2

Hi everyone,

I’m currently unable to to effectively update Grub2. I’m running tests on Leap 16 in a VM (UEFI, Full Disc Encryption and TPM 2.0). I’ve tried to reduce grub time out to 1 second but it doesn’t work. I edit /etc/default/grub and run sudo grub2-mkconfig -o /boot/grub2/config.cfg the output message is correct:

frederic@leap-vm:~> sudo grub2-mkconfig -o /boot/grub2/config.cfg
Generating grub configuration file ...
Found theme: /boot/grub2/themes/openSUSE/theme.txt
Found linux image: /boot/vmlinuz-6.12.0-160000.5-default
Found initrd image: /boot/initrd-6.12.0-160000.5-default
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings ...
done

But after reboot the timeout is still the default 8 seconds. What am I missing?

The complete file :

# If you change this file, run 'grub2-mkconfig -o /boot/grub2/grub.cfg' afterwards to update
# /boot/grub2/grub.cfg.

# Uncomment to set your own custom distributor. If you leave it unset or empty, the default
# policy is to determine the value from /etc/os-release
GRUB_DISTRIBUTOR=
GRUB_DEFAULT=saved
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=1
GRUB_CMDLINE_LINUX_DEFAULT="mitigations=auto quiet splash security=selinux selinux=1"
GRUB_CMDLINE_LINUX=""

# Uncomment to automatically save last booted menu entry in GRUB2 environment

# variable `saved_entry'
# GRUB_SAVEDEFAULT="true"
#Uncomment to enable BadRAM filtering, modify to suit your needs

# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
# GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"
#Uncomment to disable graphical terminal (grub-pc only)

GRUB_TERMINAL="gfxterm"
# The resolution used on graphical terminal
#note that you can use only modes which your graphic card supports via VBE

# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE="auto"
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
# GRUB_DISABLE_LINUX_UUID=true
#Uncomment to disable generation of recovery mode menu entries

# GRUB_DISABLE_RECOVERY="true"
#Uncomment to get a beep at grub start

# GRUB_INIT_TUNE="480 440 1"
GRUB_BACKGROUND=
GRUB_THEME=/boot/grub2/themes/openSUSE/theme.txt
GRUB_CRYPTODISK_PASSWORD="a54f-1108-9e2b-afd5"
SUSE_BTRFS_SNAPSHOT_BOOTING="true"
GRUB_USE_LINUXEFI="true"
GRUB_DISABLE_OS_PROBER="true"
GRUB_ENABLE_CRYPTODISK="y"

Thank you for your help!

it’s grub.cfg:

sudo grub2-mkconfig -o /boot/grub2/grub.cfg

See line 1 in your /etc/default/grub

1 Like

I feel stupid for asking now… The solution obviously works.

@frederic.mesplede update-bootloader is the tool to use these days :wink:

1 Like