使用yum快速升級CentOS 6.5內核到 3.10.28

使用yum快速升級CentOS 6.5內核到 3.10.28vim

在yum的ELRepo源中,有mainline(3.13.1)、long-term(3.10.28)這2個內核版本,考慮到long-term更穩定,會長期更新,因此選擇這個版本。ide

一、導入public keyui

rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.orgthis

二、安裝ELRepo到CentOS-6.5中spa

rpm -ivh http://www.elrepo.org/elrepo-release-6-5.el6.elrepo.noarch.rpmorm

三、安裝kernel-lt(lt=long-term)it

yum --enablerepo=elrepo-kernel install kernel-lt -yio

或者安裝kernel-ml(ml=mainline)class

yum --enablerepo=elrepo-kernel install kernel-ml -yimport

四、編輯grub.conf文件,修改Grub引導順序

vim /etc/grub.conf

# grub.conf generated by anaconda

#

# Note that you do not have to rerun grub after making changes to this file

# NOTICE:  You do not have a /boot partition.  This means that

#          all kernel and initrd paths are relative to /, eg.

#          root (hd0,0)

#          kernel /boot/vmlinuz-version ro root=/dev/sda1

#          initrd /boot/initrd-[generic-]version.img

#boot=/dev/sda

default=0

timeout=5

splashp_w_picpath=(hd0,0)/boot/grub/splash.xpm.gz

hiddenmenu

title CentOS (3.10.28-1.el6.elrepo.x86_64)

       root (hd0,0)

       kernel /boot/vmlinuz-3.10.28-1.el6.elrepo.x86_64 ro root=UUID=0a05411f-16f2-4d69-beb0-2db4cefd3613 rd_NO_LUKS  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_MD crashkernel=auto LANG=en_US.UTF-8

rd_NO_LVM rd_NO_DM rhgb quiet

       initrd /boot/initramfs-3.10.28-1.el6.elrepo.x86_64.img

title CentOS (2.6.32-431.3.1.el6.x86_64)

       root (hd0,0)

       kernel /boot/vmlinuz-2.6.32-431.3.1.el6.x86_64 ro root=UUID=0a05411f-16f2-4d69-beb0-2db4cefd3613 rd_NO_LUKS  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_MD crashkernel=auto LANG=en_US.UTF-8 r

d_NO_LVM rd_NO_DM rhgb quiet

       initrd /boot/initramfs-2.6.32-431.3.1.el6.x86_64.img

title CentOS (2.6.32-431.el6.x86_64)

       root (hd0,0)

       kernel /boot/vmlinuz-2.6.32-431.el6.x86_64 ro root=UUID=0a05411f-16f2-4d69-beb0-2db4cefd3613 rd_NO_LUKS  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_MD crashkernel=auto LANG=zh_CN.UTF-8 rd_NO

_LVM rd_NO_DM rhgb quiet

       initrd /boot/initramfs-2.6.32-431.el6.x86_64.img

確認剛安裝好的內核在哪一個位置,而後設置default值(從0開始),通常新安裝的內核在第一個位置,因此設置default=0。

五、重啓,查看CentOS 6.5 內核版本號

[root@dev ~]# uname -r

3.10.28-1.el6.elrepo.x86_64

相關文章
相關標籤/搜索