Yo Yo Boyz. Today I have come with a really nice tutorial for you guys. Here we will upgrade our kernel to the latest stable version of Linux kernel. I am using RHEL6 with kernel 2.6 and now I have upgraded it to 3.3.1. So it’s time to tell you how to do this on your machine. So before we begin our recipe, download kernel 3.3.1 source package from http://boot.kernel.org/. Make sure you have enough hard disk space on your system as on my system the final size of the package after compilation has become 3.5 GB. Now it’s showtime so get ready and do as I say.

  • Swith to /usr/src directory using cd /usr/src command.
  • Copy the downloaded linux-3.3.1.tar.bz2 package to this directory.
  • Now extract the contents of the package using   tar xvjf linux-3.3.1.tar.bz2 command. Now you’ll get a directory named linux-3.3.1.
  • Switched to that directory using cd linux-3.3.1 command.
  • Now make sure that kernel-headers kernel-devel and gcc packages are installed on Linux.In case they are not installed install them using yum install kernel-headers kernel-devel gcc command.
  • Now run cp /usr/src/kernels/2.6.32-71.el6.i686/.config . command.This will copy the contents to the current directory.Don’t forget the . at the end of the command.
  • Now it’s time to run make oldconfig command.Here you’ll  be asked a lot of yes no type questions. I just kept on pressing enter key except one place where you’ll be asked the processor type. So select the appropriate processor you are using.For rest of the questions you can simply press enter to accept the defaults like I did.
  •  Now issue  make dep

                                    make clean

                                    make bzImage

               This will take a long time. So you can have a walk or take a cup of coffee.

  • Now issue cp arch/x86/boot/bzImage /boot/vmlinuz3

                                  chmod a+x /boot/vmlinuz3

                                  cp System.map /boot/System.map3

                                 make modules.

Again it will take some time. So another cup of coffee can be a good choice to cut the time.

                             make modules_install 

                             mkinitrd /boot/initrd-3.3.1.img 3.3.1

Please note that there is a space between initrd-3.3.1.img and 3.3.1. In case there is a mismatch in the name it will show an error and you can check /lib/modules for appropriate name.

  • Now it’s time to update grub.So open /boot/grub/grub.conf and change the values of kernel and initrd parameters as kernel /vmlinuz3 and initrd /initrd-3.3.1img as shown in the figure. Now save this file and reboot your machine. Now you can verify that your kernel has been upgraded successfully by issuing uname -r command.If it is showing 3.3.1 then the task is completed successfully. Time taking task but all is well that ends well.
Upgrade kernel to kernel 3.3.1 on RHEL6 

Advertisements