menuentry ‘openSUSE Leap 42.1, with Linux 4.8.0-rc6.bd0b841f-vanilla’ --hotkey=2 --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option ‘gnulinux-4.8.0-rc6.bd0b841f-vanilla-advanced-70bf5da6-46d4-4196-b042-f58de7a147c8’
menuentry ‘openSUSE Leap 42.1, with Linux 4.8.0-rc4.bd0b841f-vanilla’ --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option ‘gnulinux-4.8.0-rc4.bd0b841f-vanilla-advanced-70bf5da6-46d4-4196-b042-f58de7a147c8’
I’m trying to configure GRUB2 so that my system automatically boots to kernel 4.8.0-rc4 (the second entry in the first submenu).
One character is missing from the second UUID. This requires GRUB_DEFAULT=saved and we do not know what was the value when you tried it (it is written in manual). This does not need grub-mkconfig because it does not change anything in grub.cfg.
This sets GRUB_DEFAULT to plain 0.
Top level submenu number is 1, not 0.
Submenu 1 does not have menu item 2 (at least you did not show it)
This returns us to typo made in step 1 when setting default value. Under some conditions grub cannot write to environment file during boot, so you are left with wrong value.
Use the Boot loader configuration in YaST2 to choose the desired default entry from the drop-down.
Well, if this does not work we have a bug. In which case you need to provide more information. Make available grub.cfg (upload to http://susepaste.org) as well as output of “grub2-editenv - list”
grub-install is absolutely redundant in this case; it has nothing to do with changes in the content of grub.cfg.
OP didn’t say how the grub config he showed was created. On my 42.2 system grub2-mkconfig always list the kernels in lexicographic order, which would place rc4 before rc6.
Anyway, his strategy 6 seems to be the best approach. On my system, after I use YaST to set the default bootloader, I observe that:
On the first screen with the main menu, the middle entry is highlighted instead of the top one.
If I press enter or let the timeout expire, the sub menu is displayed with my default kernel highlighted instead of the top kernel.
If I press enter or let the timeout expire, my default kernel is booted.
This seems to be almost what OP wanted. You CAN edit grub.cfg, but the next time a kernel is installed, grub2-mkconfig will again order the entries lexicographically.