17 May 2017

steps

  1. enable elrepo project repository

         $ sudo rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
         $ sudo rpm -Uvh http://www.elrepo.org/elrepo-release-6-6.el6.elrepo.noarch.rpm
    
  2. install kernel

         $ sudo yum --enablerepo=elrepo-kernel install kernel-lt
    
  3. configure grub

    1. before install

       $ uname -a
       Linux node1 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
      
       $ sudo nano /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,1)
       #          kernel /boot/vmlinuz-version ro root=/dev/sda2
       #          initrd /boot/initrd-[generic-]version.img
       #boot=/dev/sda1
       device (hd0) HD(1,800,fa000,a1a429cf-bc86-47bf-bdc8-8d7f688f906c)
       default=0
       timeout=5
       splashimage=(hd0,1)/boot/grub/splash.xpm.gz
       hiddenmenu
       title CentOS (2.6.32-431.el6.x86_64)
           root (hd0,1)
           kernel /boot/vmlinuz-2.6.32-431.el6.x86_64 ro root=UUID=5d57a78f-c5cd-4c82-b9da-6eea50e5ce8d rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
           initrd /boot/initramfs-2.6.32-431.el6.x86_64.img
      
    2. after install

       $ cat /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,1)
       #          kernel /boot/vmlinuz-version ro root=/dev/sda2
       #          initrd /boot/initrd-[generic-]version.img
       #boot=/dev/sda1
       device (hd0) HD(1,800,fa000,c341f5e2-a8b5-4c83-968b-58eba5a68e55)
       default=0  # <== change this from 1 to 0
       timeout=5
       splashimage=(hd0,1)/boot/grub/splash.xpm.gz
       hiddenmenu
       title CentOS (3.10.105-1.el6.elrepo.x86_64)
           root (hd0,1)
           kernel /boot/vmlinuz-3.10.105-1.el6.elrepo.x86_64 ro root=UUID=2597787b-1fc5-449f-8719-47617905a4b0 rd_NO_LUKS rd_NO_LVM LANG=zh_CN.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
           initrd /boot/initramfs-3.10.105-1.el6.elrepo.x86_64.img
       title CentOS (2.6.32-431.el6.x86_64)
           root (hd0,1)
           kernel /boot/vmlinuz-2.6.32-431.el6.x86_64 ro root=UUID=2597787b-1fc5-449f-8719-47617905a4b0 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
           initrd /boot/initramfs-2.6.32-431.el6.x86_64.img
      
    3. reboot

       $ uname -a
       uname -a
       Linux node1 3.10.105-1.el6.elrepo.x86_64 #1 SMP Fri Feb 10 10:48:08 EST 2017 x86_64 x86_64 x86_64 GNU/Linux
      

references

  1. http://bicofino.io/2014/10/25/install-kernel-3-dot-10-on-centos-6-dot-5/

  2. http://elrepo.org/tiki/tiki-index.php



blog comments powered by Disqus