CentOS-7-install-kernel-4-升级内核

参考:http://www.unixhops.com/install-kernel-4-12-centos-7/

rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
yum --disablerepo="*" --enablerepo="elrepo-kernel" list available
yum --enablerepo=elrepo-kernel install kernel-ml
cat /etc/default/grub

vim /etc/default/grub
####################
GRUB_TIMEOUT=5
GRUB_DEFAULT=0
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=cl/root rd.lvm.lv=cl/swap rhgb quiet"
GRUB_DISABLE_RECOVERY="true"
####################

cat /boot/grub2/grub.cfg |grep menuentry

grub2-set-default "CentOS Linux (4.14.2-1.el7.elrepo.x86_64) 7 (Core)"

#grub2-mkconfig -o /boot/grub2/grub.cfg