Installing Unix Seventh Edition
There is a Setting Up Unix - Seventh Edition document, but it is mostly a checklist of what to do to install Unix Seventh Edition on a PDP-11 (one of the models supporting memory management with split Instruction and Data spaces); it does not provide much technical detail on what is actually happening.
Unix Seventh Edition (often called Unix V7) was normally installed from a tape; it was possible to install Unix on a machine without a tape drive, by copying disk packs with Unix on them, but this was not Bell Laboratories' usual distribution method. Thus, installing Unix V7 usually required a machine with a tape drive, and one or more disk drives.
The supported tape drives were the TU10, on a TM11 UNIBUS controller, and the TU16, on a TM02 MASSBUS controller. The supported disk drives were the RP03 on an RP11 UNIBUS controller, and the RP04-RP06, with an internal controller which connected to a MASSBUS. Later changes outside Bell added the RK05, on an RK11 UNIBUS controller, and the RL01 or RL02 on an RL11 UNIBUS controller.
The installation process for V7 seems superficially to be much like that for V6, in that a tape is used, which contained a number of small stand-alone programs, followed by the file systems, but the similarity is purely superficial; the details of the process are wholly different.
The first stage is a tape bootstrap (loaded from block 0, or block 1, depending on the tape drive/controller on the system). That is used to load a stand-alone second-stage bootstrap program, which includes disk and tape drivers, so that it can load programs from either tape or disk. That in turn is used to load from the tape one of a number of intermediate programs which run stand-alone:
These programs are identical in function to the versions which run under time-sharing, but do not depend on an operating system; they include their own disk and tape drivers, along with a rudimentary implementation of the file system.
The procedure is to load 'mkfs', use it to create one or more empty file-systems on the disk(s), and then use 'restor' to load the file system contents into them from the tape. The use of 'mkfs' and dumps, instead of partition images, means that the system can be set up with the desired file-system sizes to begin with, instead of requiring a reconfiguration process after initial installation (as with V6).
As final steps, Unix is booted from the disk (using the still-resident second-level bootstrap program); with Unix running, it is used to install the disk bootstrap in block 0 of the disk(s), so that future booting can be performed directly from the disk.
Installation tape contents
The V7 distribution tape contains a number of 512-byte records, and then a large number of 10240-byte records (for the file system dumps - see below); these are separated into files using interspersed tape-marks:
- File 1:
- Block 0 - mtboot (TM11 tape bootstrap)
- Block 1 - mtboot (TM02 tape bootstrap)
- Blocks 2-xx - second-level bootstrap 'boot'
- File 2: 'cat' (program to copy a file to the console)
- File 3: A list of the files on the tape
- File 4: 'mkfs' (program to create a blank file system)
- File 5: 'restor' (program to restore a file-system from a dump tape)
- File 6: A dump of rp0 (root file-system)
- File 7: A dump of rp3
The 'rp0' dump contains a UNIX root partition, with everything needed to allow UNIX to run: all the commands, and the source for the operating system (to allow reconfiguration of the OS to match the system's hardware). The 'rp3' dump contains source for all the commands, and all the documentation.
The two first-level tape bootstraps are actually identical, not slightly different programs (as with V6), so the installation instructions which say to boot block 0 or block 1, depending on which kind of drive is present, are in fact, confused. (Probably this section of the instructions was simply copied from the V6 instructions, in which they are different programs).
The first-stage tape bootstrap is simply mtboot.s; as noted, it works with either kind of tape drive.
The second-stage bootstrap, 'boot', includes m.s, a machine-language start-up which sets up the memory mapping hardware, boot.c, and a suite of modules (sys.c, conf.c, prf.c and a number of device drivers) which provide OS-like support.
The other commands are similar to 'boot', except that m.s is replaced by srt0.s, and boot.c is replaced with the appropriate main program module (cat.c, mkfs.c and restor.c).