Copyright © 2000 Trustix AS
This document describes how to upgrade the kernel of a system running Trustix Secure Linux using rpm files provided by Trustix. Make sure you read through the whole document before attempting the upgrade.
The rpm files are availible on the Trustix web and ftp sites and also on various mirrors. See http://www.trustix.net for more detailed information. You can choose to download only the packages that match the ones you already have installed, or you can download it all ``and let rpm sort them out''.
It is advisable to make a new directory to put the rpm files in, much like this:
root@cmpt /tmp/kernelrpm# ls kernel-2.2.16-1tr.i586.rpm kernel-smp-2.2.16-1tr.i586.rpm kernel-BOOT-2.2.16-1tr.i586.rpm kernel-source-2.2.16-1tr.i586.rpm kernel-doc-2.2.16-1tr.i586.rpm kernel-utils-2.2.16-1tr.i586.rpm kernel-headers-2.2.16-1tr.i586.rpm
To install the packages, use the following command in the directory you put the kernel rpm files:
root@cmpt /tmp/kernelrpm# rpm -Fvh kernel*.rpm
Note that this will remove the old kernel from your system. To only install the new kernel, and not touch the source or anything else, use:
root@cmpt /tmp/kernelrpm# rpm -ivh kernel-2.2.16-1tr.i586.rpm
Switch this with the kernel-smp package if you have an smp system (a computer with more than one processor installed).
A lot of important modules for the system are put in a file called /boot/initrd-version.img where version is the kernel version. This file is loaded when the computer starts and is crucial in many cases, for example if your system boots from a SCSI disk.
Because of some differences between the old and new kernel packages, it is crucial that people with SCSI adapters using the ncr53c8xx driver add the following line to /etc/conf.modules before creating the initrd:
alias scsi_hostadapter ncr53c8xx
This is needed to tell mkinitrd that instructions for loading the module for this card should be included in the initrd. Users of other SCSI cards should already have a similar line for their cards in this file.
To create an init ramdisk for the new kernel, use:
# mkinitrd /boot/initrd-2.2.16-1tr.img 2.2.16-1tr
This command should create a file in /boot called initrd-2.2.16-1tr.img.
The lilo boot loader has to know that we installed a new kernel, so that it can be booted. To achieve this, add the following section to /etc/lilo.conf.
image=/boot/vmlinuz-2.2.16-1tr
label=linux-2.2.16
initrd=/boot/initrd-2.2.16-1tr.img
read-only
root=/dev/sda1
Make sure that the root is set to your root partition. The easiest way
of finding what your root partition is, is running `df', and look for the
partition mounted on /.
You should also consider changing the default value to linux-2.2.16 to
make this new kernel be booted automatically.
If you used `rpm -Fvh' to upgrade the kernel, you also have to remove the section for the old kernel, as this is no longer present on your system.
Lastly, run the command `lilo' to update lilo with the new information from lilo.conf. This should look something akin to this:
# lilo Added linux Added linux-2.2.16 *
Now you should be ready to boot the system. Make sure you have the boot disk created during the installation process handy. Should you have misplaced this boot disk, now would be a good time to create a new one, or, even better, two new ones, one for each kernel (providing you have not removed the old kernel already).
To do this, use the mkbootdisk program. We illustrate this only for the new 2.2.16 kernel, but the same procedure can also be used for the old kernel.
# mkbootdisk 2.2.16-1tr Insert a disk in /dev/fd0. Any information on the disk will be lost. Press <Enter> to continue or ^C to abort:
Insert the disk, and press enter. Repeat for 2.2.14-26tr if desired.
Just use the command shutdown -r now, and lean back to watch.