# Example kickstart. Search for CHANGEME and change it. # the /deleteme parition is used as a spacesaver for the Dell Utility # parition. The post install will put the Dell Utility partition in place. # Kickstart file for Red Hat Linux AS2.1 for SCSI PE1655MC # L A N G U A G E S P E C I F I C A T I O N (Required for upgrade) lang en_US #L A N G U A G E S U P P O R T langsupport en_US # N E T W O R K C O N F I G U R A T I O N network --bootproto dhcp --nameserver CHANGEME --gateway CHANGEME # I N S T A L L A T I O N M E T H O D (Required for upgrade) url --url http://CHANGEME/redhat/redhat-2.1AS # Installation mode text # D E V I C E S P E C I F I C A T I O N (Required for upgrade) device scsi aic7xxx # O T H E R D E V I C E device eth eepro100 device eth e1000 device eth acenic device eth 3c90x device eth bcm5700 device eth tg3 # R E B O O T S P E C I F I C A T I O N #reboot yes # K E Y M A P S P E C I F I C A T I O N (Required for upgrade) keyboard us # M O U S E S P E C I F I C A T I O N mouse generic3ps/2 --emulthree # P A R T I T I O N S P E C I F I C A T I O N zerombr yes #might be a bug in "--drive" option. see http://www.redhat.com/mailing-lists/kickstart-list/msg06477.html #we want to delete the Dell utility partition, too, so we can remake it. clearpart --drives=sda --all #/delete me is a placeholder for the dell utility partition that POST puts there. part /deleteme --start 1 --end 4 --ondisk sda --asprimary part /home --size 30720 --ondisk sda part /var --size 2048 --ondisk sda part /usr/local --size 31744 --grow --ondisk sda part /boot --size 40 --ondisk sda part /usr --size 3706 --ondisk sda part / --size 512 --ondisk sda part swap --size 1024 --ondisk sda #firewall information firewall --disabled # I N S T A L L / U P G R A D E S P E C I F I C A T I O N install # T I M E Z O N E S P E C I F I C A T I O N timezone US/Central # X W I N D O W S Y S T E M S P E C I F I C A T I O N # Do our own xconfiguration manually with RPMS skipx yes # R O O T P A S S W O R D #rootpw --iscrypted CHANGEME rootpw CHANGEME authconfig --useshadow --enablemd5 # L I L O C O N F I G U R A T I O N (Required for upgrade) bootloader --location partition --linear # P A C K A G E S P E C I F I C A T I O N %packages @Server @NFS File Server @Windows File Server @Anonymous FTP Server #@SQL Database Server @Web Server @DNS Name Server @Network Managed Workstation @Emacs @Utilities @Software Development @Kernel Development @GNOME #@KDE pdksh parted util-linux eject fileutils # PRE-INSTALLATION COMMANDS # fix mozilla lock up issue on fast P4 processor machines %pre while true; do ID=$( ps ax | grep regxpcom | grep -v grep | cut -b1-6 ) if [ ! -z "$ID" ]; then sleep 60 kill -9 $ID fi sleep 1 done & # P O S T - I N S T A L L A T I O N C O M M A N D S %post mkdir /tmp/save cp /tmp/ks* /tmp/save exec > /tmp/ks.log exec 2> /tmp/ks-error.log echo Start of Kickstart %post section echo Start of Kickstart %post section >&2 /bin/echo "Red Hat Enterprise Linux 2.1 `/bin/date`" > /etc/motd # refresh root account with /etc/skel # cp -fr /etc/skel/.[a-z,A-Z]* /etc/skel/* /root #this line got changed cp -fr /etc/skel/.gnome /etc/skel/.kde* /etc/skel/Desktop /root GREP=/bin/grep AWK=/bin/awk # disable services /sbin/chkconfig --level 0123456 postgresql off /sbin/chkconfig --level 0123456 innd off /sbin/chkconfig --level 0123456 gated off /sbin/chkconfig --level 0123456 dhcpd off /sbin/chkconfig --level 0123456 apmd off /sbin/chkconfig --level 0123456 pcmcia off # set default desktop to gnome echo GNOME > /etc/sysconfig/desktop mkdir /mnt/up #No USB modules, so can't access CDROM #mount -t iso9660 /dev/scd0 /mnt/up #We'll grab the ISO over the network and mount it. HACK! pushd /tmp wget -q http://CHANGEME/redhat/ks/dell-blade-rhas.iso popd mount -o loop -t iso9660 /tmp/dell-blade-rhas.iso /mnt/up echo "Doing reconfig and XF86...." echo "Doing reconfig and XF86...." >&2 cp /mnt/up/extra/dell/reconfig /etc/init.d/reconfig cp /mnt/up/extra/dell/x_4 /etc/X11/XF86Config-4 cp /mnt/up/extra/dell/x_4 /tmp/new-xfconfig ln -sf /usr/X11R6/bin/XFree86 /etc/X11/X echo "Done reconfig and XF86...." echo "Done reconfig and XF86...." >&2 # Install needed modules from the UP partition echo "Installing modules from CD...." echo "Installing modules from CD...." >&2 #rpm -Uvh /mnt/up/*.rpm cp /mnt/up/extra/ddmodules/2.4.9-e.3/tg3_12e3.o /lib/modules/2.4.9-e.3/kernel/drivers/net/tg3.o cp /mnt/up/extra/ddmodules/2.4.9-e.3/mptscsih.o /lib/modules/2.4.9-e.3/kernel/drivers/message/fusion/mptscsih.o cp /mnt/up/extra/ddmodules/2.4.9-e.3/mptbase.o /lib/modules/2.4.9-e.3/kernel/drivers/message/fusion/mptbase.o echo "/lib/modules/2.4.9-e.3/kernel/drivers/message/fusion/mptscsih.o: /lib/modules/2.4.9-e.3/kernel/drivers/message/fusion/mptbase.o /lib/modules/2.4.9-e.3/kernel/drivers/scsi/scsi_mod.o" >> /lib/modules/2.4.9-e.3/modules.dep cp /mnt/up/extra/ddmodules/2.4.9-e.3smp/tg3_12e3.o /lib/modules/2.4.9-e.3smp/kernel/drivers/net/tg3.o cp /mnt/up/extra/ddmodules/2.4.9-e.3smp/mptscsih.o /lib/modules/2.4.9-e.3smp/kernel/drivers/message/fusion/mptscsih.o cp /mnt/up/extra/ddmodules/2.4.9-e.3smp/mptbase.o /lib/modules/2.4.9-e.3smp/kernel/drivers/message/fusion/mptbase.o echo "/lib/modules/2.4.9-e.3smp/kernel/drivers/message/fusion/mptscsih.o: /lib/modules/2.4.9-e.3smp/kernel/drivers/message/fusion/mptbase.o /lib/modules/2.4.9-e.3smp/kernel/drivers/scsi/scsi_mod.o" >> /lib/modules/2.4.9-e.3smp/modules.dep #If you want, just install the new kernels now! #echo "Installing new kernel RPMs from server...." #echo "Installing new kernel RPMs from server...." >&2 #rpm -Uvh http://CHANGEME/redhat/updates/2.1AS/kernel-2.4.9-e.12.i686.rpm #rpm -Uvh http://CHANGEME/redhat/updates/2.1AS/kernel-smp-2.4.9-e.12.i686.rpm echo "Attempting to write out Dell Utility Partition...." echo "Attempting to write out Dell Utility Partition...." >&2 #Unmount /dev/sda1 umount /deleteme rmdir /deleteme #Let's write out Dell Utility Partition dd if=/mnt/up/extra/dell/dellutil.bin of=/dev/sda1 echo "Wrote out Dell Utility Partition...." echo "Wrote out Dell Utility Partition...." >&2 umount /mnt/up rmdir /mnt/up rm /tmp/dell-blade-rhas.iso echo -e Syncing disks "\r" /bin/sync; /bin/sync; /bin/sync echo -e All done! "\r" # Enable reconfig mode (choose language, keyboard, time zone, root # password, etc. on reboot) # touch /etc/reconfigSys #Fix broken bcm5820 line (left from 7.3 install.. prolly not required) sed -e '/pass .1.3.6.1.4.1.4413.4.1/s/ucd5820stat/get5820stats/' /etc/snmp/snmpd.conf > /etc/snmp/snmpd.conf-new mv /etc/snmp/snmpd.conf-new /etc/snmp/snmpd.conf # Add support for USB keyboard echo -e "below usbkbd hid" >> /etc/modules.conf # Clean up modules.conf grep -v "alias eth[0-9]" /etc/modules.conf > /etc/tmpmodules.conf mv /etc/tmpmodules.conf /etc/modules.conf # Writing Driver info to /etc/modules.conf echo -e "alias eth0 tg3" >> /etc/modules.conf echo -e "alias eth1 tg3" >> /etc/modules.conf # Turn off DMA on CDROM echo "Turning off DMA on CDROM drives. " cd /etc/sysconfig for i in /proc/ide/*; do if [ -e $i/media ]; then if grep -q ^cdrom $i/media; then drive=$( basename $i ) echo Disabling DMA for CDROM /dev/$drive sed 's/^# USE_DMA=1/USE_DMA=0/' harddisks > harddisk$drive fi fi done echo "NETWORKING=yes" >> /etc/sysconfig/tmpnetwork echo "HOSTNAME=CHANGEME.domain.com" >> /etc/sysconfig/tmpnetwork echo "GATEWAY=CHANGEME" >> /etc/sysconfig/tmpnetwork mv /etc/sysconfig/tmpnetwork /etc/sysconfig/network echo "DEVICE=eth0" >> /etc/sysconfig/network-scripts/tmp echo "ONBOOT=yes" >> /etc/sysconfig/network-scripts/tmp echo "BOOTPROTO=dhcp" >> /etc/sysconfig/network-scripts/tmp mv /etc/sysconfig/network-scripts/tmp /etc/sysconfig/network-scripts/ifcfg-eth0 sed -e "s/ localhost$/ localhost CHANGEME.domain.com/g" /etc/hosts > /etc/hosts.tmp mv /etc/hosts.tmp /etc/hosts cat /etc/resolv.conf | sed '/^search/d' > /etc/resolv.tmp mv /etc/resolv.tmp /etc/resolv.conf cat /etc/resolv.conf | sed '/^$/d' > /etc/resolv.tmp mv /etc/resolv.tmp /etc/resolv.conf echo "search CHANGEME.com" >> /etc/resolv.conf echo "Changing type on Dell Utility Partition...." echo "Changing type on Dell Utility Partition...." >&2 #Change the type to Dell Utility /sbin/sfdisk -q --change-id /dev/sda 1 de # Will we need this to set the partition active? /sbin/parted -s /dev/sda set 2 boot on #Remove sda1 from fstab echo "Removing deleteme partition from fstab...." echo "Removing deleteme partition from fstab...." >&2 cat /etc/fstab | sed '/^LABEL=\/deleteme/d' > /etc/fstab.tmp mv /etc/fstab.tmp /etc/fstab echo "Recreating initial ramdisks for install kernel...." echo "Recreating initial ramdisks for install kernel...." >&2 /sbin/mkinitrd -f /boot/initrd-2.4.9-e.3.img 2.4.9-e.3 /sbin/mkinitrd -f /boot/initrd-2.4.9-e.3smp.img 2.4.9-e.3smp #Eject CD #Again, the USB modules don't exist, so no CDROM device works #echo "Ejecting CDROM...." #echo "Ejecting CDROM...." >&2 #eject /dev/scd0