- 首先查看当前系统有几个内核
cat /boot/grub2/grub.cfg |grep menuentry
- 设置默认的启动内核
grub2-set-default 'CentOS Linux (4.18.3-1.el7.elrepo.x86_64) 7 (Core)'
- 验证是否修改成功
grub2-editenv list
- 卸载多余内核
rpm -qa | grep kernel
yum remove
cat /boot/grub2/grub.cfg |grep menuentry
grub2-set-default 'CentOS Linux (4.18.3-1.el7.elrepo.x86_64) 7 (Core)'
grub2-editenv list
rpm -qa | grep kernel
yum remove