The PXE installer kernel

Note: This documentation only applies to SL5! For F13 and beyond see LCFGLinuxInstall instead.

Alongside the PXE installroot, which is served via NFS, there is a specially built Linux kernel and initrd which are served via TFTP. Which kernel and initrd are used is specified in the pxelinux.cfg for the particular host.

The process of building a new package for the PXE install kernel and initrd is a little complicated but there are some scripts in the lcfg-mkinitramfs package which simplify the issue.

The contents of the generated PXE initrds are controlled by per-platform installroot-pxe profiles, (e.g. installroot-pxe-sl5). Most of these profiles should never need to be altered, the important bit is the package list.

filesystem
Added just to create a default layout so we don't need to worry about creating any directories at a later stage and setup is added as it is a requirement for filesystem. The standard package for the platform.

setup
The standard package for the platform.

pci_scan
A script which scans the PCI bus to find IDs and match them up to drivers using a config file, such as /etc/niclist, which is fed to it on the command line. This is a local package (not in CVS though) and for any new network cards the package will need to be updated with the PCI id and kernel driver name.

busybox
This is not the standard package but rather a completely local version. We need this as the Redhat version is missing a shell and is a bit out-of-date. This package contains a static busybox and also all the symlinks for the commands it supports so don't install this just anywhere as you'll have problems... Note that more recent versions of busybox are hard to build as the developers do not like to use glibc.

kernel-pxe
Basically a copy of the kernel package we want installed but it is stripped of any scripts, we just want the contents of the package. There is a script to help generate this package. This must be generated from the kernel used in the PXE NFS installroot, if they don't match things will break.

Some of the files put into the initrd come from the lcfg-mkinitramfs package (e.g. linuxrc and udhcpc.script) and are put into the initrd by the scripts used to build the final kernel-pxe-install package. These rarely ever change but it is worth knowing where they come from, this is mostly an historical artefact that hasn't yet been improved.

Creating the PXE installer kernel

The script to use is lcfg-mkpxeroot-kernel it takes the source kernel and strips out a load of RPM package scripts which just break everything. The command will be something like this:

nsu -c "/usr/sbin/lcfg-mkpxeroot-kernel /afs/inf.ed.ac.uk/pkgs/rpms/os/sl5/lcfg/kernel-2.6.18-128.1.1.el5.lcfg.1.i686.rpm 2"

The first argument is the kernel we want to use as a base, the 2nd optional argument is a release number that will be added to the generated package. The output for this example would be kernel-pxe-2.6.18_128.1.1.el5.lcfg.1-2.

Once these packages have been built, submitted (e.g. to sl5/world) and the appropriate installroot-pxe profile updated, the pxe boot package, which will go onto the pxe servers, can be built. This is done with the following command:

nsu -c "/usr/sbin/lcfg-mkpxeboot --revision 2"

The revision argument is the release number which will get added to the final created package, it couldn't be called "release" in this context as we already support something like that for specifying the LCFG release.

This will produce an RPM, named like kernel-pxe-install-sl5-2.6.18_128.1.1.el5.lcfg.1-2.noarch.rpm in /var/lcfg/tmp, this will need to be submitted to the RPM repository for the PXE servers (e.g. sl5/world). You then need to edit the header ed/options/pxeserver.h and add or update the entries for the kernel-pxe-install-* packages.

-- StephenQuinney - 03 Dec 2009

Topic revision: r10 - 07 Feb 2011 - 14:21:38 - StephenQuinney
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
This Wiki uses Cookies