设置下次启动到内核

设置下次启动到内核

我正在尝试自动将下一次启动设置为原始 ubuntu 内核。使用list_kernels.sh我在 stackoverflow 上找到的脚本,我可以获取菜单编号(包括子菜单)。但是,当我运行时,grub-reboot *number*我得到以下内容:

root@prod150:~# /tmp/list_kernels.sh 
0: Ubuntu
  0>0 Ubuntu, with Linux 4.9.24
  0>1 Ubuntu, with Linux 4.9.24 (recovery mode)
  0>2 Ubuntu, with Linux 4.4.0-81-generic
  0>3 Ubuntu, with Linux 4.4.0-81-generic (recovery mode)
1: Advanced options for Ubuntu
2: Memory test (memtest86+)
3: Memory test (memtest86+, serial console 115200)




root@prod150:~# grub-reboot 0>2

Menu entry not specified.
Usage: grub-reboot [OPTION] MENU_ENTRY
Set the default boot menu entry for GRUB, for the next boot only.
  -h, --help              print this message and exit
  -v, --version           print the version information and exit
  --boot-directory=DIR    expect GRUB images under the directory DIR/grub
                          instead of the /boot/grub directory

MENU_ENTRY is a number, a menu item title or a menu item identifier. Please note that menu items in
submenus or sub-submenus require specifying the submenu components and then the
menu item component. The titles should be separated using the greater-than
character (>) with no extra spaces. Depending on your shell some characters including > may need escaping. More information about this is available
in the GRUB Manual in the section about the 'default' command. 

Report bugs to <[email protected]>.

有人知道发生了什么吗?Stackoverflow 在线建议它应该有效。

提前致谢!

相关内容