service(staff) 2014/10/16 13:41
GRUB: grub2-set-default without Submenu (1st level)
$ grep "menuentry" /boot/grub2/grub.cfg | cut -d "'" -f2
$ grub2-set-default 'Fedora, with Linux 3.16.3-200.fc20.x86_64'
$ grub2-editenv list
GRUB: grub2-set-default within Submenu
$ grep "submenu\|^\smenuentry" /boot/grub2/grub.cfg | cut -d "'" -f2
$ grub2-set-default 'Advanced options for Fedora release 17 (Beefy Miracle) (on /dev/sda1)>Fedora Linux, with Linux 3.3.4-5.fc17.x86_64 (on /dev/sda1)'
$ grub2-editenv list
!注意!
如果選項在 submenu
要有 ">" ,代表 3.3.4-5.FC17 @ "Advance options for Fedora release 17" SubMenu 之內, 且字串要完整
!!Note!!
If your default-options are located in submenu,
you shall make the string like 'submenu>menuentry', and,
there is a '>' between submenu and entry.
Besides, the set-default have to be "Full" SubMenu/Entry String.
(6,921 views)
© Vovo2000.com Mobile Version 小哈手機版 2024