In the rare case of a disk crash (or some novice removing /boot), the sysadmin needs an alternative way to boot the machine and restore a backup. The install medium usually provides a possibility to repair boot problems or format a defective disk.
Today we're talking about SunOS 4.1.1 for the Sun3 series of Sun Microsystems Inc. Sun has recently dropped the support for the Sun3 line completely, but most of these machines are still in good working condition (this paper was written on a Sun 3/60) and are still usefull for people, that can't afford thousands of dollars to buy a high-end PC or SPARC workstation.
This paper copes with install media for the SunOS 4.1.1 in general and it might help such people, that are in big trouble or have the need for (re-)installing the OS.
Clever sysadmins do have an alternative boot partition on a secondary disk. This will help in case of troubles. But it is even possible to install SunOS from a disk. This was never supported by Sun, but it can be made to work.
Device SCSI-id PROM boot command sd0 0 sd(0,0,slice) sd2 1 sd(0,8,slice) sd4 2 sd(0,10,slice) sd6 3 sd(0,18,slice) st0 4 st(0,0,file) st1 5 st(0,8,file) sr0 6 sd(0,30,slice)
Device MB Comment Archive Phyton 60 QIC-11 and QIC-24 Wangtec 60 QIC-11 and QIC-24 Archive Phyton 150 QIC-150, can read QIC-11 and QIC-24 Wangtec 150 QIC-150, can read QIC-11 and QIC-24 Exabyte 8200 2000 8mm Exabyte 8205 5000 8mm Exabyte 8500 5000 8mm Exabyte 8505 12000 8mm DDS-1 DAT 2000 4mm DDS-2 DAT 4000 4mm DDS-3 DAT 12000 4mmEvery Sun3 can boot from a QIC-24 tape streamer, as long as the machine does have an SCSI controller. Some Sun3's with newer PROM versions can boot from QIC-150 tapes.
>b sd(0,30,4) sun3 architecture >b sd(0,30,3) sun3x architecture
Machine Version Comment 3/50 1.3 can only boot from sd0 and QIC-24 3/50 2.7 can boot from any disk and QIC-150 3/60 1.6 can boot from any disk and QIC-24 3/60 2.8 can boot from any disk and QIC-150 3/60 3.0 can boot from QIC-150 and cdrom 3/80 2.9.2 can't boot from QIC-150 but from cdrom 3/80 3.0.2 can't boot from QIC-150 but from cdrom 3/80 3.0.3 can boot from QIC-150 and from cdrom 3/260 2.0 can't boot from QIC-150 or cdrom 3/260 3.0 can boot from QIC-150 and cdrom 3/470 3.0 can boot from QIC-150 and cdrom
Insert the tape or cdrom into the drive. To boot from tape, enter from the boot monitor:
>b st()This loads the first file (called tpboot) on tape into memory and executes it. Tpboot then loads file #3 (called munix) and runs it.
With the cdrom, enter:
>b sd(0,30,4) (sun3) >b sd(0,30,3) (sun3x)This will load munix (including minixfs) directly.
Munix is a special kernel (a vmunix without v), that resides completely in memory. It's root file system is loaded from file #4 of the tape or from cdrom into the memory too. Two special device drivers are involved here: the ns-device (no-swap) and the rd-device (ramdisk). Xkernel user should have heard about them already. They are not part of the SunOS distribution; they are only built into the munix kernel. This makes it impossible to configure such a munix kernel.
#dd if=/dev/nrst8 of=/dev/rsd0b bs=100k conv=syncThen the system is rebooted with the command:
>b sd(0,0,1) -swNotice, that the miniroot kernel uses partition b both for the root filesystem and swapping! This can only work, if the real partition b is bigger than the miniroot filesystem (7 MB). I'd recommend about 4 times the main memory of the machine (e.g. at least 16 MB) for swap.
#/usr/etc/install/xdrtoc < /tmp/xdrtocIt is not easy to make xdrtoc files. I used "hexvi" and "beav" to modify existing ones and this worked great. You can find a couple of usefull xdrtoc files in Appendix C.
#mount -r -t hsfs /dev/sr0 /cdrom #cd /cdrom #tar cf - . | ( cd /tmp ; tar xpf - )The only files, which are still missing now are munix and the munix filesystem. Unfortunately, it is nearly impossible to extract them.
#newfs /dev/rsd2a #mount -r -t hsfs /dev/sr0 /cdrom #mount /dev/sd2a /mnt #cd /cdrom #tar cf - . | ( cd /mnt ; tar xpf -)If you only have the tape files, refer to Appendix A, how to convert them. At last, copy the miniroot onto partition b:
#cd /mnt/export/exec/kvm/sun3_sunos_4_1_1 #dd if=miniroot.sun3 of=/dev/rsd2b bs=100k conv=sync
Now boot into the miniroot: #halt >b sd(0,8,1) -swIf the miniroot prompt shows up, mount the faked partition:
#/etc/mount -r /dev/sd2a /usr/etc/install/tarRename the "umount" command, so "suninstall" cannot unmount the fake partition by accident (and it tries to do so several times):
#mv /etc/umount /etc/um #suninstallIf you're done, rename "umount" back before you reboot:
#mv /etc/um /etc/umount #reboot
#cd /tmp #dd if=tape1.05 of=/dev/rsd2e bs=100k #ftpChange the Makefile to produce a staically linked "gzip" by adding "-static" to the LDFLAGS.
>bin >cd /pub/gnu >get gzip-1.2.4.tar >bye #tar xvf gzip-1.2.4.tar #cd gzip-1.2.4 #./configure
#make #strip gzip #mount /dev/sd2e /mnt #rm /mnt/usr/ucb/uncompress /mnt/usr/ucb/zcat #cp gzip /mnt/usr/ucb/uncompress #ln /mnt/usr/ucb/uncompress /mnt/usr/ucb/zcat #umount /mnt #dd if=/dev/rsd2e of=tape1.05 bs=100k count=70 #foreach i (`file *|grep compress|sed -e "s/:.*$//"`) #mv $i $i.Z #uncompress $i.Z #gzip $i #end #rm tape1.29 tape1.30 tape2.01 tape2.02Copy the xdrtoc file for the QIC-150 tapes to tape1.02 and save all files onto a QIC-24 tape.
#dd if=/tmp/miniroot of=/dev/rsd2e bs=100k #mount /dev/sd2e /mntAnd you can modify the miniroot for your needs. Later, save it back to file:
#umount /mnt #dd if=/dev/rsd2e of=/tmp/miniroot bs=100k count=70I made a couple of modifications to the miniroot filesystem to suit my personal needs: I added some usefull commands like gzip, tcsh and others. Then i compiled a new kernel with some third party device drivers and more devices.
tape files cdrom files -------------------------------------------------------------------- - ./avail_arches tape1.08 ./export/exec/kvm/sun3_sunos_4_1_1/kvm tape1.05 ./export/exec/kvm/sun3_sunos_4_1_1/miniroot_sun3 tape1.12 ./export/exec/kvm/sun3_sunos_4_1_1/sys tape1.02 ./export/exec/kvm/sun3_sunos_4_1_1/xdrtoc tape1.06 ./export/exec/proto_root_sunos_4_1_1 tape1.24 ./export/exec/sun3_sunos_4_1_1/debugging tape1.16 ./export/exec/sun3_sunos_4_1_1/demo tape2.03 ./export/exec/sun3_sunos_4_1_1/games tape1.27 ./export/exec/sun3_sunos_4_1_1/graphics tape1.09 ./export/exec/sun3_sunos_4_1_1/install tape1.10 ./export/exec/sun3_sunos_4_1_1/networking tape1.18 ./export/exec/sun3_sunos_4_1_1/openwindows_demo tape1.19 ./export/exec/sun3_sunos_4_1_1/openwindows_fonts tape2.06 ./export/exec/sun3_sunos_4_1_1/openwindows_programmers tape1.17 ./export/exec/sun3_sunos_4_1_1/openwindows_users tape1.23 ./export/exec/sun3_sunos_4_1_1/rfs tape2.05 ./export/exec/sun3_sunos_4_1_1/security tape1.26 ./export/exec/sun3_sunos_4_1_1/shlib_custom tape1.14 ./export/exec/sun3_sunos_4_1_1/sunview_demo tape1.25 ./export/exec/sun3_sunos_4_1_1/sunview_programmers tape1.13 ./export/exec/sun3_sunos_4_1_1/sunview_users tape1.11 ./export/exec/sun3_sunos_4_1_1/system_v tape1.15 ./export/exec/sun3_sunos_4_1_1/text tape1.22 ./export/exec/sun3_sunos_4_1_1/tli tape1.20 ./export/exec/sun3_sunos_4_1_1/user_diag tape1.07 ./export/exec/sun3_sunos_4_1_1/usr tape1.28 ./export/exec/sun3_sunos_4_1_1/uucp tape2.04 ./export/exec/sun3_sunos_4_1_1/versatec tape1.21 ./export/share/sunos_4_1_1/manual tape1.29+ tape2.10 ./_copyright tape2.08 ./patches/sunos_4_1_1/patch_cplusplus_2_0 tape2.07 ./patches/sunos_4_1_1/patch_ipc tape2.09 ./patches/sunos_4_1_1/patch_taac - ./patches/sunos_4_1_1/_readme
tape files cdrom files --------------------------------------------------------------------- tape1.01 /usr/kvm/stand/tpboot.sun3 tape1.02 ./export/exec/kvm/sun3_sunos_4_1_1/xdrtoc tape1.03 munix (vmunix on partition d of CDROM) tape1.04 munixfs (hm... it is somewhere on part. d too) tape1.05 ./export/exec/kvm/sun3_sunos_4_1_1/miniroot_sun3 tape1.06 ./export/exec/proto_root_sunos_4_1_1 tape1.07 ./export/exec/sun3_sunos_4_1_1/usr tape1.08 ./export/exec/kvm/sun3_sunos_4_1_1/kvm tape1.09 ./export/exec/sun3_sunos_4_1_1/install tape1.10 ./export/exec/sun3_sunos_4_1_1/networking tape1.11 ./export/exec/sun3_sunos_4_1_1/system_v tape1.12 ./export/exec/kvm/sun3_sunos_4_1_1/sys tape1.13 ./export/exec/sun3_sunos_4_1_1/sunview_users tape1.14 ./export/exec/sun3_sunos_4_1_1/sunview_demo tape1.15 ./export/exec/sun3_sunos_4_1_1/text tape1.16 ./export/exec/sun3_sunos_4_1_1/demo tape1.17 ./export/exec/sun3_sunos_4_1_1/openwindows_users tape1.18 ./export/exec/sun3_sunos_4_1_1/openwindows_demo tape1.19 ./export/exec/sun3_sunos_4_1_1/openwindows_fonts tape1.20 ./export/exec/sun3_sunos_4_1_1/user_diag tape1.21 ./export/share/sunos_4_1_1/manual tape1.22 ./export/exec/sun3_sunos_4_1_1/tli tape1.23 ./export/exec/sun3_sunos_4_1_1/rfs tape1.24 ./export/exec/sun3_sunos_4_1_1/debugging tape1.25 ./export/exec/sun3_sunos_4_1_1/sunview_programmers tape1.26 ./export/exec/sun3_sunos_4_1_1/shlib_custom tape1.27 ./export/exec/sun3_sunos_4_1_1/graphics tape1.28 ./export/exec/sun3_sunos_4_1_1/uucp tape1.29 ./_copyright tape2.01 xdrtoc tape2.02 xdrtoc tape2.03 ./export/exec/sun3_sunos_4_1_1/games tape2.04 ./export/exec/sun3_sunos_4_1_1/versatec tape2.05 ./export/exec/sun3_sunos_4_1_1/security tape2.06 ./export/exec/sun3_sunos_4_1_1/openwindows_programmers tape2.07 ./patches/sunos_4_1_1/patch_ipc tape2.08 ./patches/sunos_4_1_1/patch_cplusplus_2_0 tape2.09 ./patches/sunos_4_1_1/patch_taac tape2.10 ./_copyright