NIKOLA

Kickstart (Linux) Installs

horizontal line

How to do a kickstart

Building a kickstart server

If you already have a Nikolaized kickstart server, skip this section.

The main steps of building a kickstart server are to copy the RedHat/RPMs from both Red Hat distribution CDs into the kickstart directory, and to create a ks.cfg file.

Our kickstart directory is divided into subdirectories, to allow for multiple images at the same time.

/kickstart/osimages		directory tree for the different Red Hat
				releases

/kickstart/nikola1		control tree for nikola 1.x, including
				patches, cfg files and tar tree.

See Red Hat's Chapter 2. Kickstart Installations for the official documentation on creating a Kickstart Server.

The easiest way to get the RPMs and all supporting items in place is to mount your binary-distribution CD and tar(1) copy it, then copy the RedHat/RPMs directory from the second CD:

sudo mkdir /kickstart
cd /mnt/cdrom
sudo tar clpf - . | (cd /kickstart ; sudo tar xvf -)
cd /
eject
(mount the second Red Hat cdrom in /mnt/cdrom
cd /mnt/cdrom/RedHat sudo tar clpf - RPMs | ( cd /kickstart/RedHat ; sudo tar xvf -)

I used tar(1) instead of cp(1) for this to make sure we copy links, instead of copying the content of the link.

Your next step is to create the scsi.cfg and ide.cfg files. This file contains several sections. The first one lays out the configuration of the host, including the disk slicing, packages to install, network options, etc. The second part is the %pre section, which is a shell-script that does pre-configuration on the install, and the last part is the %post section, which lists your post-install steps.

See Red Hat's Kickstart Options for a list of the options you can use in the cfg files.

Since the system doesn't offer a way to say "do this for these disks and this for these other disks" you may want to create a scsi.cfg and an ide.cfg file. They should be exactly the same, except replacing /dev/sda with dev/hda in the ide.cfg. To make your life easier (and help keep scsi.cfg and ide.cfg the same), put as much of your post-configuration in a rc file as you can.

Our post-proc script is /n/chicken/kickstart/nikola1/files/etc/rc.d/init.d/nikola, which is copied into place as part of the .ks %post script. (We tar(1) copy everything from /n/chicken/kickstart/nikola1/files into / as part of the %post script.) It is then linked to /etc/rc.d/rc5.d/S90nikola so it is executed on reboot. The last step in the nikola rc file is to remove the link from /etc/rc.d/rc5.d, so it only runs once.

See /n/chicken/kickstart/nikola1/scsi.cfg and /n/chicken/kickstart/nikola1/files/etc/rc.d/init.d/nikola for how SSLI's Nikola kickstart is configured. With the possible exception of the nameserver lines, it should translate directly across for other groups, though the contents of /n/chicken/kickstart/nikola1/files/var/nikola will need to be changed, along with the configuration files scattered throughout /n/chicken/kickstart/nikola1/files.

One change that SSLI made from the standard Kickstart was to override how hosts figure out what their installed name and IP address is. The basic system gives the host a name and address when it first comes up and asks for a network identity. Our options were to set up our own DHCP server (conflicting with the existing one) and muck with it each time we wanted to install a new system, create a unique ks.cfg for each host, or to let the host DHCP request a random name & address, then use a configuration file to tell the host what it really is.

We chose to go with the configuration file, basing it on ethernet NIC card's MAC address. The file is a simple tab-delimited list of MAC, IP, hostname (FQDN), short hostname, and bunch.

The program that parses this data file is called make_network_configs, and is located in the root of the /kickstart filesystem. It is called by the %post step of the *.cfg scripts. It calls pullmac.sh, a simple script that looks up the mac address for all of the kernel-configured interfaces.

Aside from changing the contents of the /var/nikola directory and configuration files in /n/chicken/kickstart/nikola1/files as described before, you should be able to use the entire /n/chicken/kickstart tree unchanged for your bunch kickstart. Once the nugget system is working, you won't need to change anything in the files subdirectory, except possibly the /var/nikola portion.

Doing the kick itself

Add the target host's MAC address, IP address, fully qualified hostname, hostname and bunch to the hostmap file in your kickstart root directory. This fill is used by the make_network_configs script to set up the host's name, IP address, and /var/nikola/bunch during the post-configuration.

WARNING: If you are reinstalling an existing host with multiple drives, and wish to preserve the data on the other drives, disconnect them. The kickstart install wipes all partition tables on all connected drives.

When you are ready to start the install, boot the target system with a RedHat 7.1 boot floppy or cd. At the boot: prompt type either:

Don't forget to export the filesystem so it can be NFS mounted by the target system.

for SCSI-based systems

nofb ks=nfs:fileserver:/kickstart/nikola1/scsi.cfg

or, for IDE-based systems

nofb ks=nfs:fileserver:/kickstart/nikola1/ide.cfg

Replace fileserver with the name of your NFS kickstart server.

This will cause the target start booting, then NFS mount the /kickstart directory and read the appropriate .cfg file. It will then format the filesystems, load the RedHat image, and execute the pre and post sections of the file. Part of the post section does a second mount of the /kickstart directory, then tar copies the contents of /kickstart/nikola1/files to /, enabling the installation of configuration, crontab, and the /etc/rc.d/init.d/nikola file (the Nikola customization script).

Depending on the speed of the host and the net, wait about forty five minutes for the kickstart, the reboot, the Nikola rc script, /etc/rc3.d/S90nikola, to run and the final reboot. The nikola script will apply and patches as well as the Nikola RPMs and customizations. The host will reboot twice during the install, once after the main installation and once after the nikola script runs.

There are a few more steps to take for SSLI hosts

If you are creating a new host with multiple drives:

format the second drive:
slice0: /home 10GB
slice1: swap 1GB
slice7: /s1 (rest of drive)

vi /etc/exports
(add exports for /home and /s1)

vi /etc/fstab
(add new swap, /s1, and /home)

create the filesystems, mount points and nasty evil /exports links:
newfs /dev/sdb1 or /dev/hdb1
mkswap /dev/sdb2
or /dev/hdb2
newfs /dev/sdb7
or /dev/hdb3
mkdir /s1 /home
mount /s1
mount /home
mkdir /home/hostname
ln -s /home /exports
sh /g/ssli/sbin/check_scratch
exportfs -av

If you are reimaging an existing host, re-connect the drives and put the additional partitions back into /etc/fstab and /etc/exports, then create the link /home to /exports/home. Now you can mount and exportfs everything as appropriate.

Either way, don't forget to make sure /usr/nikola/nuggets/amd.network and magpies:/var/yp/Files/amd.network is up to date.

horizontal line

What is in the Kickstart image?

The jumpstart image consists of Red Hat-released product located in /kickstart/RedHat and kickstart/patches; Nikola additions, located in /kickstart/nikola1/files, /kickstart/SSLIpkgs, and /kickstart/NIKOLApkgs; and kickstart control files located in /kickstart.

patches contains the latest Nikola-approved Red Hat Patch Set, as well as any patches we've decided are needed for the global release of Nikola.

NIKOLApkgs and SSLIpkgs contain our own RPMs which get installed by the nikola rc script. NIKOLApkgs has global packages, while SSLIpkgs has SSLI-specific packages like SSLIcustoms.

files contains a sparse filesystem which has files we want copied verbatim to each host. This filesystem has the initial configuration files so we have something before the nuggets get installed. These files are copied over by the execution of the post section of the /kickstart/nikola1/scsi.cfg or /kickstart/ide.cfg script at the end of the kickstart, and include the /etc/init.d/nikola rc script as well as the initial /var/nikola files including the Nikola crontab(1) entries.

horizontal line

author: Lee Damon
This document was last modified
Copyright (c) 2001, University of Washington, UW/EE