Boot default changes after kernel update

Hi all. I have a default set in GRUB2 bootloader which normally works nicely, booting to my Windows partition. However when auto update includes a new kernel version, after the update the bootloader defaults back to LEAP 15.4. It’s only a minor thing but is the expected behaviour?

Cheers
Fred

It is hard to say without knowing how exactly you defined default boot entry.

Well I opened the bootloader section within YAST, picked a default and saved it.

Show

grep -Ev '^#|^$' /etc/default/grub

Uploading /boot/grub2/grub.cfg to https://susepaste.org/ may be useful too.

fred@localhost:~> grep -Ev ‘^#|^$’ /etc/default/grub
GRUB_DISTRIBUTOR=
GRUB_DEFAULT=saved
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_CMDLINE_LINUX_DEFAULT=“splash=silent resume=/dev/disk/by-uuid/f4b4f044-ab82-433b-a5f0-6b10e8bd93f2 quiet mitigations=auto”
GRUB_CMDLINE_LINUX=“”
GRUB_TERMINAL=“gfxterm”
GRUB_GFXMODE=“auto”
GRUB_BACKGROUND=
GRUB_THEME=/boot/grub2/themes/openSUSE/theme.txt
SUSE_BTRFS_SNAPSHOT_BOOTING=“true”
GRUB_USE_LINUXEFI=“true”
GRUB_DISABLE_OS_PROBER=“false”
GRUB_ENABLE_CRYPTODISK=“n”
GRUB_CMDLINE_XEN_DEFAULT=“vga=gfx-1024x768x16”
fred@localhost:~>

BEGIN /etc/grub.d/95_textmode

if [ “${grub_platform}” = “efi” ]; then

On EFI systems we can only have graphics or serial, so allow the user

to switch between the two

hiddenentry ‘Text mode’ --hotkey ‘t’ {
set textmode=true
terminal_output console
}
fi

END /etc/grub.d/95_textmode

Sorry, don’t know anything aboue susepaste.

Show output of (run as root)

grub2-editenv - list

And please post computer text as preformatted (</> button in the editor).

grub2-editenv - list
env_block=512+1
saved_entry=Windows Boot Manager (on /dev/sdb1)

Yes, sorry about the formatting. I haven’t been here for a long time and the environment has changed a lot. I did look for forum usage instructions before posting but couldn’t find any in the menus.

One thing did occur to me, though it may be nonsense. When a software update is performed via YAST auto-update which " requires" a reboot (like kernel versions) , might some sort of flag get set somewhere to force boot to come back to Suse to complete the installation (overriding default boot option)?

Well, we need to see the actual grub.cfg, how the menu entries are named. Please upload it to https://susepaste.org/ (you could try to paste here, but I think it will be too long).

Not that I am aware of. But I have seen that sometimes system performed reboot via kexec, not via hardware reboot. In this it would bypass grub menu entirely.

I do not know how YaST auto-update works.

Hopefully this works.

https://paste.opensuse.org/pastes/983e86f81aa8

menuentry 'Windows Boot Manager (on /dev/sdb1)' --class windows

Without counting spaces between words this should work. Do you still observe this problem? If not, did you do anything to fix it?

Otherwise, if it happens next time you need to provide more information - how you rebooted, the content of grub.cfg, the output of grub2-editenv before reboot.

Right, I’ll see how it goes. I think I did rather compromise the investigation as I re-entered the default in YAST following the problem, so that grb.cfg probably got updated after the problem occurred.
As I said originally, it’s not that big a deal so I’m grateful that you committed your time to it.

Thanks
Fred