Lab1 - Upgrade Linux Kernel Version

Objective: Upgrade Linux Kernel Version in CentOS

Following document is useful to upgrade your Linux kernel version. It shows steps to upgrade CentOS Linux kernel version from 2.6.18 to a version 2.6.20.

Requirements:

1. VMware Player / VMware Server/ Vmware Workstation

2. CentOS 5.3 Linux

Procedure:

  • This document shows the steps to upgraded kernel of CentOS 5.3 from 2.6.18 to 2.6.20.
  • I have a host operating system Windows Vista in my notebook.
  • First, check your Linux OS's kernel version by using the command
$ uname –r

As Snapshot 1, recent kernel version is 2.6.18.

Snapshot 1

  • For the further process you need to be as a root by typing the following command on linux prompt,
$ su

  • and then password, so you can do the required steps for kernel upgradation as an administrative user.
  • Take a Snapshot using VMware’s snapshot features, so if problem occurs later in upgrading a process then you can revert to the previous linux snap.
  • You can find this feature in menu VM à Snapshot and save it with a particular name.

Snapshot 2

  • Then type the following command.
  • Above command starts downloading linux kernel 2.6.20 into /tmp directory from www.kernal.org website.

Snapshot 3.1

  • Extract tar file to /usr/src with the following command

$ tar -xjvf linux-2.6.20.1.tar.bz2 -C /usr/src

  • It will start extracting files of new linux kernel in the /usr/src directory.

Snapshot 3.2

  • To be able to perform a successful kernel build, you will need to install the following packages:
    • # This will ensure that you have all the required tools for the build.
$ yum groupinstall "Development Tools"
  • # This is required to supply the tools which can calculate HMAC values for files. – --------- It didn’t work when I tried.
yum install hmaccalc
  • # This is required to enable a make *config command to execute correctly.
yum install ncurses-devel
  • # This is only necessary if you wish to use make xconfig instead of make gconfig or make menuconfig.
yum install qt-devel
  • Then go into the directory /usr/src using the following command
$ cd /usr/src/linux-2.6.20.1/

Snapshot 4

  • Then type the command
  $ make menuconfig
  • And it will show the following window.

Snapshot 5

  • This menu is only required to change some advanced configurations. For kernel upgradation, I do not make any changes in it. Just save and exit from this wizard and you are once again on linux prompt.
  • Then type the following command
$ make

  • It will take one hour for processing and compile the kernel source code.

Snapshot 6

  • Then type the following command
  $ make modules
  • The above command compiles the kernel modules.

Snapshot 7

  • Then type the following two commands one after another
$ make modules_install
  • The above command install the kernel modules.
$ make install
  • The above compile the new kernel.
  • Following snapshot shows the result of above command.

Snapshot 8

  • Then go to the /boot/grub directory to edit menu.lst file using following command.
$ cd /boot/grub
$ vi menu.lst
  • In this file change default = 1 to default = 0

Snapshot 9

  • Then Reboot your virtual CentOS to complete the kernel upgradation.

Snapshot 10

  • Then after booting open the shell and type the following command to verify the upgraded kernel version.
$ uname -r
  • It will show the upgrades kernel version 2.6.20.1.

Snapshot 11