Linux Training : d. kickstart

Kickstart

Kickstart is a process that uses a configuration file and a OS installation source to automate the installation of RHEL (and Fedora and CentOS). By default, every RHEL install creats a file int he /root directory called anaconda-ks.cfg . This is a kickstart file that can be reused to create a clone of the system. The configuration file begins like:

install
url --url http://yum/pub/rhel5/os/clientcomb/x86_64/
key --skip
lang en_US.UTF-8
keyboard us
xconfig --startxonboot --defaultdesktop gnome --videoram 131072 --resolution 1280x1024 --depth 16
network --device eth0 --bootproto dhcp
rootpw --iscrypted $1$QoomNX7m$hT4zEi.btym.ehx/niZSG0
firewall --enabled --port=22:tcp --port=22:tcp --port=80:tcp --port=8443:tcp
authconfig --enableshadow --enablemd5
selinux --enforcing
timezone --utc America/New_York
bootloader --location=mbr --driveorder=sda --append="rhgb quiet" --md5pass=$1$jRzd3Se1$NBaTGvuRUjQ5QGIDwimxx.
# The following is the partition information you requested
# Note that any partitions you deleted are not expressed
# here so unless you clear all partitions first, this is
# not guaranteed to work
#clearpart --all --initlabel --drives=sda
#part /boot --fstype ext3 --size=100 --ondisk=sda
#part pv.100000 --size=0 --grow --ondisk=sda
#volgroup VolGroup70 --pesize=32768 pv.100000
#logvol swap --fstype swap --name=LvSwap --vgname=VolGroup70 --size=256 --grow --maxsize=1024
#logvol / --fstype ext3 --name=LvRoot --vgname=VolGroup70 --size=2048 --grow
#logvol /var/log --fstype ext3 --name=LvLogs --vgname=VolGroup70 --size=200 --grow --maxsize=4096

The url line tells where to get the OS for download. Most of the rest is self-explanatory. The section dealing with how to setup the disks is by default commented out in the anaconda-ks.cfg. If the disk layout is to be reused, those lines must be uncommented. Anaconda supports software RAID and LVM fully.
The full kickstart command list can be found here

Below is an edited copy of an anaconda_kickstart.cfg file.

# Kickstart file automatically generated by anaconda.

install
url --url http://yum/pub/rhel5/os/clientcomb/x86_64/
key --skip
lang en_US.UTF-8
keyboard us
xconfig --startxonboot --defaultdesktop gnome --videoram 131072 --resolution 1280x1024 --depth 16
network --device eth0 --bootproto dhcp
rootpw --iscrypted $1$QoomNX7m$hT4zEi.btym.ehx/niZSG0
firewall --enabled --port=22:tcp --port=22:tcp --port=80:tcp --port=8443:tcp
authconfig --enableshadow --enablemd5
selinux --enforcing
timezone --utc America/New_York
bootloader --location=mbr --driveorder=sda --append="rhgb quiet" --md5pass=$1$jRzd3Se1$NBaTGvuRUjQ5QGIDwimxx.
# The following is the partition information you requested
# Note that any partitions you deleted are not expressed
# here so unless you clear all partitions first, this is
# not guaranteed to work
#clearpart --all --initlabel --drives=sda
#part /boot --fstype ext3 --size=100 --ondisk=sda
#part pv.100000 --size=0 --grow --ondisk=sda
#volgroup VolGroup70 --pesize=32768 pv.100000
#logvol swap --fstype swap --name=LvSwap --vgname=VolGroup70 --size=256 --grow --maxsize=1024
#logvol / --fstype ext3 --name=LvRoot --vgname=VolGroup70 --size=2048 --grow
#logvol /var/log --fstype ext3 --name=LvLogs --vgname=VolGroup70 --size=200 --grow --maxsize=4096

%packages
@base
@office
@mysql
@admin-tools
@editors
@system-tools
@gnome-software-development
@text-internet
@x-software-development
@legacy-network-server
@gnome-desktop
@dialup
@authoring-and-publishing
@network-server
@legacy-software-development
@smb-server
@base-x
@graphics

<snip>

vsftpd
glibc.i686
glibc-devel
libgcc
libattr
cracklib
audit-libs
-rwho
-dovecot
-rusers
-sendmail
-oprofile

It is possible to have a kickstart file be presented as part of a pxeboot/netboot process to fully automate system installation for new hardware.

return to prior page