Skip to content

            Lost ?  |  Need an account:
 
Home >> Knowledge Base >> Operating Systems >> Linux >> Red Hat Enterprise Linux Kernel Upgrade
Red Hat Enterprise Linux Kernel Upgrade PDF Print E-mail
(2 votes, average 3.00 out of 5)
Written by Tom Hirt   
Thursday, 25 June 2009 19:19

 

Kernel Upgrade Introduction


In this KB, we will see how to upgrade the kernel on Red Hat Linux Enterprise systems.  We will show you how to perform a automated upgrades of the kernel using the yum and rpm package management tools.

Before continuing on, a word of caution.  I recommend avoiding kernel updates unless absolutely necessary.  Generally speaking, if it's not broke, don't try and fix it.  So unless there is a vulnerability or lack of hardware/driver support in the currently installed kernel on your system, I would recommend against the installation of a new/updated kernel.  Installing a new kernel could have wide spread and unknown consequences to your system and/or might not be supported by your hardware/installed software.  Now that I got that off my chest, I'll get off my soapbox so we can get to work!

 

Kernel Upgrade/Update on Red Hat Enterprise Linux


Red Hat use a combination of tools such as yum for package retrieval and rpm for package management.  If you system is registered with the Red Hat Network (RHN), yum will automatically download and resolve dependencies for rpm based installs.  If you system is not registered with RHN, you can still upgrade the kernel, but you will have to manually resolve any dependencies (downloading and installing any dependent rpms.)  Yum will connect to the RHN (Red Hat Network) and scan the repository for updated packages (including your kernel.)  If there are updates available, yum will resolve their dependencies and mark the additional packages for download/installation.  Once yum has downloaded all the package(s), it will begin installing the packages using rpm (this will configure and register the package with the OS.)

  1. Before we can use yum, we must first register the server with the RHN (Red Hat Network).

    Note: If you registered your OS at the time of installation, you can skip this step

    Begin the registration process
    [root@RHEL01 ~]# rhn_register

    You'll be presented with a screen similar to the following, click Next to continue:
    Red Hat Network (RHN) Setup

    Enter your login information for the Red Hat Network (RHN) and click Next:
    Red Hat Network (RHN) Login

    Enter a profile name for the server and click Next:
    Red Hat Network (RHN) Profile

    Leave the defaults selected and click Next:
    Red Hat Network (RHN) Packages

    Click Next on the Send Profile page:
    Red Hat Network (RHN) Send Profile

    Your system's information will be sent/registered with the Red Hat Network (RHN):
    Red Hat Network (RHN) Sending Profile

    Click OK on the subscription details page:
    Red Hat Network (RHN) Subscription Details

    Click Finish to complete the registration with the RHN:
    Red Hat Network (RHN) Finish


  2. Check to see if there are updates available for the system

    Check for updates to the kernel package only:
    [root@RHEL01 ~]# yum check-update kernel
    Loaded plugins: rhnplugin
    kernel.x86_64 2.6.18-128.1.14.el5 rhel-x86_64-server-5
    root@ubuntu:~#
    Note: If there are no updates available, no output will be produced

    Or

    Check for all packages (including the kernel):
    [root@RHEL01 ~]# yum check-update
    Loading "installonlyn" plugin
    Loading "rhnplugin" plugin
    Setting up repositories
    rhel-x86_64-server-5 100% |=========================| 1.3 kB
    00:00
    Reading repository metadata in from local files
    primary.xml.gz 100% |=========================| 2.3 MB 00:01
    ################################################## 7019/7019
    Deployment_Guide-en-US.noarch 5.2-11 rhel-x86_64-serv
    NetworkManager.x86_64 1:0.7.0-4.el5_3
    rhel-x86_64-serv
    ORBit2.x86_64 2.14.3-5.el5 rhel-x86_64-serv
    OUTPUT TRUNCATED
    kernel.x86_64 2.6.18-128.1.14.el5 rhel-x86_64-serv
    kernel-headers.x86_64 2.6.18-128.1.14.el5 rhel-x86_64-serv
    OUTPUT TRUNCATED
    [root@Linux01 rhn]#
    Note: yum returns a list of all available packages

  3. A quick check of the system reveals we are running on v2.6.18-8.el5 of the Linux kernel

    [root@RHEL01 ~]# rpm -qi kernel
    Name : kernel Relocations
    : (not relocatable)
    Version : 2.6.18 Vendor
    : Red Hat, Inc.
    Release : 8.el5 Build Date
    : Fri 26 Jan 2007 02:47:08 PM EST
    Install Date : Wed 24 Jun 2009 8:50:56 AM EDT Build Host
    : ls20-bc1-14.build.redhat.com
    Group : System Environment/Kernel Source RPM
    : kernel-2.6.18-8.el5.src.rpm
    Size : 75875879 License
    : GPLv2
    Signature : DSA/SHA1, Fri 26 Jan 2007 09:12:24 PM EST, Key ID 5326810137017186
    Packager : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
    Summary : The Linux kernel (the core of the Linux operating system)
    Description :
    The kernel package contains the Linux kernel (vmlinuz), the core of any
    Linux operating system.  The kernel handles the basic functions
    of the operating system:  memory allocation, process allocation, device
    input and output, etc.
    [root@RHEL01 ~


    [root@RHEL01 ~]# uname -a
    Linux RHEL01 2.6.18-8.el5 #1 SMP Fri Jan 26 14:15:14 EST 2007 x86_64 x86_64 x86_64 GNU/Linux
    [root@RHEL01 ~]#

  4. Install the new kernel using yum

    Update the kernel package only:
    [root@RHEL01 ~]# yum update kernel
    Loading "rhnplugin" plugin
    Setting up Update Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package kernel.x86_64 0:2.6.18-128.1.14.el5 set to be installed
    --> Finished Dependency Resolution
    .
    Dependencies Resolved
    ==========================================================
    Package Arch Version Repository Size
    ==========================================================
    Installing: kernel x86_64 2.6.18-128.1.14.el5 rhel-x86_64-server-5 17 M
    .
    Transaction Summary
    ==========================================================
    Install 1 Package(s)
    Update 0 Package(s)
    Remove 0 Package(s)
    .
    Total download size: 17 M
    Is this ok [y/N]: y

    Or

    Update all packages including the kernel:
    [root@RHEL01 ~]# yum update
    Loading "installonlyn" plugin
    Loading "rhnplugin" plugin
    Setting up Update Process
    Setting up repositories
    rhel-x86_64-server-5 100% |=========================| 1.3 kB
    00:00
    Reading repository metadata in from local files
    primary.xml.gz 100% |=========================| 2.3 MB 00:01
    ################################################## 7019/7019
    Resolving Dependencies
    --> Populating transaction set with selected packages. Please wait.
    ---> Downloading header for redhat-lsb to pack into transaction set.
    redhat-lsb-3.1-12.3.EL.x8 100% |=========================| 12 kB
    00:00
    ---> Package redhat-lsb.x86_64 0:3.1-12.3.EL set to be updated
    OUTPUT TRUNCATED
    .
    Transaction Summary
    ==========================================================
    Install 33 Package(s)
    Update 270 Package(s)
    Remove 0 Package(s)
    .
    Total download size: 255 M
    Is this ok [y/N]: y
    Note: There may also be other available packages that need updating on the system (as seen above.)  Yum should take care of the kernel as well as any other packages and associated dependencies on the system.

    After answering yes to the continue question, yum will pull all the new packages and their dependencies from the RHN repository.  It will then configure them, and update your boot loader to use the new kernel (requires a reboot).

  5. The new kernel is now installed and ready for use.  Reboot the system to boot into the new kernel image

    [root@RHEL01 ~]# init 6

  6. Once the system has come back up, login and verify your running from the new kernel image

    [root@RHEL01 ~]# uname -a
    Linux REHL01 2.6.18-128.1.14.el5 #1 SMP Mon Jun 1 15:52:58 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
    [root@RHEL01 ~]#

Good luck on the kernel upgrade!

 


Add this page to your favorite website
AddThis Social Bookmark Button
Comments
Add New Search
Kiran |24/09/2009 04:16:09
Excellent. very detailed and nice article.

Thank you very much Tom.
Write comment
Name:
Email:
 
Website:
Title:
UBBCode:
[b] [i] [u] [url] [quote] [code] [img] 
 
 
:D:):(:0:shock::confused:8):lol::x:P:oops::cry::evil::twisted::roll::wink::!::?::idea::arrow:
 
Please input the anti-spam code that you can read in the image.

!joomlacomment 4.0 Copyright (C) 2009 Compojoom.com . All rights reserved."

Last Updated on Thursday, 25 June 2009 19:19
 

Forum Activity

Author: helenaprincesss
Aug.21.10
Author: helenaprincesss
Aug.21.10
Author: iinfotech10
Jul.30.10
Author: thirt
Jun.17.10
Author: data2020
May.28.10

Online Stats

Guests Online: 33
Members Online: 0