grub2-set-default & grub2-editenv & grub2-mkconfig


// grep -E --color "multiboot|module" /boot/grub2/i386-pc/command.lst

[root@localhost ~]# grep ^menuentry /boot/grub2/grub.cfg | cut -d "'" -f2

Fedora (4.6.4-301.fc24.x86_64) 24 (Workstation Edition)
Fedora (4.5.5-300.fc24.x86_64) 24 (Workstation Edition)
Fedora (0-rescue-5a7811782f504e58b061fcc2863b9246) 24 (Workstation Edition)
Fedora, with Xen hypervisor

[root@localhost ~]# grub2-set-default 'Fedora, with Xen hypervisor'

[root@localhost ~]# grub2-editenv list

saved_entry=Fedora, with Xen hypervisor

[root@localhost ~]# grub2-mkconfig -o /boot/grub2/grub.cfg

Now reboot.


原文地址:https://www.cnblogs.com/ztguang/p/12645964.html