The Classic Tong’s Cave
telegram: https://t.me/classic_tong GIT: https://github.com/tony-caotong
[grub2] grub2修改启动顺序
https://wiki.centos.org/HowTos/Grub2#head-535f476a61e62f24bc150c73f7e0816f85345f46
1, 查看所有的entry
[root@dpdk grub2]# awk -F \' '$1=="menuentry " {print i++ " : " $2}' /etc/grub2.cfg
0 : CentOS Linux (3.10.0-693.11.1.el7.x86_64) 7 (Core)
1 : CentOS Linux (3.10.0-693.5.2.el7.x86_64) 7 (Core)
2 : CentOS Linux (3.10.0-693.2.2.el7.x86_64) 7 (Core)
3 : CentOS Linux (0-rescue-37138ca794604b28bca5b6394f5cd3c2) 7 (Core)
- 查看当前default的entry
[root@dpdk grub2]# grub2-editenv list
saved_entry=CentOS Linux (3.10.0-693.11.1.el7.x86_64) 7 (Core)
[root@dpdk grub2]#
- 修改为指定的entry
[root@dpdk grub2]# grub2-set-default 2
[root@dpdk grub2]# grub2-editenv list
saved_entry=2
[root@dpdk grub2]# 文档更新时间: 2020-04-03 03:12 作者:月影鹏鹏