[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)

 

2. 查看當前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]# 

 

3. 修改為指定的entry

[root@dpdk grub2]# grub2-set-default 2
[root@dpdk grub2]# grub2-editenv list
saved_entry=2
[root@dpdk grub2]# 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM