1:運(yùn)行安裝命令
rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm;yum --enablerepo=elrepo-kernel install kernel-ml-devel kernel-ml -y
2:查看所有可用內(nèi)核
cat /boot/grub2/grub.cfg |grep "menuentry "?
3:更換內(nèi)核
grub2-set-default 'CentOS Linux (3.10.0-327.el7.x86_64) 7 (Core)'?
4:查看內(nèi)核修改結(jié)果
grub2-editenv list?
awk -F\' '$1=="menuentry "?{print i++?" : "?$2}' /etc/grub2.cfg
5:如果安裝完內(nèi)核后闲勺,重啟任然未生效
vim /etc/default/grub
將 GRUB_DEFAULT=0
執(zhí)行 grub2-mkconfig -o /boot/grub2/grub.cfg
6:刪除多余內(nèi)核(可選)
yum remove kernel-3.10.0-693.el7.x86_64