justlinux.com
Sat, 20-Mar-2010 19:55:26 GMT
internet.com
Forum: Registered Users: 73710, Online: 206
nhfs Here you can view your subscribed threads, work with private messages and edit your profile and preferences Registration is free! Calendar Find other members Frequently Asked Questions Search Home Home

Help File Library: Updating a Kernel

By: rpmilius

I had Red Hat Linux 6.1 with the 2.2.12-20 kernel installed. For various reasons, I wanted to update the kernel to 2.2.13.

I performed the following steps, which seem to have worked.

  1. Download the latest stable kernel from www.kernel.org into your home directory.
  2. Type the following commands
    su -
    cd /usr/src
    ls -l 
    
    This showed that /usr/src/linux was a link to /usr/src/linux-2.2.12-20, the current kernel.
  3. Type:
    rm /usr/src/linux
    tar xzvf ~home/linux-2.2.13.tar.gz
    
    This last command creates a new Linux sub directory containing new kernel source files
  4. Now type:
    mv /usr/src/linux /usr/src/linux-2.2.13
    ln -s /usr/src/linux-2.2.13 /usr/src/linux

    This ln command links the linux directories just as in the prior configuration, for consistancy's sake.
  5. After linking the new kernel directory to /usr/src/linux, type:
    cd /usr/src/linux
  6. If you haven't done so, be sure to read through the README file, which explains the make commands you're about to enter:
    make mrproper
    
    This preserves the previous configuration options
  7. Type
    cp /usr/src/linux-2.2.12-20/.config  /usr/src/linux
    make oldconfig
    
    When prompted, enter m to make a module for new options
  8. Type:
    make dep
    make bzImage
    make modules
    make modules_install
    cd /boot
    ls -l
    
    This last command shows that old System.map is now a link to System.map-2.2.12-20 and that the old vmlinuz is a link to linuz-2.2.12.20
  9. Enter these commands:
    rm /boot/System.map
    rm /boot/vmlinuz
    
    This will copy the newly created kernel and system.map to /boot
  10. Type
    cp /usr/src/linux/arch/i386/boot/bzImage /boot/vmlinuz-2.2.13
    ln -s /boot/vmlinuz-2.2.13 /boot/vmlinuz
    cp /usr/src/linux/System.map /boot/System.map-2.2.13
    ln -s /boot/System.map-2.2.13 /boot/System.map
    
  11. Create /boot/initrd.2.2.13.img by typing:
    /sbin/mkinitrd /boot/initrd-2.2.13.img 2.2.13
    
  12. Edit the /etc/lilo.conf by copying the linux section and giving it a new label and updating the image and intitrd files. An example lilo.conf file appearers here:
    boot=/dev/hda
    map=/boot/map
    install=/boot/boot.b
    prompt
    timeout=50
    default=win98
    
    image=/boot/vmlinuz-2.2.12-20
    label=linux
    initrd=/boot/initrd-2.2.12-20.img
    read-only
    root=/dev/hda5
    
    image=/boot/vmlinuz-2.2.13
    label=newlinux
    initrd=/boot/initrd-2.2.13.img
    read-only
    root=/dev/hda5
    
    other=/dev/hda2
    label=win98
    
  13. Type
    /sbin/lilo
    
    To run the new kernel, I enter
    newlinux
    
    at the lilo prompt.

If you have problems, you can go back and run "linux" at the LILO prompt to get original kernel.

Once satisfied it works okay, update /etc/lilo.conf so that the new Linux kernel is labeled "linux" and original Linux is labeled "oldlinux" and re-run /sbin/lilo.


internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers
internet.commerce
Be a Commerce Partner












The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers