################################################################################ # This is a kickstart file for Fedora Core Linux 4 on a # Sun V20z dual Opteron server with 2 36G or 73G SCSI drives in a # RAID1 configuration. This box is to be configured # with serial console access. Obviously it leaves # a lot of manual configuration left to do. # # Dale Bewley # Fri Sep 30 12:28:39 PDT 2005 # still under tweakage... 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/4/x86_64 #cdrom # use text mode install since i'll be spying on the serial console text skipx lang en_US.UTF-8 langsupport --default=en_US.UTF-8 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. Two SCSI drives sda and sdb. # Partition the two drives the same way. # Root partition can't do LVM so put it on its own raid device. # # SDA # sda1 - .5G - half of md0 device for /boot # sda2 - Remainder - half of md1 device for LVM # sda3 - 1G - swap - not much point to RAID swap # SDB # sdb1 - .5G - half of md0 device for /boot # sdb2 - Remainder - half of md1 device for LVM # sdb3 - 1G - swap some more # # Clear the Master Boot Record zerombr yes # nuke all existing partitions clearpart --all --initlabel # /boot on 500M raid1 mirror part raid.a0 --noformat --size=500 --ondisk=sda --asprimary part raid.b0 --noformat --size=500 --ondisk=sdb --asprimary # LVM on >1G raid1 mirror part raid.a1 --noformat --size=1 --ondisk=sda --asprimary --grow part raid.b1 --noformat --size=1 --ondisk=sdb --asprimary --grow # swap 1G on each disk part swap --size=1024 --ondisk=sda part swap --size=1024 --ondisk=sdb raid /boot --level=1 --fstype=ext3 --device=md0 raid.a0 raid.b0 raid pv.a1b1 --level=1 --fstype="physical volume (LVM)" --device=md1 raid.a1 raid.b1 # setup LVM for OS partitions volgroup VGRAID pv.a1b1 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=6016 logvol /usr --fstype=ext3 --name=LVUsr --vgname=VGRAID --size=4000 logvol /home --fstype=ext3 --name=LVHome --vgname=VGRAID --size=4000 logvol swap --fstype=swap --name=LVSwap --vgname=VGRAID --size=2048 # i'm not sure if the sdb is needed or if grub gets put on it bootloader --location=mbr --driveorder=sda,sdb %packages mdadm lvm2 kernel-smp e2fsprogs vim-enhanced vim-common # i just can not seem to get this to work. so rm by hand #-bluez-hcidump #-bluez-libs #-bluez-utils #-irda-utils #-isdn4k-utils #-NetworkManager #-pcmcia-cs #-rp-pppoe ## rhpl needs this ##-wireless-tools #-wvdial %post EMAIL=root@somewhere # maybe this will be useful later #ifconfig eth0 | grep HWaddr | \ # sed -e 's/^.*HWaddr \([A-Fa-f0-9:]*\).*$/\1/; s/:/-/g;' > /root/mac-addr # turn off some things chkconfig gpm off rpm -e bluez-hcidump \ bluez-libs \ bluez-utils \ irda-utils \ isdn4k-utils \ NetworkManager \ pcmcia-cs \ rp-pppoe \ wvdial \ # put /tmp on swap cuz it's fast and junk goes away on reboot echo 'none /tmp tmpfs defaults 0 0'\ >> /etc/fstab # I want to know about things... echo "root: $EMAIL" >> /etc/aliases newaliases ################################################################################ # configure the serial console here # fixup grub to play nice with the serial console and/or VGA cp /boot/grub/grub.conf /boot/grub/grub.conf.orig sed \ -e 's/^\(terminal --timeout=5 serial console\)$/#\1\nterminal --timeout=3 tty0 serial/' \ -e 's/^\(.*LVRoot console=ttyS0,9600\)$/\1 console=tty0/' \ < /boot/grub/grub.conf > /boot/grub/grub.conf.tmp cp /boot/grub/grub.conf.tmp /boot/grub/grub.conf ################################################################################ # get ready RPM for updates rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras # setup local west coast mirrors for base OS cat < /etc/yum.repos.d/fedora-west.mir http://limestone.uoregon.edu/ftp/fedora/\$releasever/\$ARCH/os/ http://mirror.stanford.edu/fedora/linux/core/\$releasever/\$ARCH/os/ http://mirrors.kernel.org/fedora/core/\$releasever/\$ARCH/os/ EOF cp /etc/yum.repos.d/fedora.repo /etc/yum.repos.d/fedora.repo.orig sed \ -e 's!^\(mirrorlist.*\)!#\1\nmirrorlist=file:///etc/yum.repos.d/fedora-west.mir!' \ -e 's!^#\(baseurl\)\(.*\)!\1\2!' \ < /etc/yum.repos.d/fedora.repo > yum.$$.tmp mv yum.$$.tmp /etc/yum.repos.d/fedora.repo # setup local west coast mirrors for updates cat < /etc/yum.repos.d/fedora-updates-west.mir http://limestone.uoregon.edu/ftp/fedora/updates/\$releasever/\$ARCH/ http://mirror.stanford.edu/fedora/linux/core/updates/\$releasever/\$ARCH/ http://mirrors.kernel.org/fedora/core/updates/\$releasever/\$ARCH/ EOF cp /etc/yum.repos.d/fedora-updates.repo /etc/yum.repos.d/fedora-updates.repo.orig sed \ -e 's!^\(mirrorlist.*\)!#\1\nmirrorlist=file:///etc/yum.repos.d/fedora-updates-west.mir!' \ -e 's!^#\(baseurl\)\(.*\)!\1\2!' \ < /etc/yum.repos.d/fedora-updates.repo > yum.$$.tmp mv yum.$$.tmp /etc/yum.repos.d/fedora-updates.repo # ok, there was a driver change somewhere between the default FC4 kernel 2.6.11 # and the most recent kernel 2.6.13 that changed the SCSI driver. without # this fix, you will get a segfault on boot because the initrd won't have # the SCSI driver installed. let's fix it in anticipation of the kernel # update via yum below. # See https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=169610 cp /etc/modprobe.conf /etc/modprobe.conf.orig sed -e \ 's!^\(alias scsi_hostadapter.*\)\( mptscsih\)$!#\1\2\n\1 mptspi!' \ < /etc/modprobe.conf > /etc/modprobe.conf.tmp cp /etc/modprobe.conf.tmp /etc/modprobe.conf # well, doing them all at once causes yum/rpm to hang yum -y update [a-d]\* yum -y update [e-h]\* yum -y update [h-j]\* yum -y update [k-m]\* yum -y update [n-q]\* yum -y update [r-u]\* yum -y update [v-z]\* yum -y update [A-Z]\* ################################################################################ # tell daddy we are all done cat /root/install.log /root/anaconda-ks.cfg \ | mail -s 'ks install' $EMAIL