admin管理员组

文章数量:1535308

1 得到当前系统已安装的所有内核版本

[root@localhost ~]# grep ^menuentry /boot/grub2/grub.cfg | cut -d "'" -f2
CentOS (3.10.0.el7.x86_64) 24 (Workstation Edition)
CentOS (3.10.2.el7.x86_64) 24 (Workstation Edition)
CentOS (0-rescue-5a7811782f504e58b061fcc2863b9246)  (Workstation Edition)

2 设置期望默认启动的内核版本

[root@localhost ~]# grub2-set-default 'CentOS (3.10.2.el7.x86_64) 24 (Workstation Edition)'

3 列出当前默认的启动内核版本(此步可省略

[root@localhost ~]# grub2-editenv list
saved_entry=CentOS (3.10.2.el7.x86_64) 24 (Workstation Edition)

4 重新生成grub信息

[root@localhost ~]# grub2-mkconfig -o /boot/grub2/grub.cfg

5 重启系统

本文标签: 内核版本方法系统Linux