CentOS 7 修改内核启动顺序

1. 查看当前 grub2 的启动项:

cat /boot/grub2/grub.cfg

menuentry 后面的就是启动项。

例如改为 ‘CentOS Linux (3.10.0-327.el7.x86_64) 7 (Core)’

2. 一条命令:

grub2-set-default 'CentOS Linux (3.10.0-327.el7.x86_64) 7 (Core)'

例如

grub2-set-default 'CentOS Linux (3.10.0-327.36.3.el7.x86_64) 7 (Core)'

3. 验证一下是否有用:

grub2-editenv list

将会返回:

saved_entry=CentOS Linux (3.10.0-327.el7.x86_64) 7 (Core)

4. 重启即可。

标签:Centos 发布于:2019-11-09 23:02:05