grub2-common-2.00-alt21.x86_64 grub2-efi-2.00-alt21.x86_64 grub2-pc-2.00-alt21.x86_64 (As for the new grub version in Sisyphus, I haven't yet tested this.) The idea of the savedefault function in /boot/grub/grub.cfg is to update the saved default unless in the "boot_once" mode (so that the last saved default will be used on the next boot). And this is broken if "savedefault" is called from under a submenu, because AFAIU the "boot_once" variable is not inherited in the context of a submenu. (This can have really bad consequences for those who want to rely on the "boot_once" behavior invoked with grub-reboot: the good default will be overwritten. Workaround: don't use nested submenus OR remove the call to "savedefault" from the tested entries OR don't test nested menuentries with grub-reboot 'submenu_ID>menuentry_ID'.) ### BEGIN /etc/grub.d/00_header ### if [ -s $prefix/grubenv ]; then load_env fi set default="${saved_entry}" if [ x"${feature_menuentry_id}" = xy ]; then menuentry_id_option="--id" else menuentry_id_option="" fi export menuentry_id_option if [ "${prev_saved_entry}" ]; then set saved_entry="${prev_saved_entry}" save_env saved_entry set prev_saved_entry= save_env prev_saved_entry set boot_once=true fi function savedefault { if [ -z "${boot_once}" ]; then saved_entry="${chosen}" save_env saved_entry fi } .... "savedefault" function is called in all the following generated menuentries: # fgrep -A1 menuentry /boot/grub/grub.cfg if [ x"${feature_menuentry_id}" = xy ]; then menuentry_id_option="--id" else menuentry_id_option="" fi -- export menuentry_id_option -- menuentry 'ALT Linux Sisyphus' --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-simple-15eb82bb-060a-4cab-bfba-be39a4153542' { savedefault -- submenu 'Дополнительные параметры для ALT Linux Sisyphus' $menuentry_id_option 'gnulinux-advanced-15eb82bb-060a-4cab-bfba-be39a4153542' { menuentry 'ALT Linux Sisyphus, vmlinuz' --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-vmlinuz-advanced-15eb82bb-060a-4cab-bfba-be39a4153542' { savedefault -- menuentry 'ALT Linux Sisyphus, vmlinuz (recovery mode)' --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-vmlinuz-recovery-15eb82bb-060a-4cab-bfba-be39a4153542' { load_video -- menuentry 'ALT Linux Sisyphus, 4.9.44-std-def-alt1' --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-4.9.44-std-def-alt1-advanced-15eb82bb-060a-4cab-bfba-be39a4153542' { savedefault -- menuentry 'ALT Linux Sisyphus, 2.6.32-ovz-el-alt154' --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-2.6.32-ovz-el-alt154-advanced-15eb82bb-060a-4cab-bfba-be39a4153542' { savedefault -- menuentry 'ALT Linux Sisyphus, 2.6.32-ovz-el-alt151' --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-2.6.32-ovz-el-alt151-advanced-15eb82bb-060a-4cab-bfba-be39a4153542' { savedefault -- menuentry 'ALT Linux Sisyphus, 4.1.15-std-def-alt1' --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-4.1.15-std-def-alt1-advanced-15eb82bb-060a-4cab-bfba-be39a4153542' { savedefault -- menuentry 'ALT Linux Sisyphus, 3.14.51-std-def-alt1' --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.14.51-std-def-alt1-advanced-15eb82bb-060a-4cab-bfba-be39a4153542' { savedefault -- menuentry 'ALT Linux starter kit (Trientalis)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-1cca8e47-f247-4c3f-bb9e-cd443267b1e3' { savedefault -- submenu 'Дополнительные параметры для ALT Linux starter kit (Trientalis)' $menuentry_id_option 'osprober-gnulinux-advanced-1cca8e47-f247-4c3f-bb9e-cd443267b1e3' { menuentry 'ALT Linux starter kit (на /dev/sdc1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz--1cca8e47-f247-4c3f-bb9e-cd443267b1e3' { savedefault -- menuentry 'ALT Linux starter kit, vmlinuz (на /dev/sdc1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz--1cca8e47-f247-4c3f-bb9e-cd443267b1e3' { savedefault -- menuentry 'ALT Linux starter kit, vmlinuz (recovery mode) (на /dev/sdc1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz--1cca8e47-f247-4c3f-bb9e-cd443267b1e3' { savedefault -- menuentry 'ALT Linux starter kit, 2.6.32-ovz-el-alt139 (на /dev/sdc1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-2.6.32-ovz-el-alt139--1cca8e47-f247-4c3f-bb9e-cd443267b1e3' { savedefault -- menuentry 'ALT Linux starter kit, 3.14.58-std-def-alt0.M70P.1 (на /dev/sdc1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.14.58-std-def-alt0.M70P.1--1cca8e47-f247-4c3f-bb9e-cd443267b1e3' { savedefault -- menuentry 'ALT Linux starter kit, 2.6.32-ovz-el-alt138 (на /dev/sdc1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-2.6.32-ovz-el-alt138--1cca8e47-f247-4c3f-bb9e-cd443267b1e3' { savedefault -- menuentry "Memtest86+-5.01" { insmod part_msdos
Способ проверить, что сейчас сохранено: # xargs -0 </boot/grub/grubenv # GRUB Environment Block saved_entry=gnulinux-simple-15eb82bb-060a-4cab-bfba-be39a4153542 prev_saved_entry= #################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################### Способ проверить, какой пункт был загружен: # xargs -0 </proc/cmdline BOOT_IMAGE=/boot/vmlinuz root=UUID=15eb82bb-060a-4cab-bfba-be39a4153542 ro panic=30 splash #
Для документации стоит использовать вики; ну и проверить на 2.02 тоже стоит.
p7 is no longer supported