Wednesday, 15 June 2011

Quick HOWTO : Kernel Upgrade in Linux


 Here is the Quick HOWTO Steps to upgrade the Kernel in Linux..



 Steps:
 1. Update the kernel
  a. use 'uname -a' to reveal current version
  b. use 'rpm -qa | grep -i kernel' - to reveal installed version
  c. cat /etc/grub.conf -> /boot/grub/grub.conf - "" ""

 2. Proper installation method is as follows:
  a. 'rpm -ivh kernel*rpm' - install a separate version

Note: Install the following kernel packages if necessary:
  a. kernel-devel* - if module compilation is necessary
  b. kernel-headers* - if recompilation is necessary


Install:
  a. rpm -ivh kernel-2.6.18-53.el5.i686.rpm 
Note: This will update GRUB (/boot/grub/grub.conf)
Note: Will also place the new kernel in the /boot file system

Examine traces in:
 a. /boot
 b. /boot/grub/grub.conf

3. Remove traces of former kernel using 'rpm -e [--nodeps]'
 a. kernel-2.6.18-8.el5 - removes older version
 b. kernel-headers-2.6.18-8.el5 - force remove ignoring dependencies 'rpm -e --nodeps kernel-headers-2.6.18-8.el5'
 c. kernel-devel-2.6.18-8.el5

4. Install new 'kernel-headers' and 'kernel-devel' packages using YUM:
 a. yum -y install kernel-headers
 b. yum -y install kernel-devel

5. Confirm that the 3 'kernel-*' packages are installed:
 a. rpm -qa | grep kernel

Note: Removal of older kernel-* packages cleans up:
 a. /boot
 b. /boot/grub/grub.conf (menu.lst)

No comments:

Post a Comment