Creating the CentOS Kickstart File

The Kickstart file is a text file, containing a list of items, each identified by a keyword. This file can be generated using the Red Hat Kickstart Configurator application, or it can be written from scratch. The Red Hat Enterprise Linux installation program also creates a sample Kickstart file based on the options selected during installation. It is written to the file /root/anaconda-ks.cfg in this case. This file is editable using most text editors.

Generating a System Image

  1. Create a Kickstart file.

  2. Create a boot media with the Kickstart file or make the Kickstart file available on the network.

  3. Make the installation tree available.

  4. Start the Kickstart installation.

#76 Creating a New System Image Definition Tree from an Existing One
# Starting from the Kickstart root directory (`/var/www/files` by default)
mkdir newdir
cd newdir/

# In this example, the pre-existing system image definition tree is for CentOS 7.4 located in `centos74`
cp -r ../centos74/* .
vim ks.src
vim isolinux/isolinux.cfg
cd ..
vim osversions.json

ks.src is a standard, Kickstart-formatted file that the will be used to create the Kickstart (ks.cfg) file for the install whenever a system image is generated from the source tree. ks.src is a template - it will be overwritten by any information set in the form submitted from Tools ‣ Generate ISO in Traffic Portal. Ultimately, the two are combined to create the final Kickstart file (ks.cfg).

Note

It is highly recommended for ease of use that the system image source trees be kept under 1GB in size.

See also

For in-depth instructions, please see Kickstart Installation in the Red Hat documentation.