6.4.9. Kickstart —

To satisfy the provisioning needs of customers, RHN provides this interface for developing kickstart profiles that can be used to install Red Hat Enterprise Linux on either new or already-registered systems. This enables systems to be installed automatically to particular specifications.


If your systems are connected to the central RHN Servers, you will need an external installation tree for each distribution to be kickstarted. This tree can be hosted anywhere that is accessible by the target system via HTTP. If the systems are connected through an RHN Proxy Server, then you may place the installation tree in /var/www/html/pub/ on the Proxy. RHN Satellite Servers already have a tree for each Red Hat distribution and therefore do not require separate trees. Even if the system connects through an RHN Proxy Server to get to the Satellite, these trees will be available for kickstart. Refer to Section, “Kickstart ⇒ Distributions — for instructions on setting up installation trees.
Kickstart Overview

Figure 6.7. Kickstart Overview

This overview page displays the status of kickstart on your client systems: the types and number of profiles you have created and the progress of systems that are scheduled to be kickstarted. In the upper right is the Kickstart Actions section, which contains a series of links to management actions for your kickstart profiles. Before explaining the various kickstart options that are available from this page, the next section provides some introduction to the subject of kickstart. Introduction to Kickstart

Many system administrators would prefer to use an automated installation method to install Red Hat Enterprise Linux on their machines. To answer this need, Red Hat created the kickstart installation method. Using kickstart, a system administrator can create a single file containing the answers to all the questions that would normally be asked during a typical installation.
Kickstart files can be kept on a single server system and read by individual computers during the installation. This installation method can support the use of a single kickstart file to install Red Hat Enterprise Linux on multiple machines, making it ideal for network and system administrators.
The Red Hat Enterprise Linux System Administration Guide contains an in-depth discussion of kickstart and is available here: http://www.redhat.com/docs/manuals/enterprise/. Kickstart Explained
When a machine is to receive a network-based kickstart, the following events must occur in this order:
  1. After being placed on the network and turned on, the machine's PXE logic broadcasts its MAC address and a request to be discovered.
  2. If a static IP address is not being used, the DHCP server recognizes the discovery request and extends an offer of network information needed for the new machine to boot. This includes an IP address, the default gateway to be used, the netmask of the network, the IP address of the TFTP or HTTP server holding the bootloader program, and the full path and file name of that program (relative to the server's root).
  3. The machine applies the networking information and initiates a session with the server to request the bootloader program.
  4. The bootloader, once loaded, searches for its configuration file on the server from which it was itself loaded. This file dictates which kernel and kernel options, such as the initial RAM disk (initrd) image, should be executed on the booting machine. Assuming the bootloader program is SYSLINUX, this file is located in the pxelinux.cfg directory on the server and named the hexadecimal equivalent of the new machine's IP address. For example, a bootloader configuration file for Red Hat Enterprise Linux AS 2.1 should contain:
    port 0 
    prompt 0 
    timeout 1 
    default My_Label 
    label My_Label 
          kernel vmlinuz 
          append ks=http://myrhnsatellite/ initrd=initrd.img network apic
  5. The machine accepts and uncompresses the init image and kernel, boots the kernel, and initiates a kickstart installation with the options supplied in the bootloader configuration file, including the server containing the kickstart configuration file.
  6. This kickstart configuration file in turn directs the machine to the location of the installation files.
  7. The new machine is built based upon the parameters established within the kickstart configuration file. Kickstart Prerequisites
Although Red Hat Network has taken great pains to ease the provisioning of systems, some preparation is still required for your infrastructure to handle kickstarts. For instance, before creating kickstart profiles, you may consider:
  • A DHCP server is not required for kickstarting, but it can make things easier. If you are using static IP addresses, you should select static IP while developing your kickstart profile.
  • An FTP server can be used in place of hosting the kickstart distribution trees via HTTP.
  • If conducting a bare metal kickstart, you should 1)Configure DHCP to assign required networking parameters and the bootloader program location. 2)Specify within the bootloader configuration file the kernel to be used and appropriate kernel options. Building Bootable Kickstart ISOs
