[TriLUG] calling all kickstarters

Cristóbal Palmer cmp at cmpalmer.org
Sat Feb 26 09:53:23 EST 2011


2011/2/25 David Both <dboth at millennium-technology.com>

> Here is a link to an article I co-authored with my friend, Bruce Garland,
> at Cisco while I worked there. It originally appeared in Linux Magazine.
>

That's a great overview; thanks for sharing.

To summarize other responses I've gotten to my specific questions so far:

* Leverage the "%pre" section and bash or a remote script for things like
disk partitioning, which may vary between classes of hardware.
* Specifically, see here for partitioning:
http://www.spinics.net/linux/fedora/kickstart/msg10629.html
* Combine that with an --append line to get serial from grub:
http://www.redhat.com/archives/kickstart-list/2009-October/msg00003.html

Put that all together, and... (CAVEAT--not tested on Xen hosts yet):

### Script to setup partitions.
%pre --log=/tmp/ks-preinstall.log
#!/bin/bash
# shamelessly cribbed from
http://www.spinics.net/linux/fedora/kickstart/msg10629.html

if grep -q "[[:space:]]xvda" /proc/partitions; then
        ### disks provided by Xen.
cat >> /tmp/part-include <<END
part pv.01 --size=9700 --grow --ondisk=xvda
part /boot --fstype=ext3 --size=200  --ondisk=xvda
volgroup rootvg pv.01
logvol / --vgname=rootvg --name=rootlv --size=7700
logvol swap --fstype swap --name=swap --vgname rootvg --size 2000
bootloader --location mbr --append="console=tty0 console=xvc0,9600 rhgb
quiet"
END
elif grep -q "[[:space:]]vda" /proc/partitions; then
        ### disks provided by kvm.
cat >> /tmp/part-include <<END
part pv.01 --size=9700 --grow --ondisk=vda
part /boot --fstype=ext3 --size=200  --ondisk=vda
volgroup rootvg pv.01
logvol / --vgname=rootvg --name=rootlv --size=7700
logvol swap --fstype swap --name=swap --vgname rootvg --size 2000
bootloader --location mbr --append="console=tty0 console=ttyS0,9600 rhgb
quiet"
END
fi

Keep your suggestions coming.

Cheers,
-- 
Cristóbal Palmer
Systems Administrator
University of North Carolina at Chapel Hill



More information about the TriLUG mailing list