Friday 10 June 2011

Update the kernel package appropriately to ensure a bootable system

In general it is a much more interesting proposition to install a new kernel rather than updating a kernel, as installing the kernel will create a new bootable kernel and leave your current kernel alone, whereas updating it might fail and leave you without a working system. At any rate, yum is your go to guy, when it comes to package management, particularly with the kernel as, it will add actually install a new kernel.
yum update kernel
If your system is not connected to a repository, you can update the kernel by downloading the kernel rpm(s) and installing it like this:
yum update kernel-2.6.32-131.0.15.el6.x86_64.rpm  kernel-firmware-2.6.32-131.0.15.el6.noarch.rpm
You could also compile a new kernel, but that is beyond the objectives here I think.
If you don't like yum, you can use rpm to update the kernel or install a new kernel. As I mentioned above, refrain from updating unless necessary.

New kernel installed, you can now check /boot/grub/grub.conf to see that you have a new stanza:
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux Server (2.6.32-131.0.15.el6.x86_64)
        root (hd0,0)
        kernel /vmlinuz-2.6.32-131.0.15.el6.x86_64 ro root=UUID=e9b35e95-5634-4891-8854-e4053f3fb350 rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=uk crashkernel=auto rhgb quiet
        initrd /initramfs-2.6.32-131.0.15.el6.x86_64.img
title
Red Hat Enterprise Linux (2.6.32-71.el6.x86_64)
        root (hd0,0)
        kernel /vmlinuz-2.6.32-71.el6.x86_64 ro root=UUID=e9b35e95-5634-4891-8854-e4053f3fb350 rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=uk crashkernel=auto rhgb quiet
        initrd /initramfs-2.6.32-71.el6.x86_64.img
Note how the new kernel is the new default kernel. After a reboot, you can check that the new kernel is running:
 uname -r
2.6.32-131.0.15.el6.x86_64

No comments:

Post a Comment