# Kickstart file for install of a fedora core 3 firewall system install cdrom # use text mode install text skipx lang en_US.UTF-8 langsupport --default=en_US.UTF-8 en_US.UTF-8 keyboard us # California is best timezone America/Los_Angeles 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 can be problematic for now so leave it off selinux --disabled authconfig --enableshadow --enablemd5 # root password is "secret". change it rootpw secret ################################################################################ # Setup the disk drives. Two IDE drives hda and hdc. # Partition two drives the same way. # Root partition can't do LVM so leave it alone # # HDA # hda1 - 1G - half of md0 device for /boot # hda2 - 1G - swap - not much point to RAID swap # hda3 - Remainder - half of md1 device for LVM # HDC # hdc1 - 1G - half of md0 device for /boot # hdc2 - 1G - swap some more # hdc3 - Remainder - half of md1 device for LVM # # It seems you'll have to setup grub on both drives. I don't think Anaconda # will do it for some reason. After you boot and get a blank screen just # boot from the rescue CD and do this # # chroot /mnt/sysimage # # grub # grub>root (hd0,0) # grub>setup (hd0) # grub>root (hd1,0) # grub>setup (hd1) # # where will be put the boot loader? - test me bootloader --location=partition # Clear out the Master Boot Record zerombr yes # nuke all existing partitions clearpart --all --initlabel # Setup # hda part raid.a1 --noformat --size=1024 --ondisk=hda --asprimary part swap --size=1024 --ondisk=hda --asprimary part raid.a3 --noformat --size=1 --grow --ondisk=hda # hdb part raid.c1 --noformat --size=1024 --ondisk=hdc --asprimary part swap --size=1024 --ondisk=hdc --asprimary part raid.c3 --noformat --size=1 --grow --ondisk=hdc # # /boot on 1G RAID1 mirror raid /boot --level=1 --fstype=ext3 --device=md0 raid.a1 raid.c1 # LVM RAID1 array on 3rd partition of drives A,B raid pv.md1 --level=1 --fstype="physical volume (LVM)" --device=md1 raid.a3 raid.c3 # setup LVM for OS partitions # create volume group from md1 volgroup VGRAID pv.md1 # chop up volume group VGRAID into logical volumes logvol / --fstype=ext3 --name=LVRoot --vgname=VGRAID --size=2000 logvol /opt --fstype=ext3 --name=LVOpt --vgname=VGRAID --size=1000 logvol /var --fstype=ext3 --name=LVVar --vgname=VGRAID --size=5000 logvol /usr --fstype=ext3 --name=LVUsr --vgname=VGRAID --size=4000 logvol /home --fstype=ext3 --name=LVHome --vgname=VGRAID --size=4000 logvol /var/spool --fstype=ext3 --name=LVSpool --vgname=VGRAID --size=4000 ################################################################################ # pick software to install # This is a minimal software set for a firewall. It has no GUI nor other cruft %packages mdadm lvm2 kernel-smp e2fsprogs ################################################################################ # do all this stuff after the install is done %post # need to test this some more... # bootloader --location=mbr results in a cursor and no grub # install grub to the MBR # this seems to make /boot/boot #grub-install --root-directory=/boot hd0 #grub-install --root-directory=/boot hd1 # configure the serial console here echo ttyS0 >> /etc/securetty echo "S0:12345:respawn:/sbin/agetty 9600 ttyS0 vt102" >> /etc/inittab # there is a problem with this right now... # fixup grub #sed -e \ # 's/^hiddenmenu/#hiddenmenu\nserial --unit=0 --speed=9600\nterminal --timeout=5 tty0 serial\n/; \ # s/^\(splashimage.*\)/#\1/; \ # s/^\(.*LVRoot\)/\1 console=ttyS0,9600 console=tty0/' \ # < /boot/grub/grub.conf > grub.$$.tmp #mv grub.$$.tmp /boot/grub/grub.conf # tell RPM about GPG keys for safe updates rpm --import /usr/share/doc/fedora-release-3/RPM-GPG-KEY rpm --import /usr/share/doc/fedora-release-3/RPM-GPG-KEY-fedora # setup yum for local west coast mirrors so it runs faster cat < /etc/yum.repos.d/local-base.mir # local mirrorlist for US West http://limestone.uoregon.edu/ftp/fedora/$releasever/\$ARCH/os/ http://mirror.stanford.edu/fedora/linux/core/$releasever/\$ARCH/os/ EOF # cat < /etc/yum.repos.d/local-updates.mir # local mirrorlist for US West http://limestone.uoregon.edu/ftp/fedora/updates/\$releasever/\$ARCH/ http://mirror.stanford.edu/fedora/linux/core/updates/\$releasever/\$ARCH EOF # sed 's!^\(mirrorlist.*\)!#\1\nmirrorlist=file:///etc/yum.repos.d/local-updates.mir!' < /etc/yum.repos.d/fedora-updates.repo > yum.$$.tmp mv yum.$$.tmp /etc/yum.repos.d/fedora-updates.repo # sed 's!^\(mirrorlist.*\)!#\1\nmirrorlist=file:///etc/yum.repos.d/local-base.mir!' < /etc/yum.repos.d/fedora.repo > yum.$$.tmp mv yum.$$.tmp /etc/yum.repos.d/fedora.repo