Show Table of Contents
28.4. Automating the Installation with Kickstart
You can allow an installation to run unattended by using Kickstart. A Kickstart file specifies settings for an installation. Once the installation system boots, it can read a Kickstart file and carry out the installation process without any further input from a user.
The Red Hat Enterprise Linux installation process automatically writes a Kickstart file that contains the settings for the installed system. This file is always saved as
/root/anaconda-ks.cfg. You may use this file to repeat the installation with identical settings, or modify copies to specify settings for other systems.
Firstboot does not run after a system is installed from a Kickstart file unless a desktop and the X Window System were included in the installation and graphical login was enabled. Either specify a user with the
useroption in the Kickstart file before installing additional systems from it (refer to Section 32.4, “Kickstart Options” for details) or log into the installed system with a virtual console as root and add users with the
Red Hat Enterprise Linux includes a graphical application to create and modify Kickstart files by selecting the options that you require. Use the package
system-config-kickstartto install this utility. To load the Red Hat Enterprise Linux Kickstart editor, choose → → .
Kickstart files list installation settings in plain text, with one option per line. This format lets you modify your Kickstart files with any text editor, and write scripts or applications that generate custom Kickstart files for your systems.
To automate the installation process with a Kickstart file, use the
ksoption to specify the name and location of the file:
You may use Kickstart files that are held on either removable storage, a hard drive, or a network server. Refer to Table 28.2, “Kickstart sources” for the supported Kickstart sources.
Table 28.2. Kickstart sources
|Kickstart source||Option format|
|DVD drive|| |
|Hard Drive|| |
|Other Device|| |
|HTTP Server|| |
|HTTPS Server|| |
|FTP Server|| |
|NFS Server|| |
You can use a device name such as
/dev/sdbto identify a hard drive or a USB drive containing a Kickstart file. However, there is no guarantee that the device identifier will remain the same on multiple systems. Therefore, the recommended method for specifying a hard drive or a USB drive in Kickstart installations is by UUID. For example:
You can determine a device's UUID by using the
blkid /dev/sdb1/dev/sdb1: UUID="2c3a072a-3d0c-4f3a-a4a1-ab5f24f59266" TYPE="ext4"
To obtain a Kickstart file from a script or application on a Web server, specify the URL of the application with the
ks=option. If you add the option
kssendmac, the request also sends HTTP headers to the Web application. Your application can use these headers to identify the computer. This line sends a request with headers to the application http://server.mydomain.com/kickstart.cgi:
linux ks=http://server.mydomain.com/kickstart.cgi kssendmac