Kickstart is a system for automated installation of Red Hat Linux or Fedora Linux. These notes describe the "Kick Me" CD for quickly installing and configuring Linux via kickstart. This is especially useful when setting up a large cluster of computers.
Last updated: 14 December 2007
Kick Me is a modified installation CD image created to perform a custom installation of Red Hat or Fedora Linux using Kickstart. (Previous releases of Kick-Me were on floppy disks.) These notes describe how to create a Kick Me CD, and how the disk works. This installation scheme should scale fairly easily to a much larger cluster, provided only that machines in the cluster will boot from the CD drive. It can be modified so that the installation and customization are done via a network connection rather than from the CD (or some combination of both).
Manual intervention is only required to get the process started, and to change CDs during the installation. Everything else is automated in the kickstart configuration file and supporting scripts.
After the initial installation the system will reboot and then go through a brief dialogue to give the system it's name and IP address. It will then reboot itself again with the proper network configuration.
Brief History
The "Kick Me" disks were originally created for Red Hat Linux 6.2. The boot disks Red Hat provided for RH 6.2 did not have room for an extra Kickstart configuration file - they were full to the gills! A modified version of the installation disk was therefore created with enough room to insert a very small kickstart configuration file. As the kickstart configuration evolved the disks needed a name and verison numbers, and so they were called the "Kick Me" disks.In Red Hat 7.x a little room was left on the default installation images for a kickstart configuration file, though not very much. The Kick Me disks contained a bootable installer and a small kickstart configuration file which could copy to the target some extra installation scripts and rpms.
In Fedora Core 3 it was not possible to boot the installer from a floppy disk -- you needed to boot from the first installation CD. But you could then still use kickstart and get the kickstart configuration files from a floppy drive. You can still do that now. So the Kick Me 2.x disks contained just the kickstart configuration files, but were not bootable install disks.
For Fedora Core 6 the bootable installation CD disc1 was modified to contain the kickstart configuration and supporting files, so there is no need for a floppy drive. The initial installation is all done from the CD set rather than the network. The Kick Me 3.x disk is thus a drop-in replacement for install disc 1. A script called KickMe.sh will build a bootable Kick Me CD from the bare installer CD.
The Kick Me floppies are now deprecated, but information about them is still available from this separate page.
Creating a Kick Me CD
Instead of providing a disk image I now provide a shell script which can be used to create a disk image. While the task is automated, you need to provide various components which are put on the CD. You also need to provide a bare install CD (disc 1).To create a Kick Me CD you must:
Read the steps below in detail to see which files you need to modify to customize your own installation.
- Obtain the KickMe.sh shell script. Edit it to change some of the parameters at the beginning to match your own installation.
- Run the script, and when asked to do so load a standard Fedora or Red Hat installation disc 1. This disc will be copied to create an initial filesystem image in $IMAGEDIR.
- The script will then copy customized boot messages and configuration files from $CONFIG/isolinux and $CONFIG/kick-me to $IMAGEDIR. You need to put in place the proper files (described below) to customize your installation.
- The script will then eject the install disc1, so that you can load a blank CD. While you are doing that, it will build an ISO image of $IMAGEDIR, named $IMAGE (probably kick-me.iso).
- Whe you give the go-ahead, the script will burn the CD.
Overview of all the Kickstart steps
While kickstart provides the basic framework on which the Kick Me disks are based, the installation uses a number of separate steps. There are several opportunities in these steps for customization, so it may be helpful to first get an overview of these steps:Each of these steps may be customized, as described in detail below.
- The machine boots from an installer kernel on the CD, and gives you several boot options. You can do a regular, interactive installation just as you could with the standard installation, but you will likely want to select a kickstart installation. The default, if you just press ENETER, is to use ks.cfg See the section on the Boot menu for how you can customize this step.
- The installation proceedes using the options specified in /cdrom/kick-me/ks.cfg (or some other kickstart configuration file in that directory). See the section on the Kickstart configuration for how you can customize this step.
- Before the packages are installed, a "scriptlet" in the file ks.cfg is executed. This is used to show a status message about the customized installation, as otherwise nothing shows on the screen. It is also used to import GPG keys from the install disk, so that digital signatures of packages can be verified.
- After the packages are installed another "scriptet" is run, also from the ks.cfg file. The main thing this does is copy the kick-me subdiretory from the CD to the installation root directory. This directory will contain, among other things, a possibly more detailed script called ks.sh.
- If the script ks.sh is in the kick-me subdirectory then it is executed, in a chroot environment such that the mounted filesystems are those of the configured system. This script then performs a number of steps to configure the system:
The floppy version of the Kick Me ks.cfg copied ks.sh from the network rather than from the CD. It is straightforward to include this.
- Turns various services on or off
- Creates directories which are needed later.
- Installs the "autorpm" package, which can be used to update packages
- Unpacks a tarball containing system configuration files. This makes it very easy to customize a new node by putting any customized files in this tarball.
- Copies a version of the file rc.local to the machine so that it will be run at the next reboot. This can be any file, but most likely it is a "one time" version of the file, which runs once and then replaces itself with some other version of the file (or nothing at all). This allows for system configuration after a reboot, such as setting the hostname or network configuration.
- Adds NFS mounts to /etc/fstab, if desired. (Exporting to the subnet and running the automounter makes this less necessary.)
- Saves copies of the kernel and kernel modules, so that they can be restored in case one wants to back out of a kernel update. (The default is to remove them when a kernel package is updated.)
- Runs autorpm to install any local rpm package which were in /cdrom/kick-me/rpm. These would be packages which are not a part of the default Fedora/Red Hat collection.
Boot menu
You can customize the boot menu message and option by editing two files in /cdrom/isolinuxYou can also edit any of the other .msg files, or add your own.
- boot.msg
- Contains the message which is initially displayed when the system is booted from the CD. Be careful of tabs, they will screw up the formatting. You can change the color of text by using ctrl-O followed by a two digit color code, but be advised that if you load a spash image (suing ctrl-X) then the colors come from the palate of that image instead of the default palate.
- isolinux.cfg
- Contains the actions to be taken when the user presses a function key or when they enter text at the "boot:" prompt. The examples should make this clear.
Perhaps the most important thing to note is that you specify the use of kickstart and the location of the kickstart configuration file here, in the list of parameter to be passed to the boot kernel. For example:
label ks kernel vmlinuz append initrd=initrd.img ks=cdrom:/kick-me/ks.cfg label basic kernel vmlinuz append initrd=initrd.img ks=cdrom:/kick-me/ks-basic.cfgEntering "ks" at the "boot:" prompt will run kickstart using the file ks.cfg, but entering "basic" will use the alternate configuration file ks-basic.cfgKickstart configuration file
Additional choices
* Note that KickMe.sh takes the default ks.cfg and makes two other configuation files from it, which it puts in /cdrom/kick-me on the CD. 1. ks-interactive.cfg uncomments the "#interactive" line in ks.cfg, resulting in an interactive installation, but with default values taken from the config file. 2. ks-wipe.cfg changes "clearpart --linuxarpart", which only clears existing Linux partitions, to "clearpart --all", which clears all partitions, for Linux or Windows or whatever. This will delete everything on the hard drive, so use it cautiously, and never make this the default.Pre-install scriptlet
Any script commands in the %pre section of ks.cfg are run before all the packages are installed.Post-install scriptlet
ks.sh script
rc.local script
post-reboot tasks
Package updates
Copyright © 2007 by Spy Hill Research http://www.Spy-Hill.com/~myers/linux/kickstart/kick-me.html (served by Islay.spy-hill.com) Last modified: 14 December 2007