Results 1 to 4 of 4

Thread: Kernel Upgrade

  1. #1
    Member
    Join Date
    Jul 2007
    Posts
    26

    Default Kernel Upgrade

    hi,

    i want to know what the correct steps to upgrade kernel with os Centos 4 , Fedora 4

    thanks

  2. #2
    Member
    Join Date
    May 2004
    Location
    USA
    Posts
    413
    cPanel/WHM Access Level

    Root Administrator

    Default

    Keep in mind that you should have an emergency plan in place, since upgrading your kernel could EASILY break your box.

    The "basic" way:
    yum upgrade kernel

    The "advanced" way:
    compile kernel from sources, customizing it like you want

    Read up on kernel.org and linuxquestions.org.

  3. #3
    Tam
    Tam is offline
    Member
    Join Date
    Jul 2004
    Posts
    102

    Default

    Quote Originally Posted by assassin85 View Post
    hi,

    i want to know what the correct steps to upgrade kernel with os Centos 4 , Fedora 4

    thanks
    If you are not running a customer kernel (if you don't know the answer its probably no), then running yum -y update is good, however if you have experiences like most of us and find that kernel updates panic and wont boot, then you need to put in a failsafe to fall back to the old or previously working kernel to save you having to wait for someone to reboot at the datacentre or via KVM, so ...

    Run ...

    Code:
    yum -y update
    before rebooting, edit grub.conf and add ...

    Code:
    panic=5
    to the end of the kernel version lines, i.e....

    Code:
    # grub.conf generated by anaconda
    #
    # Note that you do not have to rerun grub after making changes to this file
    # NOTICE:  You do not have a /boot partition.  This means that
    #          all kernel and initrd paths are relative to /, eg.
    #          root (hd0,0)
    #          kernel /boot/vmlinuz-version ro root=/dev/sda1
    #          initrd /boot/initrd-version.img
    #boot=/dev/sda
    default=0
    timeout=5
    splashimage=(hd0,0)/boot/grub/splash.xpm.gz
    hiddenmenu
    title CentOS (2.6.18-53.1.4.el5)
    	root (hd0,0)
    	kernel /boot/vmlinuz-2.6.18-53.1.4.el5 ro root=LABEL=/ panic=5
    	initrd /boot/initrd-2.6.18-53.1.4.el5.img
    title CentOS (2.6.18-8.el5)
    	root (hd0,0)
    	kernel /boot/vmlinuz-2.6.18-8.el5 ro root=LABEL=/ panic=5
    	initrd /boot/initrd-2.6.18-8.el5.img
    Then run this command from SSH as root...

    Code:
    echo "savedefault --default=1 --once" | grub --batch
    Then reboot.

    This will force a reboot on the next kernel version in the list if the latest one panics and fails to load. And then you can remove the update that failed to boot...

    Code:
    yum remove kernel-2.6.18-53.1.4.el5
    obviously use the correct version number in the above example.

    And then you will want to exclude that version from subsequent updates when using yum, so add an exclude in your yum.conf [MAIN] section...

    Code:
    exclude=kernel-2.6.18-53.1.4.el5
    again, obviously using the correct version number in the example above.

  4. #4
    Tam
    Tam is offline
    Member
    Join Date
    Jul 2004
    Posts
    102

    Default

    I neglected to mention ...

    If you have Fantastico installed and have rolled back the wget version as Fantastico requests, you will need to exclude it in your yum.conf to prevent an error during yum update. So, add an exclude in the [MAIN] section of yum.conf for wget, i.e. ...

    Code:
    exclude=apache* courier* exim* httpd* mod_ssl* mysql* perl* php* proftpd* pure-ftpd* spamassassin* squirrelmail* wget*
    note that in this example the wget exclude is added onto the end of the existing exclude line

Similar Threads

  1. Kernel Upgrade
    By MethOd63 in forum cPanel & WHM Discussions
    Replies: 1
    Last Post: 02-25-2011, 04:13 AM
  2. Should I upgrade my kernel?
    By Lucas in forum cPanel & WHM Discussions
    Replies: 5
    Last Post: 03-09-2008, 01:54 AM
  3. How to upgrade kernel?
    By FreDy in forum cPanel & WHM Discussions
    Replies: 3
    Last Post: 08-05-2006, 12:40 AM
  4. Kernel Upgrade
    By mdelacruz in forum cPanel & WHM Discussions
    Replies: 1
    Last Post: 06-11-2005, 05:31 PM
  5. Post-kernel upgrade: ext3 not supported by kernel?
    By mitu in forum cPanel & WHM Discussions
    Replies: 0
    Last Post: 06-02-2005, 08:41 AM