Thursday, September 1, 2011

Redhat KickStart Installation step by step guide

To use kickstart, you must:
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.


Genral Installation and automatic creation of kickstart file

step 1 : Connect system to DHCP network
Step 2 : Boot your system using Redhat boot media.
Step 3 : Enter command "linux askmethod" at boot prompt and press enter.
step 4 : Follow the installation process till it asks for Installation Method.

The options for installation method incude.

Local CDROM
Hard Drive
NFS Image  ( Network installation )
FTP  ( Network installation )
HTTP ( Network installation )

Select your method and install accordingly.

After installation /root/anaconda-ks.cfg file is automatically created during Install.

/root/anaconda-ks.cfg can be used as a template for future installation.

It is a scripted installation process.

we can manually configure with System-Config-Kickstart

Check systax of Kickstart file with : ksvalidator

Once you are ready with Kickstart file lets start installation with Kickstart file.


for installation with kickstart we should give following command at boot prompt

linux ks= Url

Ks will queries DHCP for kickstart location
URl gets file via HTTP or FTP or NFS.

we can also give local address like

KS=floppy; ks=Cdrom or ks= hd:device:/path of the file.


Using a NFS Server

Verify that the first two lines of the file look like this or else you may be prompted for NFS ISO file location information. 

install 
nfs --server=192.16.1.100 --dir=/data/network-install/ISO


example : linux ks=nfs:192.168.1.100:/kickstart/ks.cfg

Run this at boot prompt with your settings for NFS ks installation

Using a Web Server

Verify that the first two lines of the file look like this or else you may be prompted for RPM base file location information.

install
url --url http://192.168.1.100/network-install/

example : linux ks=http://192.168.1.100/network-install/kickstart/ks.cfg

Run this at boot prompt with your settings for http ks installation

Comming to Kickstart file it consists of three sections

1 command section 
2 packages section
3 scripts section



Note 1: Do not change the order of the entries in the kickstart configuration file.
Note 2: The IP address you assign must be on the same subnet as that of the DHCP server for kickstart to work. If the server is going to reside on a different network after the installation, then you have to run a separate script to change the IP addressing information after the installation is complete.

Redhat refrence links for Kickstart

What are Kickstart Installations ? explained by Redhat
How Do You Perform a Kickstart Installation? explained by Redhat
Creating the Kickstart File  explained by Redhat
Kickstart Options  explained by Redhat
Pre-installation Script explained by Redhat
Post-installation Script explained by Redhat
Making the Kickstart File Available explained by Redhat
Starting a Kickstart Installation explained by Redhat
Kickstart Configurator explained by Redhat
Installation Method explained by Redhat