While you can schedule a registered system to be kickstarted to a new operating system and package profile, it is also useful to be able to kickstart a system that is not registered with RHN, or does not yet have an operating system installed. One common method of doing this is to create a bootable CD-ROM that is inserted into the target system. When the system is rebooted, it boots from the CD-ROM, loads the kickstart configuration from the RHN Servers or your Satellite, and proceeds to install Red Hat Enterprise Linux according to the kickstart profile you have created.
To do this, copy the contents of /isolinux from the first CD-ROM of the target distribution. Then edit the isolinux.cfg file to default to 'ks'. Change the 'ks' section to the following template:
label ks 
kernel vmlinuz 
   append text ks={url} initrd=initrd.img lang= devfs=nomount ramdisk_size=16438 \
IP addressed-based kickstart URLs will look something like this:
The kickstart distribution selected by the IP range should match the distribution from which you are building, or errors will occur. {ksdevice} is optional, but looks like:
It is possible to change the distribution for a kickstart profile within a family, such as Red Hat Enterprise Linux AS 4 to Red Hat Enterprise Linux ES 4, by specifying the new distribution label. Note that you cannot move between versions (2.1 to 3) or between updates (U1 to U2).
Next, you may customize isolinux.cfg further for your needs, such as by adding multiple kickstart options, different boot messages, shorter timeout periods, etc.
Next, create the ISO as described in the Making an Installation Boot CD-ROM section of the Red Hat Enterprise Linux 3 Installation Guide. Alternatively, issue the command:
mkisofs -o file.iso -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 \ 
-boot-info-table -R -J -v -T isolinux/
Note that isolinux/ is the relative path to the directory containing the isolinux files from the distribution CD, while file.iso is the output ISO file, which is placed into the current directory.
You may then burn the ISO to CD-ROM. To use the disc (assuming you left the label for the kickstart boot as 'ks'), boot the system and type "ks" at the prompt. When you press Enter, the kickstart should begin. Integrating Kickstart with PXE
In addition to CD-ROM-based installs, RHN supports kickstarts through a Pre-Boot Execution Environment (PXE). This is less error-prone than CDs, enables kickstarting from bare metal, and integrates with existing PXE/DHCP environments.
To use this method, make sure your systems have network interface cards (NIC) that support PXE, install and configure a PXE server, ensure DHCP is running, and then place the appropriate files on an HTTP server for deployment. Once the kickstart profile has been created, use the URL from the Kickstart Details page, as for CD-ROM-based installs.
To obtain specific instructions for conducting PXE kickstarts, refer to the PXE Network Installations chapter of the Red Hat Enterprise Linux 4 System Administration Guide.


Upon running the Network Booting Tool as described in the Red Hat Enterprise Linux 4: System Administration Guide, ensure that you select "HTTP" as the protocol and include the domain name of the RHN Satellite Server in the Server field if you intend to use it to distribute the installation files.
The following sections describe the kickstart options available from the SystemsKickstart page. View a List of Kickstart Profiles

Kickstart Profiles

Figure 6.8. Kickstart Profiles

This page lists all profiles for your organization, whether those profiles are active, and the boot image to which that profile points. You can either create a new kickstart profile by clicking the create new kickstart profile link in the upper right or edit existing profiles by clicking in the name of the profile. Create a New Kickstart Profile

If you are not using RHN Satellite Server, and wish to develop a new kickstart profile, first create a distribution through the SystemsKickstartDistributions page. Refer to Section, “Kickstart ⇒ Distributions — for instructions. Once that is done, return to the Kickstart Overview page to create the Kickstart Profile.
Click on the Create a New Kickstart Profile link from the SystemsKickstart page to start the brief wizard that populates the base values needed for a kickstart profile.
  1. On the first page, enter a kickstart profile label and select a kickstartable tree for this profile. The kickstartable tree drop-down menu is only populated if one or more distributions have been created for the selected base channel.
  2. On the second page, select (or enter) the URL of the kickstart tree.
  3. On the third page, select a root password for the system. Be sure to follow the password recommendations from the Password Security section of the Red Hat Enterprise Linux Security Guide, available at http://www.redhat.com/docs/manuals/enterprise/.
The final stage of the wizard presents the Kickstart DetailsDetails tab. On this tab and the other sub-tabs, nearly every option for the new kickstart profile can be customized. The following sections describe the options available on each sub-tab. Kickstart Details ⇒ Details —
Kickstart Details

Figure 6.9. Kickstart Details

