################################################################ # Kickstart Configuraion File # Build Version: rhas3i.05.1 # # Verion History: # 2005Mar28 : TLS : Change how nslookup output is parsed to fix when no valid host name exists. # Commented out part of Aaron partition fix, there is still the problem # with the clearpart not clearing the drives during install. # 2005Mar16 : AJS : Made kickstart only destroy cciss/c0d0. No longer destroys customer filesystems. # Debugging to console now works better. SSH Keys now persist between kickstarts. # 2005Mar09 : TLS : Changed X11 display type # Commented out parts the disklayout section. The clearparts still do not work correctly # Updated the package selected and removed based on meeting with security # Added time sync lines to the post section # Removed the authd package # 2005Feb26 : TLS : Added default values for PART, PKGS, SUFFIX # Fixed clearpart's by added DD's # 2005Feb25 : TLS : Changed clearpart command to "clearpart --liunux" # Troubleshooting shows that all other options fail # Moved the packages to the pre section to allow pkg group selection # 2005Feb24 : TLS : The partition layout has been moved to the pre install section # The first partition scheme does not work and has been commented out # NONIS and NOBKUP options added to comments # 2005Feb15 : TLS : Added more RH packages # Added NOCON input option # 2005Feb14 : TLS : Changed --clearpart to only clear c0d0 # Changed the pre-task to not format c0d3p2 if it already exists # 2005Feb03 : TLS : Changed to RH update 4 iso's # Updated input options # 2005Feb03 : TLS : Copied from rhas3i.04.4, starting new version history # # Notes: # Kernel cmdline input options: # Available name=value pairs: # HOST=[server_name] # SUFFIX=[domain name] # defaults to nwie.net # NIC1ADDR=xxx.xxx.xxx.xxx # NIC1MASK=xxx.xxx.xxx.xxx # NIC1GATE=xxx.xxx.xxx.xxx # NIC2ADDR= # NIC2MASK= # NIC2GATE= # LOC=[CTE|NORTH|SOUTH] # PART=[4D10G] # defaults to 4D10G # PKGS=[INFRA] # defaults to INFRA # Key words: # NOSEC - Tells the install scripts to not run the security scripts # NOHP - Tells the install scripts to not install the PSP, drivers, and firmware # NOCON - Tells the install scripts not to include console settings # DEBUGSH - Tells the pre-install script to launch a debug shell # NONIS - Tells the install scripts to not setup NIS # NOBKUP - Tells the install scripts to not setup Netbackup # ##### testing # ################################################################################ # Anaconda Settings #System language lang en_US #Language modules to install langsupport --default=en_US #System keyboard keyboard us #System mouse mouse --emulthree genericps/2 #Sytem timezone timezone US/Eastern #Root password rootpw --iscrypted $1$.sseD/HN$lE/gGhToY36b7hgkRPSWY/ #Reboot after installation reboot #Use text mode install text #Install Red Hat Linux instead of upgrade install #Use NFS installation Media nfs --server=nile.nfs.nwie.net --dir=/sa/cd/redhat/iso/rhas3i-update-4 #System bootloader configuration %include /tmp/boot-include #Clear the Master Boot Record zerombr yes #Disk partitioning information %include /tmp/part-include #System authorization infomation auth --useshadow --enablemd5 --enablecache #Network information %include /tmp/net-include #Firewall configuration firewall --disabled #XWindows configuration information xconfig --depth=24 --resolution=1024x768 --defaultdesktop=GNOME --monitor="LCD Panel 1280x1024" # Package install information %include /tmp/pkg-include ################################################################################ # Pre Tasks %pre set -x set -v PATH=${PATH}:/bin:/usr/bin # Fix the system time so that file dates and logging timestamps are correct rdate timehost.nfs.nwie.net echo "Begin Kickstart Pre-Tasks `date`" # Add to the resolv.conf sed -i 's/\(search.*\)/\1 nwie.net nfs.nwie.net ent.nwie.net cdc.ent.nwie.net edc.ent.nwie.net nies.nwie.net/' /etc/resolv.conf # Get the networking info from RDP and build an include file for these options # split command line arguments into one per line sed 's/ /\n/g' /proc/cmdline > /tmp/cmdwords # Get the seperate input values HOST=`sed -n '/HOST=/{ s/.*=//p }' /tmp/cmdwords` SUFFIX=`sed -n '/SUFFIX=/{ s/.*=//p }' /tmp/cmdwords` if [ "${SUFFIX}" = "" ]; then SUFFIX='nwie.net'; fi # set default value # create a fully qualified domain name if [ ! -z "$SUFFIX" ]; then SUFFIX=".${SUFFIX}"; fi # add a dot FQDN=${HOST}${SUFFIX} NIC1ADDR=`sed -n '/NIC1ADDR=/{ s/.*=//p }' /tmp/cmdwords` NIC1MASK=`sed -n '/NIC1MASK=/{ s/.*=//p }' /tmp/cmdwords` NIC1GATE=`sed -n '/NIC1GATE=/{ s/.*=//p }' /tmp/cmdwords` NIC2ADDR=`sed -n '/NIC2ADDR=/{ s/.*=//p }' /tmp/cmdwords` NIC2MASK=`sed -n '/NIC2MASK=/{ s/.*=//p }' /tmp/cmdwords` NIC2GATE=`sed -n '/NIC2GATE=/{ s/.*=//p }' /tmp/cmdwords` echo ${FQDN}>> /tmp/net-debug echo `nslookup ${FQDN} | grep Address | sed 1d | sed 's/Address:[\x20\x09]*//'`>>/tmp/net-debug # If not provided, then try to find these values from DNS and DHCP if [ -z "$NIC1ADDR" ]; then NIC1ADDR=`nslookup ${FQDN} | grep Address | sed 1d | sed 's/Address:[\x20\x09]*//'`; fi if [ -z "$NIC1MASK" ]; then NIC1MASK=`ifconfig | sed -n '/Mask:/{ s/.*Mask://; p}' | head -1`; fi if [ -z "$NIC1GATE" ]; then NIC1GATE=`route | sed -n '/default/{s/default *//; s/ .*// p}'`; fi echo "network --hostname=${HOST} --bootproto=static --ip=${NIC1ADDR} --netmask=${NIC1MASK} --gateway=${NIC1GATE} --nameserver=172.24.102.100 --device=eth0">> /tmp/net-debug # Write the network include file if [ -z "$NIC1ADDR" ]; then # If still no IP address, then configure for DHCP echo "network --hostname=${HOST} --bootproto=dhcp --device=eth0"> /tmp/net-include else echo "network --hostname=${HOST} --bootproto=static --ip=${NIC1ADDR} --netmask=${NIC1MASK} --gateway=${NIC1GATE} --nameserver=172.24.102.100 --device=eth0"> /tmp/net-include fi ################## # Partition Setup PART=`sed -n '/PART=/{ s/.*=//p }' /tmp/cmdwords` if [ "${PART}" = "" ]; then PART=4D10G; fi # default value touch /tmp/part-include if [ "${PART}" = "4D10G" ]; then if grep -q c0d3p2_ /proc/partitions then # already existing customer data cat > /tmp/part-include < /tmp/part-include < /tmp/boot-include else echo 'bootloader --location=mbr --append="max_scsi_luns=128 console=tty0 console=ttyS0,115200"' > /tmp/boot-include fi ################## # Package Group Selection PKGS=`sed -n '/PKGS=/{ s/.*=//p }' /tmp/cmdwords` if [ "${PKGS}" = "" ]; then PKGS=INFRA; fi # default value touch /tmp/pkg-include if [ "${PKGS}" = "INFRA" ]; then # the '%' symbol will mess up a multline cat echo '%packages --resolvedeps' > /tmp/pkg-include cat >> /tmp/pkg-include <<_EOF_ ############################## ## Add these package groups ## @ X Window System @ GNOME Desktop Environment @ Graphical Internet @ Development Tools @ Kernel Development @ X Software Development @ GNOME Software Development @ KDE Software Development @ Administration Tools @ System Tools @ Printing Support @ Legacy Software Development @ Compatibility Arch Support ############################## ## Add these packages ## openmotif21 # required for NetBackup postfix ############################## ## Removed these packages ## -amanda-client -amanda-server -am-utils -authd -bridge-utils -brltty -bug-buddy # dep on gdb -Canna -cipe -ckermit -ddd -dejagnu -desktop-backgrounds-extra -dev86 -dhcp -dtach -ethereal -ethereal-gnome -evolution -evolution-connector -fam-devel -festival -finger -freeredius -FreeWnn -gaim -gcc-c++-ssa -gcc-g77 -gcc-g77-ssa -gcc-gnat -gcc-java -gcc-java-ssa -gcc-objc -gcc-objc-ssa -gcc-ssa -gdb -gdm -gnomemeeting -gperf -gphoto2 # dep on hotplug -hotplug -hpoj -httpd -imap -iptables-ipv6 -irda-utils -isdn4k-utils -jwhois -kdemultimedia -kernel-pcmcia-cs # dep on hotplug -krb5-esrver -lha -libmudflap -libmudflap-devel -modutils-devel -mozilla-chat -mozilla-dom-inspector -mozilla-js-debugger -mozilla-mail -mysql -nc -netdump-server -nmap -openldap-servers -perl-CPAN -perl-DBD-MySQL -php -ppc64-utils -ppp -pxe -quagga -radvd -rarpd -rdate -rdesktop -redhat-config-netboot # dep on tftp-server -redhat-logos -rh-postgresql-devel -rp-pppoe -rsh -s390utils -samba -sendmail -squirrelmail -stunnel -talk -tftp -tftp-server -tkinter -tn5250 -tsclient -ttfprint -uucp -vnc -vnc-server -wvdial -x3270-text -xchat -yaboot -ypserv -zsh _EOF_ fi ################## # Save off SSH Keys if they already exist # Notice that we dont just store it in /tmp # that way if the Jumpstart does not complete, # we can restart it and the keys will stil # live in /sa until the %post script # moves them back # if grep -q cciss/c0d0p1 /proc/partitions then mkdir /mnt/sysimage mount /dev/cciss/c0d0p1 /mnt/sysimage && mkdir -p /mnt/sysimage/sa && mount /dev/cciss/c0d3p2 /mnt/sysimage/sa && mkdir -p /mnt/sysimage/sa/sshkeys && cp -p /mnt/sysimage/etc/ssh/ssh_host* /mnt/sysimage/sa/sshkeys || echo "Unable to preserve SSH Host Keys" > /dev/console umount /mnt/sysimage/sa umount /mnt/sysimage rmdir /mnt/sysimage fi ################## # Debugging if grep -q DEBUGSH /proc/cmdline then echo "%pre section finished" > /dev/console echo "Exit shell to resume installation" > /dev/console sh >&0 2>&0 fi ################################################################################ # Post Tasks %post stty -raw echo ################## # Debugging if grep -q DEBUGSH /proc/cmdline then echo echo "Starting %post section" > /dev/console echo "Exit shell to resume installation" > /dev/console sh >&0 2>&0 fi echo "Begin Kickstart Post-Tasks `date`" | tee -a /var/log/kickstart.log ########### # Constants NFS_SERVER=nile.nfs.nwie.net NFS_ROOT=/sa/cd BUILD_DIR=/vol/cd/redhat/build/rhas3i.05.1 ########### # Set Time ntpdate timehost.nfs.nwie.net hwclock --systohc ########### # Mount NFS /sbin/service portmap start mkdir -p /vol/cd mount -o ro $NFS_SERVER:$NFS_ROOT /vol/cd if [ $? -ne 0 ]; then echo "Couldn't mount $NFS_SERVER:$NFS_ROOT. Quitting." | tee -a /var/log/kickstart.log exit 1 fi ###################### # Restore SSH Keys if [ -d /sa/sshkeys ] then mv /sa/sshkeys/* /etc/ssh rmdir /sa/sshkeys fi ###################### # Run the tasks script . $BUILD_DIR/ks_post_tasks.sh `cat /proc/cmdline` 2>&1 | tee -a /var/log/kickstart.log > /dev/console echo "End Kickstart Post-Tasks `date`" | tee -a /var/log/kickstart.log ################## # Debugging if grep -q DEBUGSH /proc/cmdline then echo "Finishing section Complete" > /dev/console echo "Exit shell to complete installation" > /dev/console sh >&0 2>&0 fi umount /vol/cd; exit 0