Building a custom CentOS 6 kickstart disc, part 3

Note: this series of articles applies to CentOS 6; for CentOS 5, see this series. Now that you’ve compiled your RPMs, you need to build a disk image from which to perform the kickstart.

Create the repository

Install createrepo so that you can create a repository. If you’ve copied all the RPMs to ~kickstart_build/all_rpms as suggested earlier, just do this:

You need to build the repodata for your install disc. These files provide the installer information about the available packages. On your build machine, you should have already copied the repodata/comps.xml file from the CentOS disc 1 to ~/kickstart_build. Use createrepo to build the repository info.

This will create a repodata directory under ~/kickstart_build/isolinux with the repository data files in it.

Build the ISO

We’re finally ready to build the ISO image that we can burn to CD.

You should now have an ISO image in custom.iso.

Testing the ISO

Rather than spending the time to burn the CD and perform a physical installation, you can test the ISO using a virtual machine, which you can run under a program like VirtualBox.

When the system (virtual or physical) boots up, you’ll see your standard CentOS installation prompt. Before the countdown expires, hit ESC and type

If you chose to use some other name for your kickstart config file, replace ks.cfg with the name of your configuration file. You may choose to name your configuration files based on hostname or server class. If you have to use a test configuration file to get around the SATA limitations of qemu, you may call that file test.cfg or something similar.

Your installation should proceed automatically.

Now you have a working custom kickstart disc. To really take advantage of the power of kickstart, you’ll most likely need a custom postinstallation script to configure the system according to your specs. We’ll cover that in the next installment in this series.

Part 1  •  Part 2  •  Part 3  •  Part 4

Leave a Reply

Your email address will not be published. Required fields are marked *