Linux: updating kernel via rpm

Title:

Linux: updating kernel via rpm

Author:

Douglas O’Leary <dkoleary@olearycomputers.com>

Description:

Linux: updating kernel via rpm

Date created:

02/2002

Date updated:

02/2002

Disclaimer:

Standard: Use the information that follows at your own risk. If you screw up a system, don’t blame it on me…

Alrighty then, after doing the researh and posting a message on alt.os.linux.mandrake, it turns out that updating the kernel isn’t all that hard - at least not for minor revisions - I’m not sure abou the major ones yet.

In a nutshell, here’s what you have to do:

  1. Consult the appropriate web site for the update advisory. Mandrakes is hiding at http://www.linux-mandrake.com/en/security. Download the rpms that the advisory says you need.

  2. ** Install ** , do not upgrade the new kernel:

    rpm -ivh kernel-${version}.rpm
    
  3. mv the new kernel rpm out of the way, then freshen the remaining kernel rpms:

    rpm -Fvh kernel*.rpm
    
  4. Freshen any other rpms that are needed:

    rpm -Fvh iptables*.rpm; rpm -Fvh lm_util*.rpm
    
  5. Update the /etc/lilo.conf file:

    1. Update the label to something appropriate

    2. Ensure the old kernel’s files point to valid files instead of links to the new kernel:

      1. /boot/vmlinux

      1. Remove the /boot/vmlinuz link and create a new link pointing to the correct kernel.

      2. Update the image line to point to the kernel without using a link (preferred).

      1. /boot/initrd.img

        1. Remove the /boot/initrd.img link and create a new link pointing to the correct initrd file

        2. Update the initrd line to point to the valid initrd file without using a link.

        3. If necessary, create a new initrd file:

          cd /boot
          mkinitrd /boot/initrd-${kern_ver}.img ${kern_ver}
          
  6. Reboot.

A more long winded version of this checklist is on Mandrake’s site at http://www.mandrakesecure.net/en/docs/magic.php