if [ x"${feature_menuentry_id}" = xy ]; then menuentry_id_option="--id" menuentry_id_option="" export menuentry_id_option menuentry 'Debian GNU/Linux' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option'gnulinux-simple-cdd695b0-e558-4915-ba1d-38c769fee1b1' { submenu 'Advanced options for Debian GNU/Linux'$menuentry_id_option'gnulinux-advanced-cdd695b0-e558-4915-ba1d-38c769fee1b1' { menuentry 'Debian GNU/Linux, with Linux 4.9.0-12-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option'gnulinux-4.9.0-12-amd64-advanced-cdd695b0-e558-4915-ba1d-38c769fee1b1' { menuentry 'Debian GNU/Linux, with Linux 4.9.0-12-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option'gnulinux-4.9.0-12-amd64-recovery-cdd695b0-e558-4915-ba1d-38c769fee1b1' { menuentry 'Debian GNU/Linux, with Linux 4.9.0-11-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option'gnulinux-4.9.0-11-amd64-advanced-cdd695b0-e558-4915-ba1d-38c769fee1b1' { menuentry 'Debian GNU/Linux, with Linux 4.9.0-11-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option'gnulinux-4.9.0-11-amd64-recovery-cdd695b0-e558-4915-ba1d-38c769fee1b1' {
###修改grub文件
假设修改启动内核为4.9.0-11,修改文件/etc/default/grub。
1 2 3 4 5
vim /etc/default/grub
GRUB_DEFAULT=0 修改为 GRUB_DEFAULT="Advanced options for Debian GNU/Linux>Debian GNU/Linux, with Linux 4.9.0-11-amd64"
其中Advanced options for Debian GNU/Linux是一级菜单,Debian GNU/Linux, with Linux 4.9.0-11-amd64是二级菜单,两者之间用>连接。