KickStart Tutorial RHEL6

 kickStart Tutorial 

The kickstart installation method is used to automatically perform unattended operating system installation and configuration.

In order to configure kickstart server we need to configure few things first:

1) dhcp server to provide ip address

2)http/ftp/nfs server to share packages

3)tftp server

4)kickstart file where all the configuration about how the system should be installed and what should be included in the new server.

Start the kickstart process with installing the required packages

kickstart Server: masterdns IP=

Install these packages

root@masterdns ~]# yum install tftp-server dhcp syslinux vsftpd

Tutorial for setting up yum  <—- Click for tutorial

Video Tutorial for yum  <——- Click for tutorial

Video Tutorial for yum  <——- Click for tutorial

First lets start with dhcp configuration

  • DHCP configuration

[root@masterdns ~]# vi /etc/dhcp/dhcpd.conf
option domain-name "velocity.lab";
option domain-name-servers,;

default-lease-time 600;
max-lease-time 7200;

allow booting;
allow bootp;

subnet netmask {
option domain-name "velocity.lab";
option domain-name-servers,;
option routers;
filename "pxelinux.0";

FTP server

Now lets configure Ftp server (or http),  to deploy packages to the new client machine and to share ks.cfg file which will say what configuration and how to install the system from kickstart

By default ftp base directory is /var/ftp

so we will mount a dvd to a directory called /mnt if not  there then create a directory called /var/ftp/rhel6


[root@bijankoserver ~]#mkdir /var/ftp/rhel6
[root@bijankoserver ~]#mount /dev/cdrom /mnt

then copy all the contents of dvd to /mnt folder

[root@bijankoserver ~]# cp -ar /mnt/* /var/ftp/rhel6

If using http then

[root@bijankoserver ~]# cp -ar /mnt/* /var/www/html/rhel6

Now change directory to /root

[root@bijankoserver ~]# cd /root
[root@bijankoserver ~]# ls

copy anaconda-ks.cfg file to ks.cfg

[root@bijankoserver ~]# cp anaconda-ks.cfg ks.cfg

then copy ks.cfg file to /var/ftp folder ( if http /var/www/html/ )

[root@bijankoserver ~]# cp ks.cfg /var/ftp/ks.cfg
  •   tftp configuration

xinetd tftp

  • Change disable=yes
  • to
  • disable=no


[root@masterdns ~]# vi /etc/xinetd.d/tftp

# default: off

# description: The tftp server serves files using the trivial file transfer  protocol. The tftp protocol is often used to boot diskless workstations, download configuration files to network-aware printers, and to start the installation process for some operating systems.

service tftp


socket_type = dgram

protocol = udp

wait = yes

user = root

server = /usr/sbin/in.tftpd

server_args = -s /tftpboot

disable = no
per_source = 11 cps = 100 2 flags = IPv4 }

#(we changed it to no from yes)

#ff0000;">Transfer files to /var/lib/tftpboot

[root@masterdns ~]# cp /var/ftp/rhel6/isolinux/vmlinuz /var/lib/tftpboot/

root@localhost share]# cp /var/ftp/rhel6/isolinux/initrd.img /var/lib/tftpboot/


And also copied the following files from /usr/share/syslinux/ as:

[root@masterdns ~]# cp /usr/share/syslinux/menu.c32 /var/lib/tftpboot/

[root@masterdns ~]]# cp /usr/share/syslinux/chain.c32 /var/lib/tftpboot/

[root@masterdns ~]# cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/

[root@masterdns ~]# cp /usr/share/syslinux/memdisk /var/lib/tftpboot/

[root@masterdns ~]# cp /usr/share/syslinux/mboot.c32 /var/lib/tftpboot/


Then create a dir called pxelinux.cfg on /var/lib/tftpboot

[root@masterdns ~]cd /var/lib/tftpboot/
[root@masterdns tftpboot]# mkdir pxelinux.cfg/ then inside pxelinux.cfg
[root@masterdns tftpboot]# cd /var/lib/tftpboot/pxelinux.cfg/


[root@masterdns tftpboot]# vi /var/lib/tftpboot/pxelinux.cfg/default
prompt 1
default linux
timeout 100
label linux
kernel vmlinuz
append ksdevice=eth0 initrd=initrd.img network ks= 

#[if http:     append ksdevice=eth0 initrd=initrd.img network ks= ]


Then edit your ks.cfg file as below

[root@masterdns ~]# vi /var/ftp/ks.cfg

#platform=x86, AMD64, or Intel EM64T
# Firewall configuration
firewall --disabled
# Install OS instead of upgrade
# Use network installation
url --url=""
# Root password
rootpw --iscrypted $1$2XjhkIta$4.SIU9vXHBZB8jExkLHSa/
# System authorization information
auth --useshadow --passalgo=sha512
# Use graphical install
firstboot --disable
# System keyboard
keyboard us
# System language
lang en_US
# SELinux configuration
selinux --disabled
# Installation logging level
logging --level=info

# System timezone
timezone America/Chicago
# Network information
network --bootproto=dhcp --device=eth0 --onboot=on
# System bootloader configuration
bootloader --append="crashkernel=auto rhgb quiet" --location=mbr --driveorder="sda"
# Clear the Master Boot Record
# Partition clearing information
clearpart --all --drives=sda
# Disk partitioning information
part /boot --fstype="ext4" --size=256
part / --fstype="ext4" --size=10240
part swap --size=2048
part pv.008005 --size=69374

volgroup sysvg --pesize=4096 pv.008005
logvol /home --fstype=ext4 --name=homelv --vgname=sysvg --size=2048
logvol /opt --fstype=ext4 --name=optlv --vgname=sysvg --size=1024
logvol /tmp --fstype=ext4 --name=tmplv --vgname=sysvg --size=1024
logvol /usr/local --fstype=ext4 --name=usrlocallv --vgname=sysvg --size=1024
logvol /usr --fstype=ext4 --name=usrlv --vgname=sysvg --size=4096
logvol /var --fstype=ext4 --name=varlv --vgname=sysvg --size=2048


[root@masterdns ~]# chmod -R 777 /var/lib/tftpboot


[root@masterdns ~]# chmod -R 777 /var/ftp/ks.cfg

make sure u have these files in /var/lib/tftpboot

[root@masterdns lib]# ls -l /var/lib/tftpboot/
-rwxrwxrwx 1 root root    20192 Oct 11 22:10 chain.c32
-rwxrwxrwx 1 root root 33383449 Oct 11 22:06 initrd.img
-rwxrwxrwx 1 root root    35420 Oct 11 22:11 mboot.c32
-rwxrwxrwx 1 root root    25244 Oct 11 22:11 memdisk
-rwxrwxrwx 1 root root    60928 Oct 11 22:10 menu.c32
-rwxrwxrwx 1 root root    26828 Oct 11 22:10 pxelinux.0
drwxrwxrwx 2 root root     4096 Oct 12 03:38 pxelinux.cfg
-rwxrwxrwx 1 root root  4128944 Oct 11 22:06 vmlinuz



chkconfig dhcpd on
/etc/init.d/dhcpd restart


chkconfig xinetd on
/etc/init.d/xinetd restart


chkconfig vsftpd on
/etc/init.d/vsftpd restart


/etc/init.d/network restart


chkconfig iptables off


service iptables stop


setenforce 0



vi /etc/sysconfig/selinux 

change inforcing to disabled



Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.