====== GRUB ======
GNU GRUB (short for GNU GRand Unified Bootloader)
===== reboot to different kernel once =====
Obligatory changes:
GRUB_DEFAULT=saved
# Comment or disable:
# GRUB_SAVEDEFAULT=true
update-grub
==== Working example ====
# get menu ids:
egrep -i "menuentry '|submenu '" /boot/grub/grub.cfg
# Set grub env using chosen ids. For submenu use '>'
grub-set-default 'gnulinux-simple-21b9a8a1-48e8-4c4d-8420-6c97870f2702'
grub-reboot 'gnulinux-advanced-21b9a8a1-48e8-4c4d-8420-6c97870f2702>gnulinux-5.3.18-3-pve-advanced-21b9a8a1-48e8-4c4d-8420-6c97870f2702'
If everything works well, remove Debian kernel.
apt remove linux-image-amd64 'linux-image-4.19*' 'linux-image-5.4*'
update-grub
grub-set-default 0
==== specify boot entry ====
[[https://help.ubuntu.com/community/Grub2/Submenus| Grub2/Submenus]]
[[https://askubuntu.com/questions/1019213/display-grub-menu-and-options-without-rebooting|Display grub menu and options without rebooting?]]
[[https://askubuntu.com/questions/838704/grub-reboot-to-specific-kernel|Grub: reboot to specific kernel]]
Main menu boot entries can be specified by
=== by name ===
grub-reboot "Advanced options for Ubuntu>Ubuntu, with Linux 4.2.0-16-generic"
reboot
#
grub-reboot "Other platforms>Minix>Version 3.4.0"
reboot
=== by menu id ===
=== by number ===
# set first entry
grub-set-default 0
# boot 2nd menu next time (boot once next time)
grub-reboot 1
# boot 7th submenu from 2nd main menu (boot once next time)
grub-reboot "1>6"
#
grub-reboot "1>0>0"