Difference between revisions of "Kickstart"

From Peter Pap's Technowiki
Jump to: navigation, search
(Created page with "Kickstart is awesome for automating the building CentOS/RedHat servers. There are a number of ways that you can do it, such as PXE booting of the network etc, but the way I choo...")
(No difference)

Revision as of 05:37, 8 November 2010

Kickstart is awesome for automating the building CentOS/RedHat servers. There are a number of ways that you can do it, such as PXE booting of the network etc, but the way I choose to do it requires a simple boot CD.

In this example, our build media will be stored on a local NFS share.

Building the boot CD

1. Download the latest DVD ISO of the distro you wish to use. In this case it's CentOS 5.5 x86_64.

2. Either burn the DVD ISO to DVD media or soft mount it on your machine.

3. Make a directory to hold the boot image data

 mkdir bootimage

4. Copy the 'images' and 'isolinux' directories from the DVD into the bootimage folder

 cd bootimage
 cp -pr PATH_TO_DVD/images/ .
 cp -pr PATH_TO_DVD/isolinux/ .

5. Go into the 'isolinux' directory and edit the isolinux.cfg file with the following contents:

 default vrsn-ks
 prompt 5
 timeout 15
 label vrsn-ks
   kernel vmlinuz
   append ip=dhcp ks=nfs:192.168.1.1:/export/install/centos/ks/kickstart.ks initrd=initrd.img kssendmac ksdevice=eth0 lang=en_US
 label linux
   kernel vmlinuz
   append initrd=initrd.img
 label text
   kernel vmlinuz
   append initrd=initrd.img text
 label ks
   kernel vmlinuz
   append ks initrd=initrd.img
 label local
   localboot 1
 label memtest86
   kernel memtest
   append -

In this example, the server will use network interface eth0, will get it's IP from DHCP and will get it's kickstart config file, kickstart.ks, from the nfs server 192.168.1.1.

If DHCP isn't available, you can specify a static IP like this:

 ip=192.168.1.2 netmask=255.255.255.0 gateway=192.168.1.254 nameserver=192.168.1.253

6. Make a bootable ISO image of this directory:

 cd bootimage
 mkisofs -o ../ks.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -R -J -v -T .

7. Burn the new ISO, ks.iso, to CD using your favourite burning software.