The figure above shows the sub-tabs that are available from the Kickstart Details tab.
From the Kickstart DetailsDetails sub-tab, you can:
  • Rename the profile
  • Change the operating system it installs by clicking (Change)
  • Deactivate the profile so that it cannot be used to schedule a kickstart by removing the Active checkmark
  • Select whether this profile is the default for all of your organization's kickstarts by checking or unchecking the box.
  • Enter comments that are useful to you in distinguishing this profile from others Kickstart Details ⇒ Operating System —
From this page, you can make the following changes to the operating system that the kickstart profile installs:
Change the base channel
Select from the available base channels, such as Red Hat Enterprise Linux AS version 4. Satellite customers see a list of all base channels that are currently synced to their Satellite.
File Location
The exact location from which the kickstart tree is mounted. This value is determined when the profile is created. You can view it on this page but you cannot change it. Kickstart Details ⇒ Advanced Options —
From this page, you can toggle several installation options on and off by checking and unchecking the boxes to the left of the option. For most installations, the default options are correct. The Red Hat Enterprise Linux System Administration Guide discusses each of these options in detail. Kickstart Details ⇒ Bare Metal Kickstart —
This sub-tab provides the information necessary to kickstart systems that are not currently registered with RHN. Using the on-screen instructions, you may either kickstart systems using boot media (CD-ROM) or by IP address. System Details ⇒ Details —
System Details

Figure 6.10. System Details

The figure above shows the sub-tabs that are available from the System Details tab.
From the System DetailsDetails sub-tab, you can:
  • Select from DHCP and static IP, depending on your network
  • Choose the level of SELinux that is configured on kickstarted systems
  • Enable configuration management or remote command execution on kickstarted systems
  • Change the root password associated with this profile System Details ⇒ Locale —
From this sub-tab, you can change the timezone associated with kickstarted systems. System Details ⇒ Partitioning —
From this sub-tab, you can indicate the partitions that you wish to be created during installation. For example:
partition /boot --fstype=ext3 --size=200 
partition swap --size=2000 
partition pv.01 --size=1000 --grow 
volgroup myvg pv.01 logvol / --vgname=myvg --name=rootvol --size=1000 --grow System Details ⇒ File Preservation —
If you have previously created a file preservation list, you may include that list as part of the kickstart. This will prevent the files in that list from being over-written during the installation process. Refer to Section, “Kickstart ⇒ File Preservation — for information on how to create a file preservation list. System Details ⇒ GPG and SSL —
From this sub-tab, select the GPG keys and/or SSL certificates to be imported to the kickstarted system during the %post section of the kickstart. For Satellite customers, this list includes the SSL Certificate used during the installation of the Satellite.


Any GPG key you wish to import to the kickstarted system must be in ASCII rather than binary format. System Details ⇒ Troubleshooting —
From this sub-tab, you can change information that may help with troubleshooting hardware problems:
For some headless systems, it is better to select the non-graphic LILO bootloader.
Kernel Parameters
Enter kernel parameters here that may help to narrow down the source of hardware issues. Software ⇒ Package Groups —

Figure 6.11. Software

The figure above shows the sub-tabs that are available from the Software tab.
Enter the package groups, such at @office or @admin-tools you would like to install on the kickstarted system in the large text box on this page. If you would like to know what package groups are available, and what packages they contain, refer to the RedHat/base/ file of your kickstart tree. Satellite customers will most likely locate this file here: /var/www/satellite/rhn/kickstart/<kickstart label>/RedHat/base/comps.xml. Software ⇒ Package Profiles —
If you have previously created a Package Profile from one of your registered systems, you can use that profile as a template for the files to be installed on a kickstarted system. Refer to Section, “System Details ⇒ Software ⇒ Packages” for more information about package profiles. Activation Keys —
Activation Keys

Figure 6.12. Activation Keys

The Activation Keys tab, which has no sub-tabs, allows you select Activation Keys to include as part of the kickstart profile. These keys, which must have been created previous to creating the kickstart profile, will be used when re-registering kickstarted systems. Scripts —

Figure 6.13. Scripts

