From Chaos to Placidity

Chattering random observations, tips, and tutorials on all things related to IT.

Automation

I am a HUGE proponent of automation.  Absolutely huge.  I nicknamed myself “The Automator” when I was working at Argonne.  Anything that I had to do more than a few times, I scripted.  Any standard that I can document and execute, I do just that.

Automation can play a big role in SMB because it can greatly reduce overhead and increase efficiency.  It creates repeatable methods for solving problems, and makes addressing problems easier when they occur.

Enter Kickstart.  This is pretty easy to setup, I mean very easy and it saves time.  I’ll put up a quick how-to and a sample Kickstart script.  You’ll find all sorts of tutorials on the web but you wont if one that includes a template script.  :-)

  1. Download FC12 DVD ISO from http://torrent.fedoraproject.org/torrents/Fedora-12-x86_64-DVD.torrent
  2. Setup a FC12 server/workstation to serve your Kickstart files, make sure to have apache installed
After the server is built do the following magic
  • mkdir -p /var/www/html/YUM/FC12; mkdir /var/www/html/kickstart; mkdir /var/www/html/kickstart/post; mkdir /var/www/html/kickstart/conf
The YUM directory will store all my distro files.  The Kickstart directory will store my Kickstart files.  post will store my postinstall scripts and conf will store configuration files that may be copied during post install.  The directory structure is your choice.  You can always create a virtual host in apache and store the data in that location as well.  Since my server is a small VM and its only purpose is to server installation media, I chose the default /var/www/html path.
Lets go ahead and move the source files
  • mkdir /mnt/cdrom; mount /dev/cdrom /mnt/cdrom
  • cp -R /mnt/cdrom/* /var/www/html/YUM/FC12
Next lets move into the Kickstart files themselves

Config Files

You can pull mine from here:

http://pastie.org/787322

and my post install script

http://pastie.org/787341

A little background on how I built the kickstart file.  I used 3 things to generate my file:

  1. system-config-kickstart
  2. http://docs.fedoraproject.org/install-guide/f12/en-US/html/ch-kickstart2.html
  3. anaconda-ks.cfg

I installed system-config-kickstart via yum:

yum -y install system-config-kickstart

The tool provides a nice GUI for building a kickstart file.  The tool seems a bit dated, it didn’t include ext4 or LVM templates.  Because of that I referred to the documentation and the anaconda-ks.cfg file that was generated when I built my kickstart server.  The anaconda-ks.cfg file is located in /root and contains all of the items you chose during manual install.


Booting to KS

Fire up the server you are ready to build with your FC12 dvd in the drive.  When you hit the install screen do the following:

  1. press tab key
  2. append this to the end of the line:
    • ks=10.233.1.232/kickstart/kickstatfile.cfg ksdevice=eth0
  3. Press enter to begin

Change the IP address/filename above to match your server.  You pull the file directly from your Apache website so set the permissions on the files accordingly.

Let me know if you guys have questions

Blog comments powered by Disqus
More Information