install lang en_US.UTF-8 keyboard us rootpw --iscrypted YOUR-ENCRYPTED-PASSWORD firewall --enabled --port=22:tcp nfs --server store01 --dir /export/array/kickstart/CentOS-6.4-x86_64 authconfig --enableshadow --passalgo=sha512 selinux --disabled reboot network --onboot yes --noipv6 --device=eth0 --bootproto=dhcp timezone America/Montreal #interactive #graphical text firstboot --disable zerombr bootloader --location=mbr --append="quiet elevator=noop" clearpart --all %include /tmp/partinfo %packages @Base @Core -abrt-libs -abrt-tui -abrt-cli -abrt -abrt-addon-python -abrt-addon-ccpp -abrt-addon-kerneloops -Red_Hat_Enterprise_Linux-Release_Notes-6-en-US -acipd -b43-fwcutter -blktrace -bridge-utils -cpuspeed -fprintd-pam -irqbalance -kexec-tools -ledmon -microcode_ctl -mlocate -pcmciautils -pinfo -psacct -quota -pm-utils -rfkill -scl-utils -smartmontools -sos -strace -sysstat -systemtap-runtime -usbutils -vconfig -wireless-tools -postfix -dovecot -spamassassin sendmail %end # PRE script to do partitioning. # this has to go at the end of the ks.cfg %pre # find hard drives # if you are using cobbler, remember to escape the $ in the next line set \$(list-harddrives) # this is the number of hard drives found let numd=$#/2 # these are the device names of the first two drives d1=$1 d2=$3 # these are the sizes of the first two drives s1=$2 s2=$4 # if we have two or more drives, try to raid-1 the first two if [ $numd -ge 2 ] ; then # paper-bag check -- only if the sizes are the same if [ "$s1" = "$s2" ] ; then cat << EOF >> /tmp/partinfo part raid.11 --size 1024 --asprimary --ondrive $d1 part raid.12 --size 1 --grow --ondrive $d1 part raid.21 --size 1024 --asprimary --ondrive $d2 part raid.22 --size 1 --grow --ondrive $d2 raid swap --fstype swap --device md1 --level RAID1 raid.11 raid.21 raid / --fstype ext3 --device md2 --level RAID1 raid.12 raid.22 EOF fi fi if [ ! -f /tmp/partinfo ] ; then # if we get here, then we either have only one disk # or the first two disks do not match in size. # I am using lvm to make filesystem growth easier. cat << EOF >> /tmp/partinfo part /boot --fstype ext3 --ondisk=$d1 --size=1024 --fsoptions="defaults,relatime" --asprimary part pv.6 --grow --size=1 --ondisk=$d1 volgroup Volume00 --pesize=65536 pv.6 logvol / --fstype=ext3 --fsoptions="defaults,relatime" --name=lvroot --vgname=Volume00 --size=1 --grow logvol swap --name=lvswap --vgname=Volume00 --size=1024 EOF fi