SME Pages wellsi.com


Kernel Upgrades

8th May 2005 Ian Wells

Introduction

This guide for the SME Server shows how to upgrade the kernel to a newer version. It is largely based on Charlie Brady's forum post from January 2004. It shows how to upgrade to a kernel from The Fedora Legacy Project (downloads) or ATrpms (downloads). Alternatively check Michel Van hees's guide for a custom kernel (with PPTP support).

This guide has been tested on SME Server 6.0.1-01, and with kernel-2.4.20-35_39.rh7.3.at & kernel-2.4.20-30.7.legacy

There are now newer kenels, as of 8th May 2005, kernel-2.4.20-37_40.rh7.3.at & kernel-2.4.20-42.7.legacy

An Overview

Before starting it is important to understand that ppp-modules (which is required for PPTP VPN) has a dependency on (and will only work with) a particular version of the kernel. You won't have PPTP VPN capability until someone builds a ppp-modules RPM built for the kernel version you use.

The process is simple, and comprises of the following steps.

The Upgrade

Two kernel upgrades are shown here as examples.

Kernels from ATrpms

Download the kernel(s) appropriate to your hardware. In this example i686 uniprocessor and SMP kernels are selected.

  1. Install the RPMs, ignoring any symbol errors.
[root@testserver home]# rpm -Uvh kernel-2.4.20-35_39.rh7.3.at.i686.rpm
[root@testserver home]# rpm -Uvh kernel-smp-2.4.20-35_39.rh7.3.at.i686.rpm
  1. Tweak /etc/lilo.conf.
    You can edit /etc/lilo.conf in pico or vi or try a regular expression as shown here.
[root@testserver home]# perl -p -i -e 's/18.7/35_39.rh7.3.at/' /etc/lilo.conf
  1. Update lilo.
    Ensure that it displays no errors, otherwise fix them and try this step again.
[root@testserver home]# /sbin/lilo -v
LILO version 21.4-4, Copyright (C) 1992-1998 Werner Almesberger
'lba32' extensions Copyright (C) 1999,2000 John Coffman

Reading boot sector from /dev/hda
Merging with /boot/boot.b
Mapping message file /boot/sme_server.pcx
Boot image: /boot/vmlinuz-2.4.20-35_39.rh7.3.atsmp
Mapping RAM disk /boot/initrd-2.4.20-35_39.rh7.3.atsmp.img
Added SMEServer-smp
Boot image: /boot/vmlinuz-2.4.20-35_39.rh7.3.at
Mapping RAM disk /boot/initrd-2.4.20-35_39.rh7.3.at.img
Added SMEServer-up *
/boot/boot.0300 exists - no backup copy made.
Writing boot sector.
  1. All done, so post-upgrade and reboot.
[root@testserver home]# /sbin/e-smith/signal-event post-upgrade
[root@testserver home]# /sbin/e-smith/signal-event reboot

Kernels from The Fedora Legacy Project

Download the kernel(s) appropriate to your hardware. In this example only an i386 kernel is upgraded, this means that the SMP kernel is unchanged.

  1. Install the RPMs, ignoring any symbol errors.
[root@testserver home]# rpm -Uvh kernel-2.4.20-30.7.legacy.i386.rpm
Preparing...                ########################################### [100%]
   1:kernel                 ########################################### [100%]
depmod: *** Unresolved symbols in /lib/modules/2.4.20-18.7-e-smith/kernel/drivers/net/ppp_generic.o
depmod:         rwsem_down_write_failed
depmod:         rwsem_wake
depmod:         rwsem_down_read_failed
...etc
  1. Tweak /etc/lilo.conf.
    You can edit /etc/lilo.conf in pico or vi or try a regular expression as shown here.
    The regular expression is more complicated this time as the SMP kernel is not being upgraded.
[root@testserver home]# perl -p -i -e 's/18.7(\W)/30.7.legacy$1/' /etc/lilo.conf
  1. Update lilo.
    Ensure that it displays no errors, otherwise fix them and try this step again.
[root@testserver home]# /sbin/lilo -v
LILO version 21.4-4, Copyright (C) 1992-1998 Werner Almesberger
'lba32' extensions Copyright (C) 1999,2000 John Coffman

Reading boot sector from /dev/hda
Merging with /boot/boot.b
Mapping message file /boot/sme_server.pcx
Boot image: /boot/vmlinuz-2.4.20-18.7smp
Mapping RAM disk /boot/initrd-2.4.20-18.7smp.img
Added SMEServer-smp
Boot image: /boot/vmlinuz-2.4.20-30.7.legacy
Mapping RAM disk /boot/initrd-2.4.20-30.7.legacy.img
Added SMEServer-up *
/boot/boot.0300 exists - no backup copy made.
Writing boot sector.
  1. All done, so post-upgrade and reboot.
[root@testserver home]# /sbin/e-smith/signal-event post-upgrade
[root@testserver home]# /sbin/e-smith/signal-event reboot

More on lilo.conf

Here is a before-and-after for /etc/lilo.conf. It may help if you manually edit lilo.conf in your favourite editor rather than trying the regular expression route.

Before kernel upgrade

This is an example /etc/lilo.conf your file may vary slightly.

  prompt
  timeout=50
  default=SMEServer-up
  boot=/dev/hda
  map=/boot/map
  install=/boot/boot.b
  message=/boot/sme_server.pcx
  lba32
  image=/boot/vmlinuz-2.4.20-18.7.smp
          label=SMEServer-smp
          initrd=/boot/initrd-2.4.20-18.7.smp.img
          read-only
          root=/dev/hda3
  image=/boot/vmlinuz-2.4.20-18.7
          label=SMEServer-up
          initrd=/boot/initrd-2.4.20-18.7.img
          read-only
          root=/dev/hda3

After kernel upgrade

The lines that have changed are highlighted.

  prompt
  timeout=50
  default=SMEServer-up
  boot=/dev/hda
  map=/boot/map
  install=/boot/boot.b
  message=/boot/sme_server.pcx
  lba32
  image=/boot/vmlinuz-2.4.20-35_39.rh7.3.atsmp
          label=SMEServer-smp
          initrd=/boot/vmlinuz-2.4.20-35_39.rh7.3.atsmp.img
          read-only
          root=/dev/hda3
  image=/boot/vmlinuz-2.4.20-35_39.rh7.3.at
          label=SMEServer-up
          initrd=/boot/initrd-2.4.20-35_39.rh7.3.at.img
          read-only
          root=/dev/hda3