################################################################################ # This is a kickstart file for Fedora Core Linux 5 on a # Sun V40z quad Opteron server with 5x 73G SCSI drives in a # RAID5 configuration. This box is to be configured # with serial console access. #------------------------------------------------------------------------------- # # Dale Bewley # Wed Sep 27 16:26:47 PDT 2006 # - FC5 cleaned up # Fri Jul 7 15:10:09 PDT 2006 # - FC5 initial # Fri Sep 30 12:28:39 PDT 2005 # - FC4 ################################################################################ install # comment out if you want the machine to wait for you to reboot it reboot # i keep a copy of the install source on my web server. # you might comment this out and uncomment the following url --url http://ks/fedora/linux/core/5/x86_64 #cdrom # use text mode install since i'll be spying on the serial console text skipx lang en_US.UTF-8 keyboard us timezone America/Los_Angeles # network setup network --device eth0 --bootproto dhcp network --device eth1 --onboot no --bootproto dhcp # we'll redo firewalling by hand later firewall --enabled --port=22:tcp # this could be annoying for now so leave it off selinux --disabled authconfig --enableshadow --enablemd5 # change this after install rootpw secret ################################################################################ # Setup the disk drives. # 5 SCSI drives (sda through sde) partitioned the same way. # Root partition can't do LVM so put it on its own raid device. # # Drives sda through sde: # Part1 - .5G: part of RAID1 md1 device for /boot # Part2 - Remaining space: RAID5 md0 device split by LVM # Part3 - 1G: Swap. Not much point to RAID swap # Device Boot Start End Blocks Id System # /dev/sde1 * 1 64 514048+ fd Linux raid autodetect # /dev/sde2 65 8793 70115692+ fd Linux raid autodetect # /dev/sde3 8794 8924 1052257+ 82 Linux swap / Solaris # Clear the Master Boot Record zerombr # nuke all existing partitions clearpart --all --initlabel # for /boot on 500M raid1 mirror at md1 part raid.a1 --noformat --size=500 --ondisk=sda --asprimary part raid.b1 --noformat --size=500 --ondisk=sdb --asprimary part raid.c1 --noformat --size=500 --ondisk=sdc --asprimary part raid.d1 --noformat --size=500 --ondisk=sdd --asprimary part raid.e1 --noformat --size=500 --ondisk=sde --asprimary # swap 1G on each disk part swap --size=1024 --ondisk=sda part swap --size=1024 --ondisk=sdb part swap --size=1024 --ondisk=sdc part swap --size=1024 --ondisk=sdd part swap --size=1024 --ondisk=sde # for LVM on raid5 at md0 using remaining space # (a0 is shorthard for drive *a* on md*0*) part raid.a0 --noformat --size=1 --ondisk=sda --asprimary --grow part raid.b0 --noformat --size=1 --ondisk=sdb --asprimary --grow part raid.c0 --noformat --size=1 --ondisk=sdc --asprimary --grow part raid.d0 --noformat --size=1 --ondisk=sdd --asprimary --grow part raid.e0 --noformat --size=1 --ondisk=sde --asprimary --grow # create raid5 md0 raid pv.a0e0 --level=RAID5 --fstype="physical volume (LVM)" --device=md0 --spares=1 raid.a0 raid.b0 raid.c0 raid.d0 raid.e0 # create raid1 md1 raid /boot --level=RAID1 --fstype=ext3 --device=md1 --spares=3 raid.a1 raid.b1 raid.c1 raid.d1 raid.e1 # setup LVM on md0 for OS partitions volgroup VGRAID pv.a0e0 logvol / --fstype=ext3 --name=LVRoot --vgname=VGRAID --size=2048 logvol /opt --fstype=ext3 --name=LVOpt --vgname=VGRAID --size=1024 logvol /var --fstype=ext3 --name=LVVar --vgname=VGRAID --size=6144 logvol /usr --fstype=ext3 --name=LVUsr --vgname=VGRAID --size=4096 logvol /home --fstype=ext3 --name=LVHome --vgname=VGRAID --size=4096 # install grub on each drive bootloader --location=partition --driveorder=sda,sdb,sdc,sdd,sde ################################################################################ # Install packages %packages @base @core cracklib-dicts rmt tzdata dhcp e2fsprogs libcap lvm2 mdadm ntp smartmontools vim-enhanced vim-common -bluez-utils -irda-utils -NetworkManager -nfs-utils -nfs-utils-lib -rp-pppoe -talk -wireless-tools -wpa_supplicant -ypbind -yp-tools ### these are needed for netbackup 5.1 client xinetd compat-libstdc++-296 libgcc.i386 ################################################################################ # Final Configuration %post --nochroot cp /tmp/ks.cfg /mnt/sysimage/root/install-ks.cfg cp /proc/cmdline /mnt/sysimage/root/install-cmdline %post # we'll use these values in the extended final config EMAIL=root@somewhere DIST=fc5 MAC_ADDR=`ifconfig eth0 | grep HWaddr | \ sed -e 's/^.*HWaddr \([A-Fa-f0-9:]*\).*$/\1/; s/:/-/g;'` # turn off some things chkconfig gpm off chkconfig netfs off chkconfig ntpd on # put /tmp on swap cuz it's fast and junk goes away on reboot echo -e "none\t\t\t/tmp\t\t\ttmpfs\tdefaults\t0 0" >> /etc/fstab # setup root's profile echo 'alias vi=vim' >> /root/.bash_profile # I want to know about things... echo -e "root:\t\t$EMAIL" >> /etc/aliases newaliases ################################################################################ # Extended Final Configuration # Apparently KS will only use the first ksappend line and we want to # call modular scripts depending on the host being setup. Plus the vars # aren't expanded. So we'll serve a meta config from the web server which will # serve up a custom shell script based on the dist ver and MAC. wget -O /root/ks-post-config.sh "http://ks/ks-server.php?mac=${MAC_ADDR}&dist=${DIST}" chmod 700 /root/ks-post-config.sh /root/ks-post-config.sh # tell daddy we are all done cat /root/install.log /root/install-ks.cfg /root/ks-post-config.sh \ | mail -s "${DIST} ks install ${MAC_ADDR}" $EMAIL