################################################################################ # This is a kickstart file for Fedora Core Linux 7 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 # Fri Jun 1 08:35:36 PDT 2007 - F7 # - had an error with md1 being already defined - trying to swap md0 and md1 # Fri Apr 20 14:21:47 PDT 2007 - FC6 cleanup and prune down # Fri Apr 6 16:34:56 PDT 2007 # - FC6 update # 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 ################################################################################ ## upgrade or install? install # upgrade ## comment out if you want the machine to wait for you to reboot manually reboot ## install source on URL or CDROM? url --url http://ks/fedora/linux/releases/7/Fedora/x86_64/os #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 --size=500 --ondisk=sda --asprimary part raid.b1 --size=500 --ondisk=sdb --asprimary part raid.c1 --size=500 --ondisk=sdc --asprimary part raid.d1 --size=500 --ondisk=sdd --asprimary part raid.e1 --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 --size=1 --ondisk=sda --asprimary --grow part raid.b0 --size=1 --ondisk=sdb --asprimary --grow part raid.c0 --size=1 --ondisk=sdc --asprimary --grow part raid.d0 --size=1 --ondisk=sdd --asprimary --grow part raid.e0 --size=1 --ondisk=sde --asprimary --grow # create raid5 md0 raid pv.a0e0 --level=RAID5 --fstype="physical volume (LVM)" --device=md1 --spares=1 raid.a0 raid.b0 raid.c0 raid.d0 raid.e0 # create raid1 md1 raid /boot --level=RAID1 --fstype=ext3 --device=md0 --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=1024 logvol /var/lib/xen/images --fstype=ext3 --name=LVXen --vgname=VGRAID --size=20480 # install grub on each drive bootloader --location=mbr --driveorder=sda,sdb,sdc,sdd,sde ################################################################################ # Install packages %packages @base @core pax cracklib-dicts kernel-xen libcap lvm2 ntp smartmontools tzdata vim-enhanced vim-common xen -bluez-libs -bluez-pin -bluez-utils -cairo -cups -cups-libs -gpm -irda-utils -NetworkManager -nfs-utils -nfs-utils-lib -pcmciautils -rp-pppoe -talk -wireless-tools -wpa_supplicant -ypbind -yp-tools ### these are needed for netbackup 5.1 client # xinetd - not in F7 # compat-libstdc++-296 - not in F7 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@mail DIST=f7 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 # attempt to get raid1 and raid5 in initrd #mv /boot/initrd-2.6.20-2925.9.fc7xen.img /boot/initrd-2.6.20-2925.9.fc7xen.img.bak #mkinitrd --with=raid1 /boot/initrd-2.6.20-2925.9.fc7xen.img 2.6.20-2925.9.fc7xen ################################################################################ # 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