Modding CentOS 7.x CD to Kickstart Automatically

This is my solution for re-installing my lab server quickly. I just boot from this modded CD (source CentOS-7-x86_64-Minimal-1511) which will eject the CD after re-build and boots into a freshly baked “CentOS” in less than 10 minutes (I’ll cover KS and network setup in different post).

The trick lies in tweaking “isolinux/isolinux.cfg” – you can see original file here.

centos71-cd

[sudhaker@dell-server ~]$ diff isolinux-orig.cfg isolinux.cfg
2c2
< timeout 600
---
> timeout 10
65a66,71
> label linux-ks
>   menu label Install CentOS 7 ^KS
>   menu default
>   kernel vmlinuz
>   append initrd=initrd.img inst.stage2=hd:LABEL=CentOS\x207\x20x86_64 ks=http://ks.sudhaker.com/ks/rhel7.cfg quiet
>
68d73
<   menu default

Here are summary of changes (also highlighted above).

  1. Change timeout to 10 (or even lower if you like) from original 600 (10 minutes)
  2. Clone the boot option ‘linux’ section as ‘linux-ks’
  3. Make this new cloned option as default boot option
  4. Add ks=URL
  5. Remove ‘menu default’ from the old boot option

Leave a Reply

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