Kickstart

My current job involves a wider range of stuff than my previous position. So
while I didn’t really deal with hardware at all at Telecom my new job involves
everything from the server hardware on up.

As part of that I’m getting my head around some tools to help manage our installations
a little bit better with the goal of getting from bare-metal to a “in production”
server in around 15 minutes. Several people at the [LCA08 Sysadmin Miniconf](http://sysadmin.miniconf.org/programme08.html) were at that stage so it seems a good target especially since we have a pretty small team.

So today at home I was playing around with Kickstart a bit. It’s actually fairly easy
you just add a few lines of config to the dhcp.conf:

allow booting;
allow bootp;

group {
	next-server 10.1.1.22;
        host test4 {
	  hardware ethernet 00:0B:6A:33:B7:36;
          filename "pxelinux.0";
	  option host-name "test4";
	}
}

The IPs above is my DHCP/TFTPD server while I hardcoded the Mac address in the make sure other machines didn’t get in the way.

The TFTP Server was a simple install and I only ended up with a few files:

/memtest86
/pxelinux.0
/centos52
/pxelinux.cfg
/pxelinux.cfg/default
/centos52-initrd

I grabbed the pxelinux.cfg/default file from [here](http://egopoly.com/archives/2006/03/creating_a_kick_1.html)
while the pxelinux.0 came with the [SYSLINUX](http://syslinux.zytor.com/wiki/index.php/The_SYSLINUX_Project) download.

The memtest86 and centos52 files are just the standard ones that come with the distributions ( they are under /os/i386/images/ in centos ).

Those files enabled me to remote boot memtest86 no problems ( except for my
computer need a power cycle between boots in order to network boot correctly).

Next I grabbed a quick mirror of the centos 5.2 ( rsync://mirrors.kernel.org/centos/5.2/os/i386 to be exact )
and [this](http://fedoranews.org/tchung/minikick/ks.cfg) ks.cfg file and that was pretty much it.

I was actually surprised how easy it was. I’ve just done a test install and from
power on of an empty system to login prompt on the installed machine it takes just 8 minutes.

The whole process is:

1. Hardware Boot
2. Network Boot PXE Image
3. Boot Centos Kernel/initrd with Kickstart options
4. Kickstart Downloads packages and installs OS
5. Reboot
6. Normal Centos Boot.
7. Finished

Of course the system has a fairly minimal install since I just used a simple
kickstart config. My next stage will probably be to add a few lines
at the bottom of the kickstart config to install [puppet](http://reductivelabs.com/trac/puppet)
and from there install additional packages and configure everything.

I think 15 minutes seems a good goal, especially since the work network and machines are
faster than what I have at home.

Links:

* [Billo – Creating a kickstart install server for Fedora Core 4](http://egopoly.com/archives/2006/03/creating_a_kick_1.html)
* [The SYSLINUX Project](http://syslinux.zytor.com/wiki/index.php/The_SYSLINUX_Project)
* [Debian Docs – Preparing Files for TFTP Net Booting](http://www.debian.org/releases/stable/i386/ch04s06.html.en)
* [Centos Wiki – PXE Setup](http://wiki.centos.org/HowTos/PXE/PXE_Setup)
* [KickStart for Ubuntu](https://help.ubuntu.com/community/KickstartCompatibility)
END

Share