奇妙伞 Good Luck To You!

CentOS7修改默认内核启动顺序

  1. 查看已经安装的内核。

cat /boot/grub2/grub.cfg |grep menuentry

显示结果:

if [ x"${feature_menuentry_id}" = xy ]; then

  menuentry_id_option="--id"

  menuentry_id_option=""

export menuentry_id_option

menuentry 'CentOS Linux (4.4.155-1.el7.elrepo.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-693.el7.x86_64-advanced-df947c97-b37e-4a32-b789-96110fda3b2c' {

menuentry 'CentOS Linux (3.10.0-862.11.6.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-693.el7.x86_64-advanced-df947c97-b37e-4a32-b789-96110fda3b2c' {

menuentry 'CentOS Linux (3.10.0-693.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-693.el7.x86_64-advanced-df947c97-b37e-4a32-b789-96110fda3b2c' {

menuentry 'CentOS Linux (0-rescue-837e7d251faf4b498c2ddafe8fcd71c7) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-0-rescue-837e7d251faf4b498c2ddafe8fcd71c7-advanced-df947c97-b37e-4a32-b789-96110fda3b2c' {


    2. 修改默认启动内核。

grub2-set-default "CentOS Linux (4.4.155-1.el7.elrepo.x86_64) 7 (Core)"


3. 查看是否修改成功。

grub2-editenv list

显示结果:

saved_entry=CentOS Linux (4.4.155-1.el7.elrepo.x86_64) 7 (Core)



除特别注明外,本站所有文章均为奇妙伞原创,转载请注明出处来自https://www.qm3.com.cn/post/263.html

标签: centos7grub内核

作者:David 分类:Linux基础相关 浏览:2584 评论:0
留言列表
发表评论
来宾的头像