Kickstart (Linux)

Last updated

The Red Hat Kickstart installation method is used by Fedora, Red Hat Enterprise Linux and related Linux distributions to automatically perform unattended operating system installation and configuration. Red Hat publishes Cobbler as a tool to automate the Kickstart configuration process. [1]

Contents

Usage

Kickstart is normally used at sites with many such Linux systems, to allow easy installation [2] and consistent configuration of new computer systems.

Kickstart configuration files can be built three ways:

  1. By hand.
  2. By using the GUI system-config-kickstart tool.
  3. By using the standard Red Hat installation program Anaconda.

Anaconda will produce an anaconda-ks.cfg configuration file at the end of any manual installation. This file can be used to automatically reproduce the same installation or edited (manually or with system-config-kickstart).

Structure

The kickstart file is a simple text file, containing a list of items, each identified by a keyword.

While not strictly required, there is a natural order for sections that should be followed. Items within the sections do not have to be in a specific order unless otherwise noted. The section order is:

The %packages, %pre, %pre-install, %post, %onerror, and %traceback sections are all required to be closed with %end.

Items that are not required for the given installation run can be omitted.

Lines starting with a pound sign (#) are treated as comments and are ignored.

If deprecated commands, options, or syntax are used during a kickstart installation, a warning message will be logged to the anaconda log. Since deprecated items are usually removed within a release or two, it makes sense to check the installation log to make sure you haven’t used any of them. When using ksvalidator, deprecated items will cause an error.

Example

A simple Kickstart for a fully automated Fedora installation.

# use Fedora mirror as installation source, set Fedora version and target architecture url--mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-33&arch=x86_64  # set installation language langen_US.UTF-8  # set keyboard keyboardus  # set root password rootpw12345# create a sudo capable user user--namewikipedia-user--password12345--groups=wheel  #set timezone timezoneAmerica/New_York  # clear all existing storage (!) zerombr clearpart--all--initlabel  # automatically create default storage layout autopart  %packages # install the Fedora Workstation environment @^FedoraWorkstation # install some package groups @3DPrinting @CDevelopmentToolsandLibraries @SystemTools # install some packages vim git mc %end 

See also

References