Table of Contents

Linux

Kickstart : Automated Installations of RHEL, CentOS and Oracle Linux



References

Internal References




How to use kickstart file

Boot Option when you are installing

when you are installing, you can wirte ks option.

  1. Boot from DVD
  2. Input boot option
    #Before
    xxxxx quiet
    
    #After
    xxxxx quiet ks=http://192.168.0.5/ks/centos5.cfg ip=192.168.0.5.10 gateway=192.168.0.1 netmask=255.255.255.0
    
ks option
ks=http://192.168.0.5/ks/centos5.cfg ip=192.168.0.5.10 gateway=192.168.0.1 netmask=255.255.255.0
ks=http://192.168.0.5/ks/centos5.cfg ip=192.168.0.5.10 gateway=192.168.0.1 netmask=255.255.255.0 ksdevice=eth0  dns=8.8.8.8
ks=http://192.168.0.5/ks/centos5.cfg    <- dhcp

ks=cdrom:/ks.cfg

linux rescue  <- rescue mode




How to create kickstart file

Created kickstart file from installing

When you installed OS, A kickstart file is created automatically.

# ls /root/anaconda-ks.cfg

How to create kickstart file with GUI

# yum install system-config-kickstart
# system-config-kickstart

kickstart file is saved /var/lib/cobbler/kickstarts/ directory.




Configuration of kickstart file

Partition

# /boot 102MB, / MAX, Swap 4G
part /boot --fstype=ext3  --size 102
part /     --fstype=ext3  --size 4096 --grow
part swap  --size 4096

Etc

rootpw password


TIPS

Creating kickstart cdrom iso image

# vi kickstart.ks

# mkdir /mnt/cdrom

# mount -t iso9660 -o loop CentOS-6.5-x86_64-minimal.iso /mnt/cdrom
or
# mount /dev/cdrom /mnt/cdrom

# cd /mnt/cdrom
# mkdir /tmp/ks
# cp -r isolinux/ /tmp/ks/
# cd /tmp/ks
# cp kickstart.ks isolinux/ks.cfg
# chmod u+w isolinux/*
# mkisofs -o ks.iso -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -R -J -v -T isolinux/


Kickstart Sample