使用yum快速升级CentOS 6.5内核到 3.10.28
1、导入public key
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
2、安装ELRepo到CentOS-6.5中
rpm-ivhhttp://www.elrepo.org/elrepo-release-6-5.el6.elrepo.noarch.rpm
3、安装 kernel-lt(lt=long-term)
yum--enablerepo=elrepo-kernelinstallkernel-lt-y
或者安装kernel-ml(ml=mainline)
yum--enablerepo=elrepo-kernelinstallkernel-ml-y
vim/etc/grub.conf #grub.confgeneratedbyanaconda # #Notethatyoudonothavetorerungrubaftermakingchangestothisfile #NOTICE:Youdonothavea/bootpartition.Thismeansthat #allkernelandinitrdpathsarerelativeto/,eg. #root(hd0,0) #kernel/boot/vmlinuz-versionroroot=/dev/sda1 #initrd/boot/initrd-[generic-]version.img #boot=/dev/sda default=0 timeout=5 splashimage=(hd0,0)/boot/grub/splash.xpm.gz hiddenmenu titleCentOS(3.10.28-1.el6.elrepo.x86_64) root(hd0,0) kernel/boot/vmlinuz-3.10.28-1.el6.elrepo.x86_64roroot=UUID=0a05411f-16f2-4d69-beb0-2db4cefd3613rd_NO_LUKSKEYBOARDTYPE=pcKEYTABLE=usrd_NO_MDcrashkernel=autoLANG=en_US.UTF-8 rd_NO_LVMrd_NO_DMrhgbquiet initrd/boot/initramfs-3.10.28-1.el6.elrepo.x86_64.img titleCentOS(2.6.32-431.3.1.el6.x86_64) root(hd0,0) kernel/boot/vmlinuz-2.6.32-431.3.1.el6.x86_64roroot=UUID=0a05411f-16f2-4d69-beb0-2db4cefd3613rd_NO_LUKSKEYBOARDTYPE=pcKEYTABLE=usrd_NO_MDcrashkernel=autoLANG=en_US.UTF-8r d_NO_LVMrd_NO_DMrhgbquiet initrd/boot/initramfs-2.6.32-431.3.1.el6.x86_64.img titleCentOS(2.6.32-431.el6.x86_64)
root(hd0,0) kernel/boot/vmlinuz-2.6.32-431.el6.x86_64roroot=UUID=0a05411f-16f2-4d69-beb0-2db4cefd3613rd_NO_LUKSKEYBOARDTYPE=pcKEYTABLE=usrd_NO_MDcrashkernel=autoLANG=zh_CN.UTF-8rd_NO _LVMrd_NO_DMrhgbquiet initrd/boot/initramfs-2.6.32-431.el6.x86_64.img
确认刚安装好的内核在哪个位置,然后设置default值(从0开始),一般新安装的内核在第一个位置,所以设置default=0。
5、重启,查看内核版本号
[root@dev ~]#
uname-r
3.10.28-1.el6.elrepo.x86_64