Using a custom kernel with LCFG
This pages describes a simple recipe for inserting a custom kernel on testbed elements installed by LCFG as part of the EDG Testbed.
This situation arises because the current release is based on a relatively old RedHat Linux release (6.2 patched to kernel 2.2.19) but new hardware is often only supported by more recent kernel versions.
For example, the Micro Direct Omegas we use at Manchester are only £250 but their onboard ethernet adaptors use a Sis900 chipset only properly supported in kernel 2.2.21.
Two copies of the Linux kernel are used on each testbed element managed by LCFG. First, on the LCFG installation floppy used to boot and install the machine across the network; and secondly as the running kernel on the hard drive when the machine is in operation.
All zzkernel files mentioned in the remainder of this page can be found at http://install.gridpp.ac.uk/zzkernel/
It is simplest if you make one monolithic kernel with the special hardware drivers you need, which can be used on install floppies and for all testbed element types. It should include the following kernel features (some of which are desirable even if not absolutely necessary):
- Quotas
- Kernel autofs
- DHCP and BOOTP
- /proc filesystem
- ext2 filesystem
- Root NFS
- NFS client
- NFS server
- Coda
- Support for your network card
(The file dot.config is the .config file used at the top of a kernel 2.2.21 source tree to build the example zzkernel.)
You should manually install a version Linux on one of the machines you're intending to use for the Testbed (you can use a later version of Linux for this.) Then get and patch whatever Linux 2.2 kernel sources you need for the hardware in question, and iterate in the normal way until you get a kernel you can boot that machine with.
Once you have your monolithic kernel binary, you then need to make a custom LCFG boot disk. Start by fetching a standard boot_nfs_25032002.img image from http://install.gridpp.ac.uk/images/ and writing it to a floppy with cat boot_nfs_25032002.img >/dev/fd0
Then mount the floppy with mount /mnt/floppy and overwrite vmlinuz with your custom kernel. (If you edit lilo.conf at this point and make the disk stanza the default - ie put default=disk - then you can leave the disk in all the time and only interrupt it during boot up when you want to do an install.)
With the floppy still mounted, update its boot sector with /sbin/lilo -C /mnt/floppy/lilo.conf and then umount /mnt/floppy If you want to make copies of this floppy, now is a good time to save your own image with cat /dev/fd0 >/tmp/my_lcfg_boot.img
You should now be able to boot off the floppy and at least see it making DHCP requests on your network (which will show up in /var/log/messages on a Linux DHCP server.)
Other parts of the Testbed Support pages describe how to install an LCFG server for your site which you should now do (if you haven't already.) Ideally, check this works by installing a CE on one machine you know works with standard RedHat 6.2.
To include your custom kernel on testbed elements, you need to package it as an RPM. The example zzkernel spec file shows a simple way to do this (and you should avoid complicating this with postinstall scripts which LCFG may object to.) Make a tar file containing the kernel in a subdirectory and an appropriately modified spec file, and then make the RPM using the rpm command as described in the rpm man page.
You can now install your custom kernel RPM on your LCFG server. Copy the RPM into /opt/local/linux/6.2/RPMS/updates and do make in that directory to create the associated LCFG header file. Then append a line at the end of /opt/local/linux/6.2/rpmcfg/rh62-release-rpm.h for the RPM. For an RPM zzkernel-2.2.21-3.i386.rpm, you need to add zzkernel-2.2.21-3 on a line by itself.
Finally, each of the CE, SE or WN elements which need your kernel should have the line +update.lilokernel /boot/zzkernel-2.2.21-3 appended to their profile file, and mkxprof should be rerun for their profile.
With all this in place, you should be able to install the elements that need your custom kernel.
Last modified Mon 21 April 2008 . View page history
Switch to HTTPS . Website Help . Print View . Built with GridSite 1.4.3