boot:
linux ks=cdrom:/ks.cfg
There are, of course, trade-offs here. Disks tend to have shorter and less predictable life spans than CDs and requireyou to have a boot CD handy. Then again, CDs and CD-RWs are good for a limited number of writes. Furthermore,because of the strong ties between the boot media and the target OS revision, your boot CDs become coasters at thenext upgrade rollout. Using other removable media requires that your boot medium's kernel support your SCSI (orUSB, or FireWire) adapter.Whatever the case, you needn't limit yourself to a single config file. You could copy a series of pre-generated configfiles to the disk or CD, then specify the target host's file at the
boot:
prompt:
linux ks=hd:sdb5:/ks-host5.cfg linux ks=floppy:/ks-host5.cfg
As
ks.cfg
is just a few K in size, space shouldn't be a problem.There's no right answer here. Arguably, storing
ks.cfg
on removable media works best for small or medium shops orfor large one-offs such as clone farms. If your goal is to make sure sensitive Kickstart data doesn't cross the normalnetwork, set up a private build network using a portable switch and serve Kickstart data from a laptop.
Default Booting to Kickstart
Whether you're building a clone farm or repeatedly testing a Kickstart setup, you'll tire of entering
linux ks=...
each time you start a build. (Maybe that's just me; people have accused me of selective laziness.) You can create aboot CD that automatically loads your
ks.cfg
, making Kickstart a true fire-and-forget process.The key to this magic is
isolinux/isolinux.cfg
. To start, define a new boot selection by adding a new stanza:
label
custom_kickstart
kernel vmlinuzappend initrd=initrd.img ramdisk_size=8192
ks=cdrom:/ks.cfg
This lets you enter:
linux custom_kickstart
at the CD's
boot:
prompt to fire off a Kickstart. The operation will use the
ks.cfg
in the CD's root directory. Changethe
default
directive to make this the default:
default
kickstart
To be fancy, associate an explanatory message with an F-key:
F8
our_site.msg
(There are other directives in
isolinux.cfg
worthy of experiment, but they're beyond the scope of this article.)The specified
ks.cfg
needn't exist on the boot CD; you can specify other valid sources, such as a disk or a URL. If yourdynamically generated
ks.cfg
doesn't require parameters to identify the target host, you can have a single boot CD forthe entire shop, or at the least, one CD per OS version.
Pre- and Postinstall Scripts
Kickstart does a lot of host customization for you--setting the root password, the time zone, and so on--but it won'tdo certain other tweaks, such as disabling services via
chkconfig
or setting up site-specific directory structures. Youcan automate these tasks using the pre- and postinstall scripts. (There is one of each.) Per their names, these scriptsrun before and after the installation, respectively.
Add a Comment