So I wrote a python script to run with our Red Hat/Fedora kickstart installs. This runs in the %pre section, which is done before anything else, and then later on in the file, I can %include the files I write out to with this script.

Basically this script will probe for what disk drives are on the system, and then set up partitioning schemes accordingly, with some rules about the size of the first disk, the amount of free space found on other disks, or if there are any Linux partitions on other disks for which to take over. Also it looks at the cmdline (all boot time options show up in /proc/cmdline) for arguments for the package set and whether or not to do an interactive install.

Feel free to point and laugh, but please do offer any criticism you see fit.