| Grabber Softwares : Enhance Your Computing |
| Upgrade your Kernel
From the pre-release version shipped with RH 5.2 to a new one Updating the kernel is not one of those simple "rpm -Uvh" commands. It takes a little more than that to get this one right. There are several issues involved and youve to make sure you get all the steps right, or you may land up with a brain-dead machine. First of all, its a good idea to determine which kernel you are using. We are assuming that youve installed Linux from the accompanying PCQ CD. Even after youve run the pcqupdt script the kernel has not been upgraded. The kernel currently installed would be 2.0.36-0.7. This can be confirmed by looking at the contents of your lilo.conf file (/etc/lilo.conf). Now in order to update the kernel there are certain things you must make sure you have. There are a few non-kernel files, and then the kernel updates themselves are required. Run this command to check if you have these files with you: # rpm -q mkinitrd SysVinit initscriptsmkinitrd-1.8-3 SysVinit-2.74-5 initscripts-3.78-1 Check for the kernel files too. # rpm -q kernel kernel-headers kernel-source kernel-ibcs kernel-pcmcia-cskernel-2.0.36-0.7 kernel-headers-2.0.36-0.7 kernel-source-2.0.36-0.7 kernel-ibcs-2.0.36-0.7 kernel-pcmcia-cs-2.0.36-0.7 Now that we know which files we have, lets compare them with the list of updates provided by Red Hat (ftp://updates.redhat.com/5.2/i386). The updates directory will also actually have filesother than the kernel updatethat need to be updated. Most of these files have been put on the PCQ CD, including the ones for the kernel update. So for the time being if you have the CD then you dont need to download anything new. The kernel updates files are in /pcq-linux/extra/kernel-updates/2.0.36 directory. Now to confirm if the files are all intact, mount the CD, change to the kernel update directory and give the following command: # rpm -K -nopgp *rpm kernel-2.0.36-3.i386.rpm: size md5 OKkernel-headers-2.0.36-3.i386.rpm: size md5 OK kernel-ibcs-2.0.36-3.i386.rpm: size md5 OK kernel-pcmcia-cs-2.0.36- 3.i386.rpm: size md5 OK kernel-source-2.0.36-3.i386.rpm: size md5 OK The md5 checksum indicates that all the files are fine and you can proceed with the actual update. Just to make sure that we can still use the system, it would be a good idea to make a boot disk. This is easy to do with Red Hat 5.2just use the mkbootdisk command # mkbootdisk -device /dev/fd0 2.0.36-0.7 This will, of course, wipe out any data on the floppy and create a bootable disk with a working kernel on it. It would be a good idea to boot from this floppy once to make sure that it really works. Now we are ready to start the update. Lets start with the kernel source and header files. These are required only if you do development work or kernel hacking. # rpm -Uvh kernel-headers-2.0.36-3.i386.rpm kernel-source-2.0.36-3.i386kernel-headers ######### kernel-source ########## Any errors at this stage would probably be due to the fact that a directory that did not exist was being removed. However, everything should actually be okay and work fine. Next lets install the kernel and modules. This one is not an upgrade but a fresh install so you need to use the rpm -ivh command instead. # rpm -ivh kernel-2.0.36-3.i386.rpm kernel-ibcs-2.0.36-3.i386.rpm kernel-pcmcia-cs-2.0.36-3.i386.rpmkernel ############# kernel-ibcs ############# kernel-pcmcia-cs ######### Now to create the initial ram disk. # mkinitrd /boot/initrd-2.0.36.img 2.0.36-3 Edit /etc/lilo.conf using a text editor such as joe. Note that your values may be different. Use your existing lilo.conf values as a guide, duplicate the current Linux image and adapt it for the new kernel. boot=/dev/hdamap=/boot/map install=/boot/boot.b prompt timeout=50 other=/dev/hda1 label=windows table=/dev/hda image=/boot/vmlinuz-2.0.36-3 label=linux root=/dev/hda6 read-only image=/boot/vmlinuz-2.0.36-0.7 label=linuxold root=/dev/hda6 read-only # lilo -v LILO version 20, Copyright 1992-1997 Werner Almesberger Reading boot sector from /dev/hda Merging with /boot/boot.b Boot other: /dev/hda1, on /dev/hda, loader /boot/chain.b Added windows * Boot image: /boot/vmlinuz-2.0.36-3 Added linux Boot image: /boot/vmlinuz-2.0.36-0.7 Added linuxold /boot/boot.0300 exists - no backup copy made. Writing boot sector. This is the procedure in brief. For more details, fire up your browser, mount our CD, and read the file kernupd.htm in the /doc/kernel directory. |