mprop="name headline" style="font-size: 1.5em; margin: initial; font-family: Lato, "PingFang SC", "Microsoft YaHei", sans-serif; font-weight: normal; line-height: 1.5; overflow-wrap: break-word; color: rgb(85, 85, 85); text-align: center; text-wrap: wrap; background-color: rgb(255, 255, 255);">CentOS7 更换启动的内核
查询系统当前使用的内核:
uname -a
查询系统 grub 目录:
awk -F\' '$1=="menuentry " {print i++ " : " $2}' /boot/grub2/grub.cfg
1
2
3
4
5
6awk -F\' '$1=="menuentry " {print i++ " : " $2}' /boot/grub2/grub.cfg
> 0 : CentOS Linux (3.10.0-1062.1.1.el7.x86_64) 7 (Core)
> 1 : CentOS Linux (3.10.0-1062.1.1.el7.x86_64) 7 (Core) with debugging
> 2 : CentOS Linux (5.3.0-1.el7.elrepo.x86_64) 7 (Core)
> 3 : CentOS Linux (5.3.0-1.el7.elrepo.x86_64) 7 (Core) with debugging
> 4 : CentOS Linux 7 (Core), with Linux 0-rescue-bff8a0e97aa64c29b63d43defd9b317d
设置新的启动项:
grub2-set-default 序号
,其中序号以 0 开始验证:
grub2-editenv list
重启:
systemctl reboot
本文链接:https://www.kinber.cn/post/4160.html 转载需授权!
推荐本站淘宝优惠价购买喜欢的宝贝: