Redhat Kickstart

Kickstart is a special procedure allowing Redhat based distributions(Centos, Oracle Unbreakable Linux, Scientific Linux) to be installed automatically. This happens by reading all the answers to the installation questions from a file called ks.cfg. If there is no answer to an installation question, e.g. what is the root password, you will be prompted for the answer during the installation process.

The first uncommented line in the ks.cfg should tell the installer whether we are going through a new install or we are performing an upgrade. The lines specifiy the installation media (nfs, ftp, http or local media), language, keyboard layout, partitioning scheme, networking, root password and other essential options for the installation. For all the options check the official Redhat documentation.

Once all the installation options are specified comes the part telling which options should be installed -  %package. This option accepts inline arguments about resolving dependencies and ignoring missing packages. On the following rows you can explicitly specify whether a package / group of packages to be installed. Example:

%packages --resolvdeps 
@base 
@editors
-kudzu

The above will make sure that base system is installed along with editors resolving all dependencies but excluding kudzu from the installation.

Note that if you perform an upgrade %packages is NOT supported.

Finally comes the best part: %post. There you can add any shell scripts giving you great power and flexibility.

Once you have your kickstart ks.cfg file you need to place it on a location available during installation. This can be either a local media or a network location.

Using kickstart during installation can save you a lot of time, efforts and ensure that best practices are followed.

blog comments powered by Disqus