Automated Installation with kiskstart


Red Hat Linux has developed kickstart tool for automated installations. A kickstart configuration file is used as response file on the installation process in order to get a full automatic installation. Actually there are two methods for creating the kickstart configuration file :

* anaconda-ks.cfg file from /root, contains the kickstart configuration file with the installation parameters used on the local installation. This file is created by Anaconda, the Red Hat installation program, and can be used as template to generate a custom kickstart configuration file .

* system-config-kickstart, creates a custom kickstart configuration file for new installations.

Kickstart configuration file

The following is a commented kickstart configuration file :

$ cat /root/anaconda-ks.cfg

# Kickstart file automatically generated by anaconda.
# Start the installation process
# The installation source that can be local 'cdrom', remote http 'url --url http://', remote ftp 'url --url ftp://' or remote nfs 'nfs --server=serverip --dir=/instdir'
url --url http://server/Centos54
# Skip registration process
key --skip
# Language used during the installation process
lang en_US.UTF-8
# Keyboard configuration
keyboard us
# System graphical configuration. It starts X Server boot
xconfig --startxonboot
# System network configuration. It can also be a fixed via dhcp with 'network --device eth0 --bootproto dhcp'
network --device eth0 --bootproto static --ip --netmask --gateway --nameserver --hostname node01
# Sets the root password. This password can be copied from /etc/shadow
rootpw --iscrypted $1$BjKJOwe$1pHW4VDq4a5HmdCFRd.YT/
# Firewall configuration. The firewall is active and allowing connections only to 22/tcp (ssh) port
firewall --enabled --port=22:tcp
# By default, the authconfig command sets up the Shadow Password Suite (--enableshadow) and MD5 encryption (--enablemd5)
authconfig --enableshadow --enablemd5
# SElinux configuration. If do not know what is use 'selinux --disabled'
selinux --enforcing
# System clock configuration
timezone --utc Europe/Madrid
# GRUB configuration
bootloader --location=mbr --driveorder=sda --append="rhgb quiet"

# 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
# Remove all Linux partitions on the unique disk on the system : sda
clearpart --linux
# /boot primary partition of 100M size ext3 on sda
part /boot --fstype ext3 --size=100 --asprimary
# PV Physical Volume 6G primary partition on sda
part pv.8 --size=6000 --asprimary
# Volgroup Volgroup00 generation on PV
volgroup VolGroup00 --pesize=32768 pv.8
# Logical Volume LVM 4G partition for /
logvol / --fstype ext3 --name=LogVol00Root --vgname=VolGroup00 --size=4000
# Logical Volume LVM 1024M partition for swap
logvol swap --fstype swap --name=LogVol00Swap --vgname=VolGroup00 --size=1024
# RPMs to be installed: @ means rpms group and - means uninstallation
# After the installation we can execute an script/command

Kickstart execution

Once the kickstart configuration file ks.cfg has been created from anaconda-ks.cfg or using system-config-kickstart tool the next step is make it available to the installation process via cdrom, nfs, http, etc. Then the installation process must be executed using the first Centos installation CD, the Redhat installation DVD or a diskless installation image from a TFTPBOOT server and at 'boot :' stage depending the method the kickstart is available must be typed :

boot: linux ks=cdrom:/ks.cfg
boot: linux ks=nfs:server:/ks.cfg
boot: linux ks=http:server:/ks.cfg

boot:linux ks=ftp:server:/ks.cfg

No comments:

Post a Comment