#! /bin/csh -f # # script for setting up "graphics1" # # # install RedHat 7.3 # Mouse: Generic 5-button # Custom # Manually Patrition with disk druid: # "/boot"=100MB "/"=4600MB, 4x swap=2048 each and the rest in /local # use LILO # for eth1 # IP: 192.168.1.101 # NM: 255.255.0.0 # NW: 192.168.0.0 # BC: 192.168.255.255 # hostname: graphics1.bl831.als.lbl.gov # Gateway: 192.168.1.1 # DNS: 192.168.1.1 # no firewall # Los Angeles time # no users other than root # install "Everything" # no boot disk # graphical login # login as root # change starthere: preferences: Sawfish window manager : Focus behavior : "click" -> "enter only" # Change Mozilla to Netscape # remove the up2date icon from panel # copy the root passwordless login info tcsh ssh root@192.168.1.1 "tar cf - .ssh .ssh2" | tar xvf - # should have to enter password here # doing this for the first time? # F-secure ssh-keygen2 echo "Key id_dsa_2048_a.pub" > .ssh2/authorization echo "IdKey id_dsa_2048_a" > .ssh2/identification # OpenSSH ssh-keygen cp .ssh/id_dsa.pub .ssh/authorized_keys2 # copy global files from server cd / set files = ( /etc/hosts /etc/passwd /etc/shadow /etc/group /etc/resolv.conf /etc/mosix.map ) foreach file ( $files ) if(-e $file) cp -p $file ${file}.orig end ssh 192.168.1.1 "cd / ; tar cf - $files" | tar xvf - pwconv # enable rsh, rlogin, rexec echo "+" >! /etc/hosts.equiv foreach file ( `grep -l rhosts /etc/pam.d/*` ) cp ${file} ${file}.orig awk '/rhosts/{$0=$0 " no_rhosts promiscuous"} {print}' ${file}.orig >! $file end # create needed directories for NFS ln -sf /home/programs /programs mkdir /data /data2 /data3 /data4 if (-e /local) chmod a+rwxt /local mv /tmp /local ln -sf /local/tmp /tmp cp -p /etc/fstab /etc/fstab.orig cat /etc/fstab.orig |\ egrep -v "cdrom|zip|floppy" >! /etc/fstab cat << EOF >> /etc/fstab /dev/cdrom /dvdrom iso9660 noauto,owner,kudzu,ro 0 0 /dev/cdrom1 /cdr iso9660 noauto,owner,kudzu,ro 0 0 /dev/hdb4 /zip auto noauto,owner,kudzu 0 0 /dev/fd0 /floppy auto noauto,owner,kudzu 0 0 server:/home /home nfs rw,wsize=8096,rsize=8096,soft,intr,bg,tcp,async server:/data /data nfs rw,wsize=8096,rsize=8096,soft,intr,bg,tcp,async #graphics1:/data2 /data2 nfs rw,wsize=8096,rsize=8096,soft,intr,bg,async graphics2:/data3 /data3 nfs rw,wsize=8096,rsize=8096,soft,intr,bg,async graphics3:/data4 /data4 nfs rw,wsize=8096,rsize=8096,soft,intr,bg,async EOF mkdir /dvdrom mkdir /floppy mkdir /zip mount -a # make sure we keep good time rdate -s cgsrv.als.lbl.gov ; hwclock -w cp -p /etc/ntp.conf /etc/ntp.conf.orig cat << EOF >> /etc/ntp.conf server cgsrv.als.lbl.gov server usno.pa-x.dec.com server time.nist.gov server tick.ucla.edu EOF cp -p /etc/rc.local /etc/rc.local.orig cat << EOF >> /etc/rc.local # fix the damn clock rdate -s cgsrv.als.lbl.gov hwclock -w EOF # set up printer printconf-tui # New # Queue Name: hp2100tn # Queue Type: Jetdirect Printer # IP: printer # Driver: Postscript Printer # set up runlevel #ntsysv chkconfig amandaidx off chkconfig amanda off chkconfig amd off chkconfig amidxtape off chkconfig anacron on chkconfig apmd off chkconfig arpwatch off chkconfig atd on chkconfig autofs off chkconfig bcm5820 off chkconfig bgpd off chkconfig bootparamd off chkconfig chargen off chkconfig chargen-udp off chkconfig comsat off chkconfig crond on chkconfig daytime on chkconfig daytime-udp on chkconfig dbskkd-cdb off chkconfig dhcpd off chkconfig echo on chkconfig echo-udp on chkconfig eklogin off chkconfig finger on chkconfig gated off chkconfig gpm on chkconfig gssftp off chkconfig httpd off chkconfig identd on chkconfig imap off chkconfig imaps off chkconfig innd off chkconfig ipchains off chkconfig ipop2 off chkconfig ipop3 off chkconfig iptables off chkconfig irda off chkconfig iscsi off chkconfig isdn off chkconfig junkbuster off chkconfig kadmin off chkconfig kdcrotate off chkconfig keytable on chkconfig klogin off chkconfig kprop off chkconfig krb524 off chkconfig krb5kdc off chkconfig krb5-telnet off chkconfig kshell off chkconfig kudzu on chkconfig ldap off chkconfig linuxconf on chkconfig linuxconf-web off chkconfig lpd on chkconfig mars-nwe off chkconfig mcserv off chkconfig mysqld off chkconfig named off chkconfig netfs on chkconfig network on chkconfig nfslock on chkconfig nfs on chkconfig nscd on chkconfig ntalk on chkconfig ntpd on chkconfig ospf6d off chkconfig ospfd off chkconfig pcmcia off chkconfig pop3s off chkconfig portmap on chkconfig postgresql off chkconfig pxe off chkconfig radvd off chkconfig random on chkconfig rarpd off chkconfig rawdevices on chkconfig reconfig on chkconfig rexec on chkconfig rhnsd off chkconfig ripd off chkconfig ripngd off chkconfig rlogin on chkconfig routed off chkconfig rsh on chkconfig rstatd on chkconfig rsync on chkconfig rusersd on chkconfig rwalld on chkconfig rwhod on chkconfig sendmail on chkconfig sgi_fam on chkconfig smb off chkconfig snmpd off chkconfig squid off chkconfig sshd on chkconfig swat off chkconfig syslog on chkconfig talk on chkconfig telnet on chkconfig tftp on chkconfig time on chkconfig time-udp on chkconfig tux off chkconfig ups off chkconfig vncserver off chkconfig wine off chkconfig wu-ftpd off chkconfig xfs on chkconfig xinetd on chkconfig ypbind off chkconfig yppasswdd off chkconfig ypserv off chkconfig ypxfrd off chkconfig zebra off # downgrade gcc # upgrade the compiler #wget http://mirrors.rcn.net/pub/sourceware/gcc/releases/gcc-3.2/gcc-3.2.tar.gz cd /usr/src tar xzvf /programs/install/gcc-2.95*.tar.gz cd gcc-* ./configure --prefix /usr make make install # install F-secure SSH # cd /programs/install # wget ftp://ftp.ssh.com/pub/ssh/ssh-1.2.33.tar.gz # wget ftp://ftp.ssh.com/pub/ssh/ssh-3.2.3.tar.gz cd /usr/src rm -f ssh-1* tar xzvf /programs/install/ssh-1.2.33.tar.gz cd ssh-1* ./configure --prefix /usr make make install cd /usr/src rm -rf ssh-3* tar xzvf /programs/install/ssh-3.2.3.tar.gz cd ssh-3* ./configure --prefix /usr make make install # edit the config files echo "Ssh1Compatibility yes" >> /etc/ssh2/ssh2_config echo "Ssh1InternalEmulation no" >> /etc/ssh2/ssh2_config echo "Ssh1Path /usr/bin/ssh1" >> /etc/ssh2/ssh2_config echo "Ssh1Compatibility yes" >> /etc/ssh2/sshd2_config echo "Sshd1Path /usr/sbin/sshd1" >> /etc/ssh2/sshd2_config # upgrade openssh #cd /usr/src #tar xzvf /programs/install/openssh-*.tar.gz #cd openssh-* #./configure --prefix=/usr #make #make install #echo "CloseOnSIGCHLD yes" >> /etc/ssh/sshd_config # upgrade dhcpd # wget ftp://ftp.isc.org/isc/dhcp/dhcp-latest.tar.gz cd /usr/src tar xzvf /programs/install/dhcp-latest.tar.gz cd dhcp* ./configure make make install touch /var/state/dhcp/dhcpd.leases # get Xdiff installed cp /programs/install/xdiff/xdiff /usr/X11R6/bin/ cp /programs/install/xdiff/XDiff /usr/X11R6/lib/X11/app-defaults/ # prepare for touch screen chmod a+rw /dev/ttyS0 chmod a+rw /dev/ttyS1 # copy the RH7.2 library (why do we need this?) scp crush:/usr/lib/libstdc++.so.3 /usr/lib scp crush:/lib/libgcc_s.so.1 /lib # upgrade the kernel set Version = 2.4.20 cp -p /etc/lilo.conf /etc/lilo.conf.orig set root = `awk -F "[=\t ]" '$1=="default"{label=$2} $2=="label" && $3==label{++default} default!="" && $2=="root"{print $3;exit}' /etc/lilo.conf.orig` set append = `awk '/append=/{print}' /etc/lilo.conf.orig` awk '/default/{$0="default=linux-2420"} {print}' /etc/lilo.conf.orig >! /etc/lilo.conf echo "" >> /etc/lilo.conf echo "image=/boot/vmlinuz-${Version}" >> /etc/lilo.conf echo "\tlabel=linux-2420" >> /etc/lilo.conf echo "\troot=$root" >> /etc/lilo.conf echo "\t$append" >> /etc/lilo.conf echo "" >> /etc/lilo.conf #wget http://www.kernel.org/pub/linux/kernel/v2.4/linux-${version}.tar.gz cd /usr/src bunzip2 -c /programs/install/linux-${Version}*.tar.bz2 |\ tar xvf - rm -f linux-2.4 ln -sf linux-${Version} linux-2.4 cd linux-2.4 cp -f /usr/src/linux-*/configs/kernel-*-athlon.config .config # turn on Intel gigabit (e1000) echo "CONFIG_HIGHMEM=y" >> .config echo "CONFIG_HIGHIO=y" >> .config # turn on 3com gigabit (tg3) echo "CONFIG_TIGON3=m" >> .config # turn on intel gigabit (e1000) echo "CONFIG_E1000=m" >> .config # turn on TCP nfs echo "CONFIG_NFSD_TCP=y" >> .config make menuconfig # turn on all IEEE1394 options echo "CONFIG_IEEE1394_ETH1394=m" >> .config echo "CONFIG_IEEE1394_DV1394=m" >> .config echo "CONFIG_IEEE1394_CMP=m" >> .config echo "CONFIG_IEEE1394_AMDTP=m" >> .config echo "CONFIG_IEEE1394_VERBOSEDEBUG=y" >> .config # turn on all NTFS options echo "CONFIG_NTFS_FS=y" >> .config echo "CONFIG_NTFS_RW=y" >> .config # save and exit # patch samba for large file support patch -p1 < /programs/install/samba/01-smbfs-2.4.18-lfs.patch # also need to update smbmount make dep make make bzImage make modules make modules_install make install cd /usr/src/linux-2.4 gunzip -c /boot/initrd-2.4.20.img > initrd.img mount -o loop initrd.img /mnt vi /mnt/linuxrc umount /mnt gzip -c initrd.img > /boot/initrd-2.4.20.img # fix the network card assignments cd /etc/sysconfig/network-scripts awk '/eth0/{print "DEVICE=eth1";next} {print}' ifcfg-eth0 >! ifcfg-ethx awk '/eth1/{print "DEVICE=eth0";next} {print}' ifcfg-eth1 >! ifcfg-eth0 mv ifcfg-ethx ifcfg-eth1 cd /etc cp -p modules.conf modules.conf.orig awk '/eth0/{$NF="e1000"} /eth1/{$NF="eepro100"} {print}' modules.conf.orig >! modules.conf reboot # upgrade the nVidia drivers cd /programs/install/nvidia ./NVchooser.sh rpm -e NVIDIA_GLX rpm -e NVIDIA_kernel set SSDID = `lspci -n | awk '{print $4}' | awk -F ":" '/^10de/{print $NF}'` #wget http://download.nvidia.com/XFree86_40/1.0-4191/NVIDIA_GLX-1.0-4191.i386.rpm #wget http://download.nvidia.com/XFree86_40/1.0-4191/NVIDIA_kernel-1.0-4191.src.rpm rpm --rebuild NVIDIA_kernel-1.0-4191.src.rpm rpm -ivh /usr/src/redhat/RPMS/i386/NVIDIA_kernel-*.i386.rpm rpm -ivh NVIDIA_GLX-1.0-4191.i386.rpm cp /etc/X11/XF86Config-4 /etc/X11/XF86Config-4.original cat /etc/X11/XF86Config-4.original |\ awk '$1=="Driver" && $2 == "\"nv\"" {print "\t Driver \"nvidia\"";next} \ $1=="Driver" && $2 == "\"vesa\"" {print "\t Driver \"nvidia\"";next} \ $1=="Load" && $2 == "\"GLcore\"" {$0= "#" $0}\ $1=="Load" && $2 == "\"dri\"" {$0= "#" $0}\ {print}' |\ cat > /etc/X11/XF86Config-4 diff /etc/X11/XF86Config-4 /etc/X11/XF86Config-4.original # may also have to edit refresh rates of monitor # prevent the lockup-on-paging problem #echo '\tappend="mem=nopentium"' >> /etc/lilo.conf #/sbin/lilo # install MOSIX #wget 'http://prdownloads.sourceforge.net/openmosix/openmosix-kernel-smp-2.4.20-openmosix2.athlon.rpm?use_mirror=easynews' #wget 'http://prdownloads.sourceforge.net/openmosix/openmosix-tools-0.2.4-1.i386.rpm?use_mirror=easynews' rpm -i /programs/install/openmosix-kernel-*${Version}*.rpm /programs/install/openmosix-tools-*${Version}*.rpm cp /etc/lilo.conf /tmp/lilo.conf awk '/default/{$0="default=mosix"} {print}' /tmp/lilo.conf >! /etc/lilo.conf cat << EOF >> /etc/lilo.conf image=/boot/vmlinuz-openmosix label=mosix root=$root EOF lilo # configure mosix echo "1 192.168.2.1 16" >> /etc/mosix.map