February 21, 2019

Case Study: Clusters and Image Processing, Part II - page 6

The ImageLink Case, Reviewed

  • March 25, 2002
  • By Dee-Ann LeBlanc

To create a Kickstart installation file (a Red Hat feature) for a cluster of identical machines, perform the following steps as root:

  1. Perform the initial installation on one of the machines.

NOTE: Do not proceed to any configuration outside of the install yet!

  1. Type rpm -mkkickstart to see if the default Kickstart building package is installed.
  2. If the package is installed, proceed to Step 9. Otherwise, insert your Red Hat CD-ROM into your CD-ROM drive.
  3. Type mount /mnt/cdrom to mount the CD-ROM onto the file system.
  4. Type cd /mnt/cdrom/RedHat/RPMS to change to the packages directory.
  5. Type rpm -ivh mkkick and press Tab to complete the file name. Then, press Enter to install the package.
  6. Type cd / (or anywhere else outside the CD-ROM portion of the file system).
  7. Type umount /mnt/cdrom. When the CD-ROM is properly removed from the file system, you can eject it from the drive.
  8. Decide what directory you want to initially write this Kickstart default file to. (I'll assume you're using the root home directory.)
  9. Decide what options you want to use when building the file. Available options are listed in Table 9.

Table 9 Options for the mkkickstart command.




Uses the BOOTP protocol to get addressing information for this machine.


Uses the DHCP protocol to get addressing information for this machine.

--nfs host:path

Looks for the installation packages on the NFS server specified.


Includes no networking information.


Includes no X Windowing System information.


Displays KickStart version information.

  1. Type mkkickstart options > ~/ks.cfg. For example, to use an NFS server to provide the installation files, you might type this:
      mkkickstart --nfs cluster1:/export/distro > ~/ks.cfg
  1. Now that you have the initial file, open it in your favorite editor.
  2. The Kickstart file is broken into sections. The start is just a series of commands that, together, answer the installation questions about hardware, settings, and more. For example, you might have the following entries (which each must be on a single line, any breaks here have a backslash on the end and are for formatting purposes):
      lang en_US    
      #network --static --ip --netmask \
      device ethernet tulip
      keyboard "us"    
      zerombr yes
      clearpart --linux    
      mouse generic --emulthree --device ttyS0    
      timezone America/New_York
      xconfig --server "Mach64" --monitor "generic monitor"    
      rootpw --iscrypted $1$GWyam/UH$MqjJjrF7IJY/Cpji.MasT0
      auth --useshadow --enablemd5    
      lilo --location mbr

    Examine each entry for accuracy. Table 10 outlines the configuration items in the preceding code, and Table 11 explains the instructions in the same section.

Table 10 Kickstart configuration entries in sample code.





Sets the options used in user and program authentication. You can access this information after an installation with the authconfig command. What you see in the example is a standard option list: --enablemd5, --enablenis, --nisdomain, --nisserver, --useshadow.


Sets the type of keyboard used on your machines.

This feature has an incredibly long list of options. See the Red Hat Reference Guide for your Red Hat version for the current list.


Sets the language you want to use to interact with Linux.

cs_CZ, en_US, fr_FR, de_DE, hu_HU, is_IS, id_ID, it_IT, ja_JP.ujis, no_NO, pl_PL, ro_RO, sk_SK, sl_SI, es_MX, ru_RU.KOI8-R, uk_UA.


Sets how to handle the LILO installation.

--append kernel_parameters, --linear, --location mbr, --location partition, or location -none.


Sets which mouse the system is using. Do not include this information if the mice vary. You can make separate KickStart files for different mice.

Multiple. First, you need the mouse type. You can get a list of all types by using the mouseconfig command. After this, you can have --device /dev/device and/or -emulthree.


Sets network information. Leave this out if you want to do networking separately. In the example, the networking is commented out so that it will not be set.

--bootproto=dhcp, --bootproto=bootp, --bootproto=static, --ip=ip_address, --gateway=gatewayIP, --nameserver=nameIP, --netmask=mask.


Sets the root login password.

textpassword, --iscrypted=encryptedpassword.


Sets the time zone the machine is located in.

The list of time zones is quite long. Use the timeconfig program to see which zone you should use.


Configures X Windowing System information. If you leave this out, the installer will skip X configuration. You can use Xconfigurator to get the card type and monitor type, or you can let the installer probe to see if you have a PCI video card.

--card=cardtype, --hsync=hvalue, --monitor=montype, --noprobe, --vsync=vvalue, --startxonboot.

TIP: If you leave a piece of information out of the Kickstart configuration file, you will be asked to enter it manually during the installation. This can be useful for times when the hardware is not the same from machine to machine.

Table 11 Kickstart instruction entries in sample code.





Installs from the CD-ROM drive.



Removes old partitions before creating new ones.

--all, --linux


Performs a new Linux installation.



Deletes invalid partition table entries.


  1. Look for the portion of the Kickstart configuration file that begins with the text "%packages." This section should not start too far down in the file but is by far the larger part of it. Each RPM that was installed on the machine you're using to make the default file is listed here. Remove any that you know you won't want on the other machines. You can even add any package names you want. If you have files in another location (not in the Red Hat CD-ROM's /RedHat/RPMS directory copy that's on the NFS or other file server ) to add as well, wait for the next section.
  2. At the end of the file is the text "%post." This begins the last section, which is currently empty. Here is where you can go nuts with your shell-scripting abilities and add any of the files that are in a different part of the file server, and more.
  3. From here on, return to the machine you are using as the base and begin configuring it. Echo all configuration commands as shell script commands in the Kickstart configuration file.
  4. When you are happy with the results, save and exit the file.
  5. In order to run the automated installation, you have to have a KickStart boot disk. Get a blank floppy (or at least one that you don't need the data on).
  6. Insert your Red Hat CD-ROM into your CD-ROM drive.
  7. Type mount /mnt/cdrom to mount the CD-ROM onto the file system.
  8. Make a boot disk by typing dd if=/mnt/cdrom/images/boot.img of=/dev/fd0. It may take 30 seconds or so for the process to finish.
  9. Mount the new boot floppy onto your file system by typing mount -t vfat /dev/fd0 /mnt/floppy.
  10. Type rpm -q mcopy to see if the mcopy RPM is installed.
  11. If the RPM is not installed, type rpm -ivh /mnt/cdrom/RedHat/RPMS/mcopy and press Tab to complete the file name. Then press Enter to install the package.
  12. Type mcopy ~/ks.cfg /mnt/floppy to copy the Kickstart configuration file onto the boot disk.
  13. Use your favorite editor to open the new file syslinux.cfg.
  14. Enter the following to avoid having to enter anything at the installer's boot prompt:
      default ks    
      prompt 0
      label ks
        kernel vmlinuz
        append ks=floppy initrd=initrd.img
  1. Save and exit the file.
  2. Replace the syslinux.cfg file on the floppy with this one.
  3. Remove the floppy from the file system by typing umount /dev/fd0.
  4. Once you have the NFS server up and running, give your Kickstart installation a try!

Most Popular LinuxPlanet Stories