The Scripts tab, which has no sub-tabs, is where %pre and %post scripts are created. This page lists any scripts that have already been created for this kickstart profile. To create a new kickstart script:
  1. Click the add new kickstart script link in the upper right
  2. Enter the path to the scripting language used to create the script, such as /usr/bin/perl
  3. Enter the full script in the large text box
  4. Indicate whether this script is to be executed in the %pre or %post section of the kickstart process
  5. Indicate whether this script is to run outside of the chroot environment. Refer to the Post-installation Script section of the Red Hat Enterprise Linux System Administration Guide for further explanation of the nochroot option


RHN supports the inclusion of separate files within the Partition Details section of the kickstart profile. For instance, you may dynamically generate a partition file based on the machine type and number of disks at kickstart time. This file can be created via %pre script and placed on the system, such as /tmp/part-include. Then you can call for that file by including the following line within the Partition Details field of the System DetailsPartitioning tab:
 %include /tmp/part-include Kickstart File —
Kickstart File

Figure 6.14. Kickstart File

The Kickstart File tab, which has no sub-tabs, allows you to view or download the kickstart profile that has been generated from the options chosen in the previous tabs. Kickstart ⇒ Bare Metal —

Lists the IP addresses that have been associated with kickstart profiles created by your organization. Click either the range or the profile name to access different tabs of the Kickstart Details page. Kickstart ⇒ GPG and SSL Keys —

Lists keys and certificates available for inclusion in kickstart profiles and provides a means to create new ones. This is especially important for customers of RHN Satellite Server or RHN Proxy Server because systems kickstarted by them must have the server key imported into RHN and associated with the relevant kickstart profiles. Import it by creating a new key here and then make the profile association in the GPG and SSL keys subtab of the Kickstart Details page.
To develop a new key/certificate, click the create new stored key/cert link in the upper-right corner of the page. Enter a description, select the type, upload the file, and click the Update Key button. Note that a unique description is required.


The GPG key you upload to RHN must be in ASCII format. Using a GPG key in binary format causes anaconda, and therefore the kickstart process, to fail. Kickstart ⇒ Distributions —

Enables you to identify custom installation trees that may be used for kickstarting. (Satellite users should note that this does not display Red Hat distributions provided to them. They can be found within the Distribution dropdown menu of the Kickstart Details page.) Before creating a distribution, you must make an installation tree available, as described in the Kickstart Installations chapter of the Red Hat Enterprise Linux System Administration Guide. This tree must be located in a public directory on an HTTP or FTP server.


RHN Satellite Server users should note that channels imported with satellite-sync are made available automatically and do not require the creation of a separate installation tree. These trees are available to client systems that kickstart through the Satellite. While you may be able to access the files from a non-kickstarting client, this functionality is not supported and may be removed at any time in the future.
To create a new distribution, enter an intuitive label (without spaces) in the Distribution Label field, such as my-orgs-rhel-as-5. In the External Location field, paste the URL to the base of the installation tree. (You can test this by appending "README" to the URL in a Web browser, pressing Enter, and ensuring that the distribution's readme file appears.)
In the Kickstart RPM field, enter the auto-ks kernel image for the distribution. You can find all of the available packages by searching packages for "auto-kickstart". Identify the appropriate package based upon the distribution to be kickstarted. It should look something like, "auto-kickstart-ks-rhel-i386-as-5". Strip everything preceding the "ks" to derive the boot image. For instance, in the above example, you would enter "ks-rhel-i386-as-5" in the Kickstart RPM field.
Select the matching distribution from the Base Channel and Installer Generation dropdown menus, such as Red Hat Enterprise Linux AS (v.4 for x86) and Red Hat Enterprise Linux 4, respectively. When finished, click the Create button. Kickstart ⇒ File Preservation —

Collects lists of files to be protected and re-deployed on systems during kickstart. For instance, if you have many custom configuration files located on a system to be kickstarted, enter them here as a list and associate that list with the kickstart profile to be used.
To use this feature, click the create new file preservation list link at the top and enter a relevant label and all files and directories to be preserved on the resulting page. Enter absolute paths to all files and directories. Then click Create List.


Although file preservation is useful, it does have limitations. First, each list is limited to a total size of 1 MB. Further, special devices like /dev/hda1 and /dev/sda1 are not supported. Finally, only file and directory names may be entered. No regular expression wildcards can be included.
When finished, you may include the file preservation list in the kickstart profile to be used on systems containing those files. Refer to Section, “Create a New Kickstart Profile” for precise steps.