Installing and Operating 2.11BSD on the PDP-11June 13, 1995 Steven Schultz GTE Government Systems112 Lakeview Canyon Thousand Oaks CA 91362sms@wlv.iipo.gtegsc.com ABSTRACT This document contains instructions for the installation and operation of the2.11BSD PDP-11ng UNIX## system. It discusses procedures for installing 2.11BSD UNIX on a PDP-11, includingexplanations of how to lay out file systems on available disks, how to set up terminal lines and user accounts, how to do system-specific tailoring, and how to install and configurethe networking facilities. Finally, the document details system operation procedures: shutdown and startup, hardware error reporting and diagnosis, file system backup proce-dures, resource control, performance monitoring, and procedures for recompiling and reinstalling system software. The ``bugs'' address supplied with this release will work for some unknown periodof time; make sure the ``Index:'' line of the bug report indicates that the release is ``2.11BSD''. See the sendbug(8) program for more details. All fixes that I make, or thatare sent to me, will be posted on USENET, in the news group ``comp.bugs.2bsd''. ng DEC, PDP-11, VAX, IDC, SBI, UNIBUS and MASSBUS are trademarks of Digital Equipment Corporation. ## UNIX is a Trademark of Bell Laboratories. 27 October 1997 setup.2.11 - 2 Installing and Operating 2.11BSD on the PDP-11 1. INTRODUCTION This document explains how to install 2.11BSD UNIX for the PDP-11 on your system. This docu-ment has been revised several times since the first release of 2.11BSD, most recently in July 1995 to reflect the addition of disk labels to the system. The format of the bootable tape has changed. There is now astandalone disklabel program present. While the system call interface is the same as that of 2.10.1BSD, a full bootstrap from the distribution tape is required because the filesystem has changed to allow file nameslonger than 14 characters. Also, the 3 byte block number packing scheme used by earlier versions of UNIX for the PDP-11 has been eliminated. Block numbers are always 4 byte longs now. The procedure for performing a full bootstrap is outlined in chapter 2. The process includes copyinga root file system from the distribution tape into a new file system, booting that root filesystem, and then reading the remainder of the system binaries and sources from the archives on the tapes. As 2.11BSD is not compatible at the filesystem level with previous versions of UNIX on the PDP-11,any upgrade procedure is essentially a full bootstrap. There is a limited ability to access old filesystems which may be used after the system partitions have been loaded from a full bootstrap. It is desirable torecompile most local software after the conversion, as there are changes and performance improvements in the standard libraries. Binaries from 2.10.1BSD which do not read directories or inode structures may be used but should berecompiled to pick up changes in the standard libraries. Note too, that the portable ASCII format of ar(1)archives is now in place - any local archive files will have to be converted using /usr/old/arcv. 1. Hardware supported This distribution can be booted on a PDP-11 with 1Mb of memory or moreng, separate I&D, and withany of the following disks: RK06, RK07Any MSCP disk, including but not limited to: RD53, RD54, RA81, RZ2x RM03, RM05RP04, RP05, RP06 Many other SMD disks, for example: CDC 9766, Fuji 160, Fuji Eagle Other disks are supported (RX23, RX33, RX50, RD51) but are not large enough to hold a rootfilesystem plus a swap partition. The old restriction of using RL02 drives in pairs has been lifted. It is now possible to define a root ('a') partition and a swap partition ('b') and load at least the root filesystem to asingle RL02. Discs which are too small to hold even a root filesystem (floppies for example) may be used as data disks or as standalone boot media, but are not useable for loading the distribution. Others, whilelisted above, are not very well suited to loading the distribution. The RK06/07 drives are hard pressed to ev en hold the system binaries, much less the sources. The tape drives supported by this distribution are: TS11, TU80, TK25TM11, AVIV 6250/1600 TE16, TU45, TU77TK50, TU81, TU81+, TZ30 Although 2.11BSD contains a kernel level floating point simulator, it has never been tested. In fact it wouldnot even compile/assemble without errors! That problem has been fixed but it is still not know if the simulator works, KDJ-11 based systems have builtin floating point so the simulator can not be tested. At therelease of 2.10BSD some thought was given to the possibility of lifting the separate I&D restriction, but ng 2.11BSD would probably only require a moderate amount of squeezing to fit on machines with less memory, but it would also be very unhappy about the prospect. 27 October 1997 Installing and Operating 2.11BSD on the PDP-11 Setup.2.11 - 3 that thought has languished. The work will never be done. As time passes more and more programs havebecome almost too large even with separate I&D. 2. Distribution format The basic distribution contains the following items: (2) 1600bpi 2400' magnetic tapes, or(2) TK25 tape cartridges, or (1) TK50 tape cartridge, and(1) Hardcopy of this document, (1) Hardcopy of the Changes in 2.11BSD document,(1) Hardcopy of the 2.11BSD /README and /VERSION files, and (1) Hardcopy of manual pages from sections 4, and 8. Installation on any machine requires a tape unit. Since certain standard PDP-11 packages do not include atape drive, this means one must either borrow one from another PDP-11 system or one must be purchased separately. The distribution does not fit on several standard PDP-11 configurations that contain only smalldisks. If your hardware configuration does not provide at least 75 Megabytes of disk space you can still install the distribution, but you will probably have to operate without source for the user level commandsand, possibly, the source for the operating system. The root file system now occupies a minimum of 4Mb. If at all possible a larger, 6 or 7Mb, rootpartition should be defined when using the standalone disklabel program. If you have the facilities, it is a good idea to copy the magnetic tape(s) in the distribution kit to guardagainst disaster. The tapes are 9-track 1600 BPI, TK50 or TK25 cartridges and contain some 512-byte records, followed by some 1024-byte records, followed by many 10240-byte records. There are inter-spersed tape marks; end-of-tape is signaled by a double end-of-file. The basic bootstrap material is present in six short files at the beginning of the first tape. The first fileon the tape contains preliminary bootstrapping programs. This is followed by several standalone utilities (disklabel, mkfs (8), restor (8), and icheck (8)ng) followed by a full dump of a root file system (see dump (8)).Following the root file system dump is a tape archive image of /usr except for /usr/src (see tar (1)).Finally, a tape archive of source for include files and kernel source ends the first tape. The second tape contains a tape archive image, also in tar format, of all the remaining source that comes with the system. The entire distribution (barely) fits on a single TK50 cartridge, references to the second tape shouldbe treated as being the 9th file on the TK50. Many of the programs in /usr/src/new hav e been tar+compress'd in order to keep the distribution to a single tape. ng References of the form X(Y) mean the subsection named X in section Y of the UNIX programmer's manual. 27 October 1997 setup.2.11 - 4 Installing and Operating 2.11BSD on the PDP-11 TAPE 1: Tape file Record size Recordsng Contents 0 512 1 primary tape boot block512 1 boot block (some tape boot ROMs go for this copy) 512 69 standalone boot program1 1024 37 standalone disklabel 2 1024 33 standalone mkfs(8)3 1024 35 standalone restor(8) 4 1024 32 standalone icheck(8)5 10240 285 dump of ``root'' file system6 10240 3368 tar dump of /usr, excepting /usr/src7 10240 519 tar dump of /usr/src/include and /usr/src/sys TAPE 2: Tape file Record size Recordsng Contents 0 10240 4092 tar dump of /usr/src, excepting include and sys 3. UNIX device naming UNIX has a set of names for devices which are different from the DEC names for the devices. The disk and tape names used by the bootstrap and the system are: RK06, RK07 disks hkRL01, RL02 disks rl RK05 rkMSCP disks ra RM02/03/05 xpRP04/05/06 xp SMD disks xpTM02/03, TE16, TU45, TU77 tapes ht TE10/TM11 tapes tmTS11 tapes ts TMSCP tapes tms Additionally, the following non-DEC devices are also supported: SI 9500, CDC 9766 siSI, CDC 9775 xp SI6100, Fujitsu Eagle 2351A xpEmulex SC01B or SI9400, Fujitsu 160 xp Emulex SC-21, xp The generic SMD disk driver, xp, will handle most types of SMD disks on one or more controllers (evendifferent types on the same controller). The xp driver handles RM03, RM05, RP04, RP05 and RP06 disks on DEC, Emulex, Dilog, and SI UNIBUS or MASSBUS controllers. MSCP disks and TMSCP tapes include SCSI drives attached to the RQZX1 controller on thePDP-11/93. MSCP disks and TMSCP tapes also include SCSI drives attached to the Emulex UC07 or UC08 Q-BUS controllers on Q-bus systems as well as the UC17 and UC18 controllers on UNIBUS ng The number of records in each tape file are approximate and do not necessarily correspond to the actual number on the tape. 27 October 1997 Installing and Operating 2.11BSD on the PDP-11 Setup.2.11 - 5 systems. The standalone system used to bootstrap the full UNIX system uses device names of the form: xx (c,y,z) where xx is one of hk, ht, rk, rl, tm, ts, tms, or xp. The value c specifies the controller number (0-3). Thisvalue is usually not explicitly given. The default is 0 if booting from the standard (first) CSR of a device. Example: if there are two MSCP controllers in the system addressed as 0172150 and 0172154respectively booting from the controller at 172154 requires that c be given as 1. Booting from the standardCSR of 0172150 would be done by specifying c as 0 or omitting the c parameter. boot automaticallydetects if the first (standard) CSR is being used. All future references will ignore the c parameter byassuming the default value. The value y specifies the device or drive unit to use. The z value is interpreted differently for tapesand disks: for disks it is a partition number (0 thru 7) corresponding to partitions 'a' thru 'h' respectively. This should always be zero unless you really know what you are doing. The ability to load a kernel fromthe swap area is planned for the future but does not presently exist. For tapes z is a file number on thetape.ng In all simple cases, a drive with unit number 0 (determined either by a unit plug on the front of thedrive, or jumper settings on the drive or controller) will be called unit 0 in its UNIX file name. file name. If there are multiple controllers, the drive unit numbers will normally be counted within each controller.Thus drives on the the first controller are numbered 0 thru 7 and drives on the second controller are numbered 0 thru 7 on controller 1. Returning to the discussion of the standalone system, recall that tapes alsotook two integer parameters. In the case of a TE16/TU tape formatter on drive 0, the files on the tape have names ``ht(0,0)'', ``ht(0,1)'', etc. Here ``file'' means a tape file containing a single data stream separated bya single tape mark. The distribution tapes have data structures in the tape files and though the first tape contains only 7 tape files, it contains several thousand UNIX files. Each UNIX physical disk is divided into 8 logical disk partitions, each of which may occupy anyconsecutive cylinder range on the physical device. While overlapping partitions are allowed they are not a good idea, being an accident waiting to happen (making one filesystem will destroy the other overlappingfilesystems). The cylinders occupied by the 8 partitions for each drive type are specified by the disk label read from the disk. If no label exists the disk will not be bootable and while the kernel attempts not to damage unlabeleddisks (by swapping to or doing a crash dump on a live filesystem) there is a chance that filesystem damage will result if a kernel is loaded from an unlabeled disk. The standalone disklabel program is used to define the partition tables. Each partition may be usedeither as a raw data area (such as a swapping area) or to store a UNIX file system. It is mandatory for the first partition on a disk to start at sector offset 0 because the 'a' partition is used to read and write the label(which is at the beginning of the disk). If the drive is to be used to bootstrap a UNIX system then the 'a' partition must be of type 2.11BSD (FS_V71K in disklabel.h) and at least 4Mb is size. A 'b' partition of atleast 2-3Mb (4Mb is a good choice if space is available) for swapping is also needed. If a drive is being used solely for data then that drive need not have a 'b' (swap) partition but partition 'a' must still span thefirst part of the disk. The second partition is used as a swapping area, and the rest of the disk is divided into spaces for additional ``mounted file systems'' by use of one or more additional partitions. ng Note: that while a tape file consists of a single data stream, the distribution tape(s) have data structures in these files. Although the first tape contains only 8 tape files, they comprise several thousand UNIX files. Note: The standalone tape drive unit number is specially encoded to specify both unit number and tape density (BPI). Most tape subsystems either automatically adjust to tape density or have switches on the drives to force the density to a particular setting, but for those which don't the following density select mechanisms may be necessary. The ts only operates at 1600BPI, so there is no special unit density encoding. The ht will operate at either 800BPI or 1600BPI. Units 0 through 3 corresponding to 800BPI, and Units 4 through 7 corresponding to 1600BPI on drives 0 through 3 respectively. The standard DEC tm only supports 800BPI (and hence can't be used with the 2.11BSD distribution tape), but several widely used tm emulators support 1600BPI and even 6250BPI. Units 0 through 3 corresponding to 800BPI, Units 4 through 7 corresponding to 1600BPI, and Units 8 through 11 corresponding to 6250BPI on drives 0 through 3 respectively. 27 October 1997 setup.2.11 - 6 Installing and Operating 2.11BSD on the PDP-11 The third ('c') logical partition of each physical disk also has a conventional usage: it allows accessto the entire physical device, including the bad sector forwarding information recorded at the end of the disk (one track plus 126 sectors). It is occasionally used to store a single large file system or to access theentire pack when making a copy of it on another. Care must be taken when using this partition not to overwrite the last few tracks and thereby destroying the bad sector information. Unfortunately while the drivers can follow the rules above the entries in /etc/disktab (disktab (5)) donot. The entries in /etc/disktab are translations of the old partition tables which used to be embedded in thedevice drivers and are thus probably not suitable for use without editing. In some cases it may be that the 8th ('h') partition is used for access to the entire disk rather than the third ('c') partition. Caution should beobserved when using the newfs (8) and disklabel (8) commands. 4. UNIX devices: block and raw UNIX makes a distinction between ``block'' and ``raw'' (character) devices. Each disk has a blockdevice interface where the system makes the device byte addressable and you can write a single byte in the middle of the disk. The system will read out the data from the disk sector, insert the byte you gav e it andput the modified data back. The disks with the names ``/dev/xx0a'', etc are block devices. There are also raw devices available. These have names like ``/dev/rxx0a'', the ``r'' here standing for ``raw''. Rawdevices bypass the buffer cache and use DMA directly to/from the program's I/O buffers; they are normally restricted to full-sector transfers. In the bootstrap procedures we will often suggest using the raw devices,because these tend to work faster. Raw devices are used when making new filesystems, when checking unmounted filesystems, or for copying quiescent filesystems. The block devices are used to mount file sys-tems, or when operating on a mounted filesystem such as the root. You should be aware that it is sometimes important whether to use the character device (for effi-ciency) or not (because it wouldn't work, e.g. to write a single byte in the middle of a sector). Don't change the instructions by using the wrong type of device indiscriminately. The standalone disklabel program must be used to alter the 'a' and 'b' partitions of a drive beingused for a bootable system. This is because the kernel will not permit an open partition to change size or offset. The root and and swap partitions are always open when the kernel is running. 27 October 1997 Installing and Operating 2.11BSD on the PDP-11 Setup.2.11 - 7 2. BOOTSTRAP PROCEDURE This section explains the bootstrap procedure that can be used to get the kernel supplied with this dis-tribution running on your machine. It is mandatory to do a full bootstrap since the filesystem has changed from 2.10.1BSD to 2.11BSD. The safest route is to use tar (1) to dump all of your current file systems, do a full bootstrap of2.11BSD and then restore user files from the backups. There is also an untested version of 512restor (8)available for V7 sites that need to read old dump tapes. It is also desirable to make a convenient copy of system configuration files for use as guides whensetting up the new system; the list of files to save from earlier PDP-11 UNIX systems, found in chapter 3, may be used as a guideline. 2.11BSD restor (8) is able to read and automatically convert to the new on disk directory format dump (8) tapes made under 2.9BSD, 2.10BSD and 2.10.1BSD. 2.1. Booting from tape The tape bootstrap procedure used to create a working system involves the following major steps: 1) Load the tape bootstrap monitor. 2) Create the partition tables on the disk using disklabel. 3) Create a UNIX ``root'' file system system on disk using mkfs (8). 4) Restore the full root file system using restor (8). 5) Boot the UNIX system on the new root file system and copy the appropriate sector 0 boot block toyour boot device. 6) Build and restore the /usr file system from tape with tar (1). 7) Restore the include and kernel sources from tape. 8) Extract the remaining source from the second tape. 9) Tailor a version of UNIX to your specific hardware (see section 4.2). Certain of these steps are dependent on your hardware configuration. If your disks require format-ting, standard DEC diagnostic utilities will have to be used, they are not supplied on the 2.11BSD distribution tape. 2.1.1. Step 1: loading the tape bootstrap monitor To load the tape bootstrap monitor, first mount the magnetic tape on drive 0 at load point, makingsure that the write ring is not inserted. Then use the normal bootstrap ROM, console monitor or other bootstrap to boot from the tape. NOTE: The boot blocks expect the CSR of the booting controller in r0 and the unit number in r1.boot may be booted from any controller or unit, the earlier restrictions of controller 0 and unit 0 have been lifted. If no other means are available, the following code can be keyed in and executed at (say) 0100000 toboot from a TM tape drive (the magic number 172526 is the address of the TM-11 current memory address register; an adjustment may be necessary if your controller is at a nonstandard address): 27 October 1997 setup.2.11 - 8 Installing and Operating 2.11BSD on the PDP-11 012700 (mov $unit, r0)000000 (normally unit 0) 012701 (mov $172526, r1)172526 010141 (mov r1, -(r1))012741 (mov $60003, -(r1)) 060003 (if unit 1 use 060403, etc)000777 (br .) A toggle-in routine which has been used with a TS tape drive (this should be entered at 01000): 012700 mov $unit,r0000000 012701 mov $172522,r1172522 005011 clr (r1)105711 1b:tstb (r1) 100376 bpl 1b012761 mov $setchr,-2(r1) 001040177776 105711 2b:tstb (r1)100376 bpl 2b 012761 mov $read,-2(r1)001060 177776000000 halt 140004 setchr: TS_ACK|TS_CVC|TS_SETCHR001050 char 000000 high order address000010 number of bytes 001070 char: status000000 000016000000 140001 read: TS_ACK|TS_CVC|TS_READ000000 low order of address 000000 high order of address001000 number of bytes to read 000000 status: When this is executed, the first block of the tape will be read into memory. Halt the CPU and restart atlocation 0. The register r1 MUST be left pointing at the device csr. For the default/first TM or TS this is0172522. The register r0 MUST contain the unit number (usually 0). The console should type nnBoot from xx(ctlr,drive,part) at csr: where nn is the CPU type on which it believes it is running. The value will be one of 23, 24, 40, 44, 45, 53,60, 70, 73, 83, 84, 93 or 94 depending whether separate instruction and data (separate I/D) and/or a UNIBUS map are detected. For KDJ-11 systems the System Maintenance Register is examined to deter-mine the cpu type. At present 2.11BSD runs on the 44, 53, 70, 73, 83, 84, 93 and 94 only. It must be emphasized that 2.11BSD requires separate I/D. 27 October 1997 Installing and Operating 2.11BSD on the PDP-11 Setup.2.11 - 9 ctlr is the controller number that Boot was loaded from. It is 0 unless booting from a non-standard CSR. drive is the drive unit number. The part number is disk partition or tapefile number booted from. This will always be 0 for the tape Bootprogram. csr is an octal number telling the CSR of the controller from which Boot was loaded. You are now talking to the tape bootstrap monitor. At any point in the following procedure you canreturn to this section, reload the tape bootstrap, and restart. Through the rest of this section, substitute the correct disk type for dk and the tape type for tp. 2.1.2. Step 2: creating the disk label The standalone disklabel program is then run: : tp (0,1) (disklabel is tape file 1)Boot: bootdev=0nnnn bootcsr=0mmmmmm disklabelDisk? dk (0,0) (drive 0, partition 0)d(isplay) D(efault) m(odify) w(rite) q(uit)? ...: (back at tape boot level) The disklabel program is meant to be fairly intuitive. When prompted with a line of choices entering thekey just before the left parenthesis selects the entry. If there is an existing label present on dk (0,0) it will be used as the default. To hav e disklabel createa new default based on its idea of what the drive is select D. Then enter m to modify/edit the label. The MSCP driver is quite good at identifying drives because it can query the controller. Otherdrivers (notably the SMD (xp) driver) have to deal with a much wider range of controllers which do not all have the same capabilities for drive identification. When dealing with SMD drives you must know thegeometry of the drive so you can verify and correct disklabel's choices. You can however, if using non-DEC SMD controllers, make things easy for disklabel to determinewhat type of drive is being used. If your controller offers the choice of RM02 emulation you should select that choice. The standalone xp driver uses RM02 as the indication that drive identification capabilities notoffered by DEC controllers are present. The driver will be able to determine the geometry of the drive in this case. This is optional because you can explicitly specify all of the parameters to the standalone disklabel program. A full description of the standalone disklabel program is in Appendix B of this document. 2.1.3. Step 3: creating a UNIX ``root'' file system Now create the root file system using the following procedure.ng The size of the root ('a') filesystem was assigned in step 2 (creating the disk label). mkfs will notallow a filesystem to be created if there is not a label present or if the partition size is 0. mkfs looks at parti-tion 0 ('a') in the disklabel for the root file system size. ng Note: These instructions have changed quite a bit during the evolution of the system from 2.10.1BSD. Previously, if the disk on which you are creating a root file system was an xp disk you would have been asked to check the drive type register and possibly halt the processor to patch a location (hopefully before the driver accessed the drive). This is no longer needed. All geometry and partition information is obtained from the disklabel created in step 2. We also used to give tables of m and n values for various disks, which are now purposely omitted. 27 October 1997 setup.2.11 - 10 Installing and Operating 2.11BSD on the PDP-11 Finally, determine the proper interleaving factors m and n for your disk. Extensive testing hasdemonstrated that the choice of m is non critical (performance of a file system varying only by 3 to 4% fora wide range of m values). Values for m within the range from 2 to 5 giv e almost identical performance.Increasing m too much actually causes degraded performance because the free blocks are too far apart.Slower processors (such as the 73 and 44) may want to start with a m of 3 or 4, faster processors (such asthe 70 and 84) may start with a m of 2 or 3. On the other hand, the n value is moderately important. Itshould be the number of filesystem blocks contained by one cylinder of the disk, calculated by dividing the number of sectors per cylinder by 2, rounding down if needed. (This is what mkfs does by default, based onthe geometry information in the disk label.) These numbers determine the layout of the free list that will be constructed; the proper interleaving will help increase the speed of the file system. The number of bytes per inode determines how many inodes will be allocated in the filesystem. Thedefault of 4096 bytes per inode is normally enough (resulting in about 2000 inodes for a 8mb root filesystem and 1000 inodes for the 4mb distribution ``generic'' root filesystem). If more inodes are desired then alower value (perhaps 3072) should be specified when prompted for the number of bytes per inode. Then run the standalone version of the mkfs (8) program. The values in square brackets at the sizeprompt is the default from the disklabel. Simply hit a return to accept the default. mkfs will allow you tocreate a smaller filesystem but you can not enter a larger number than the one in brackets. In the following procedure, substitute the correct types for tp and dk and the size determined above for size: : tp (0,2) (mkfs is tape file 2)Boot: bootdev=0nnnn bootcsr=0mmmmmm Mkfsfile system: dk (0,0) (root is the first file system on drive 0)file system size: [NNNN] size (count of 1024 byte blocks in root)bytes per inode: [4096] bytes (number of bytes per inode)interleaving factor (m, 2 default): m (interleaving, see above)interleaving modulus (n, 127 default): n (interleaving, see above)isize = XX (count of inodes in root file system) m/n = m n (interleave parameters)Exit called nnBoot: (back at tape boot level) The number nnnn is the device number of the device (high byte is the major device number and the lowbyte is the unit number). The mmmmmm number is the CSR of the device. This information is mainly used as a reminder and diagnostic/testing purposes. You now hav e an empty UNIX root file system. 2.1.4. Step 4: restoring the root file system To restore the root file system onto it, type 27 October 1997 Installing and Operating 2.11BSD on the PDP-11 Setup.2.11 - 11 : tp (0,3) (restor is tape file 3)Boot: bootdev=0nnnn bootcsr=0mmmmmm RestorTape? tp (0,5) (root dump is tape file 5)Disk? dk (0,0) (into root file system)Last chance before scribbling on disk. (type a carriage return to start) "End of tape" (appears on same line as message above)Exit called nnBoot: (back at tape boot level) This takes about 8 minutes with a TZ30 on a 11/93 and about 15 minutes usinga TK50 on a 11/73. If you wish, you may use the icheck program on the tape, tp (0,4), to check the consistency of the file sys-tem you have just installed. This has rarely been useful and is mostly for the voyeuristic. 2.1.5. Step 5: booting UNIX You are now ready to boot from disk. Type: :dk (0,0)unix (bring in unix from the root system)Boot: bootdev=0nnnn bootcsr=0mmmmmm The standalone boot program will then load unix from the root file system you just created, and the systemshould boot: 2.11BSD BSD UNIX #1: Sat Jul 4 01:33:03 PDT 1992root@wlonex.iipo.gtegsc.com:/usr/src/sys/GENERIC phys mem = ???av ail mem = ???user mem = ??? configure system ... information about available devices ...(Information about various devices will print; most of them will probably not be found untilthe addresses are set below.) erase=^?, kill=^U, intr=^C# UNIX itself then runs for the first time and begins by printing out a banner identifying the release andversion of the system that is in use and the date that it was compiled. Next the mem messages give the amount of real (physical) memory, the amount of memory left overafter the system has allocated various data structures, and the amount of memory available to user programs in bytes. The information about different devices being attached or not being found is produced by the autoconfig (8) program. Most of this is not important for the moment, but later the device table, /etc/dtab,can be edited to correspond to your hardware. However, the tape drive of the correct type should have been detected and attached. The ``erase ...'' message is part of /.profile that was executed by the root shell when it started. Thismessage is present to remind you that the character erase, line erase, and interrupt characters are set to what is standard for DEC systems; this insures that things are consistent with the DEC console interface charac-ters. 27 October 1997 setup.2.11 - 12 Installing and Operating 2.11BSD on the PDP-11 UNIX is now running single user on the installed root file system, and the `UNIX Programmer'sManual' applies. The next section tells how to complete the installation of distributed software on the /usr file system. The `#' is the prompt from the shell, and lets you know that you are the super-user, whoselogin name is ``root''. The disk with the new root file system on it will not be bootable directly until the block 0 bootstrapprogram for your disk has been installed. There are copies of the bootstraps in /mdec. Use dd (1) to copythe right boot block onto block 0 of the disk. # dd if=/mdec/boot of=/dev/rdk0a count=1 Block zero bootstraps and the devices they support are: boot driver devices hkuboot hk RK06/07rauboot ra All RA, RD, RZ, RX (except RX01,02) and RC25 drives rkuboot rk RK05rluboot rl RL01/02 si95uboot si SI 9500, CDC 9766dvhpuboot xp Diva Comp V, Ampex 9300 hpuboot xp RP04/05/06rm03uboot xp RM03 rm05uboot xp RM05 or SI 9500, CDC 9766si51uboot xp SI 6100, Fujitsu Eagle 2351A si94uboot xp Emulex SC01B/SC03B or SI 9400, Fujitsu 160 NOTE: If none of the above are correct (most likely with a SMD drive with differing geometry) then youwill have to use a tape/floppy boot proceedure rather than a sector 0 bootblock. This can be fixed by creating a customized sector 0 boot program once the system sources have been loaded. Once this is done, booting from this disk will load and execute the block 0 bootstrap, which will inturn load /boot. /boot will print on the console: nnBoot from dk(ctlr,unit,part) at csr: The bootblock automatically loads and runs /boot for you; if /boot is not found, the system will hang/loopforever. The block 0 program is very small (has to fit in 512 bytes) and simple program, however, and can only boot the second-stage boot from the first file system. Once /boot is running and prints its ``: '' prompt,boot unix as above. As distributed /boot will load dk(0,0)unix by default if a carriage return is typed at the : prompt. NOTE: NONE the primary bootstraps have a prompt or alternate program name capability becauseof space considerations. No diagnostic message results if the file cannot be found. 2.1.6. Step 6: setting up the /usr file system First set a shell variable to the name of your disk, so the commands used later will work regardless ofthe disk you have; do one of the following: # disk=hk (if you have RK06's or RK07's)# disk=rl (if you have RL01's or RL02's) # disk=ra (if you have an MSCP drive)# disk=xp (if you have an RP06, RM03, RM05, or other SMD drive) The next thing to do is to extract the rest of the data from the tape. You might wish to review the diskconfiguration information in section 4.3 before continuing; you will have to select a partition to restore the /usr file system into which is at least 25 Megabytes in size (this is just barely enough for the system binaries 27 October 1997 Installing and Operating 2.11BSD on the PDP-11 Setup.2.11 - 13 and such and leaves no room for the system source.)ng In the command below part is the partition name (a-h) for the partition which will hold /usr. name=${disk}0${part} Next, find the tape you have in the following table and execute the commands in the right hand portion ofthe table: DEC TM02/03, TE16/TU45/TU77 # cd /dev; rm *mt*; ./MAKEDEV ht0; syncDEC TS11, TK25/TU80/TS05 # cd /dev; rm *mt*; ./MAKEDEV ts0; sync DEC TM11, TU10/TE10/TS03 # cd /dev; rm *mt*; ./MAKEDEV tm0; syncDEC TMSCP, TK50/TZ30/TU81 # cd /dev; rm *mt*; ./MAKEDEV tu0; sync EMULEX TC11 # cd /dev; rm *mt*; ./MAKEDEV tm0; sync Then execute the following commands: # date yymmddhhmm (set date, see date (1)).... # passwd root (set password for super-user)New password: (password will not echo) Retype new password:# hostname mysitename (set your hostname)# newfs ${name} (create empty user file system) (this takes a minute)# mount /dev/${name} /usr (mount the usr file system) # cd /usr (make /usr the current directory)# mt rew # mt fsf 6# tar xpbf 20 /dev/rmt12 (extract all of usr except usr/src) (this takes about 15-20 minutes except for theTK50 and TZ30 which are much slower) The data on the seventh tape file has now been extracted. All that remains on the first tape is a smallarchive containing source for the kernel and include files. If you have an existing/old password file to be merged back into 2.11BSD, special steps are necessaryto convert the old password file to the shadow password file format (shadow password file and password aging were ported from 4.3BSD and are standard in 2.11BSD ). ng Note: Previously a lengthy table of partition names organized by specific disk type was given. With the introduction of disklabels this is no longer necessary (or possible since each site can select whatever partitioning scheme they desire). In step 2 (creating the disklabel) a partition should have been created for /usr. If this was not done then it may be easier to perform step 2 now than to use the more complex disklabel (8) program and ed (1). 27 October 1997 setup.2.11 - 14 Installing and Operating 2.11BSD on the PDP-11 # mt -f /dev/rmt12 fsf (position tape at beginning of next tape file)# mkdir src (make directory for source) # cd src (make /usr/src the current directory)# tar xpbf 20 /dev/rmt12 (extract the system and include source) (this takes about 5-10 minutes)# cd / (back to root) # chmod 755 / /usr /usr/src /usr/src/sys# rm -f sys # ln -s usr/src/sys sys (make a symbolic link to the system source)# umount /dev/${name} (unmount /usr) The first tape has been been completely loaded. You can check the consistency of the /usr file systemby doing # fsck /dev/r${name} The output from fsck should look something like: ** /dev/rxx0gFile System: /usr NEED SCRATCH FILE (179 BLKS)ENTER FILENAME: /tmp/xxx ** Last Mounted on /usr** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts** Phase 5 - Check Free List 671 files, 3497 used, 137067 free If there are inconsistencies in the file system, you may be prompted to apply corrective action; see thedocument describing fsck for information. To use the /usr file system, you should now remount it by saying # mount /dev/${name} /usr 2.1.7. Step 7: extracting remaining source from the second tape You can then extract the source code for the commands from the second distribution tapeng (with theexception of RK07's, RM03's, and RD52's and other small disks this will fit in the /usr file system): # cd /usr/src# tar xpb 20 If you get an error at this point, most likely it was a problem with tape positioning. Rewind the tape anduse the mt command to skip files, then retry the tar command. 2.2. Additional conversion information After setting up the new 2.11BSD filesystems, you may restore the user files that were saved on tapebefore beginning the conversion. Note that the 2.11BSD restor program does its work by accessing the rawfile system device and depositing inodes in the appropriate locations on disk. This means that file system dumps might not restore correctly if the characteristics of the file system have changed (eg. if you're restor-ing a dump of a file system into a file system smaller than the original.) To restore a dump tape for, say, the /u file system something like the following would be used: ng On the TK50 the remaining source is the 9th file on the cartridge. 27 October 1997 Installing and Operating 2.11BSD on the PDP-11 Setup.2.11 - 15 # restor r /dev/rxp1e If tar images were written instead of doing a dump, you should be sure to use the `p' option whenreading the files back. No matter how you restore a file system, be sure and check its integrity with fsckwhen the job is complete. tar tapes are preferred (when possible) because the inode allocation is performed by the kernel ratherthan the restor (8) program. This has the benefit of allocating inodes sequentially starting from the begin-ning of the inode portion of the filesystem rather than preserving the fragmented/randomized order of the old filesystem. 27 October 1997 setup.2.11 - 16 Installing and Operating 2.11BSD on the PDP-11 3. UPGRADING AN EXISTING SYSTEM Begin by reading the document ``Changes to the System in 2.11BSD'' to get an idea of how the sys-tem changes will affect your local modifications. If you have local device drivers, see the file /sys/OTHERS/README for hints on how to integrate your drivers into 2.11BSD. The only upgrade path to 2.11BSD is to do a full bootstrap as described in Chapter 2. As always, fullbackups of the existing system should be made to guard against errors or failures. NOTE: The old filesystems can not be mounted by the new kernel. If you must access old discs or filesystems, there is a versionof dump (8) in /usr/src/old/dump which can be used with the raw disc to dump old filesystems. The archive file format has changed, the 4.3BSD ar(5) format is now used. Local archives will haveto be converted by the /usr/old/arcv program. 3.1. Files to save The following list enumerates the standard set of files you will want to save and suggests directoriesin which site specific files should be present. Note that because 2.10BSD changed so radically from previous versions of UNIX on the PDP-11, many of these files may not exist on your system, and will almostcertainly require extensive changes for 2.11BSD, but it's still handy to have them around as you're configuring 2.11BSD. This list will likely be augmented with non-standard files you have added to your system. You should create a tar image of (at a minimum) the following files before the new file systems arecreated. In addition, you should do a full dump before rebuilding the file system to guard against missing something the first time around. The 2.11BSD restor (8) program can read and convert old dump (8) tapes. 27 October 1997 Installing and Operating 2.11BSD on the PDP-11 Setup.2.11 - 17 /.cshrc ng root csh startup script/.login ng root csh login script /.profile ng root sh startup script/.rhosts ng for trusted machines and users /dev/MAKEDEV ## in case you added anything here/dev/MAKEDEV.local * for making local devices /etc/disktab * in case you changed disk partition sizes/etc/dtab ## table of devices to attach at boot time /etc/fstab ng disk configuration data/etc/ftpusers ng for local additions /etc/gateways ng routing daemon database/etc/gettytab ng getty database /etc/group ng group data base/etc/hosts ng for local host information /etc/hosts.dir * must be rebuilt with mkhosts/etc/hosts.pag * must be rebuilt with mkhosts /etc/hosts.equiv ng for local host equivalence information/etc/networks ng for local network information /etc/netstart * site dependent network startup script/etc/passwd * must be converted to shadow password file format /etc/passwd.dir * must be rebuilt with mkpasswd/etc/passwd.pag * must be rebuilt with mkpasswd /etc/printcap ng line printer database/etc/protocols ## in case you added any local protocols /etc/rc * for any local additions/etc/rc.local * site specific system startup commands /etc/remote ng auto-dialer configuration/etc/services ## for local additions /etc/syslog.conf ng system logger configuration/etc/securettys * for restricted list of ttys where root can log in /etc/ttys ng terminal line configuration data/etc/ttytype * terminal line to terminal type mapping data /etc/termcap ## for any local entries that may have been added/lib ## for any locally developed language processors /usr/dict/* ## for local additions to words and papers/usr/hosts/MAKEHOSTS ng for local changes /usr/include/* ## for local additions/etc/aliases ng mail forwarding data base /etc/crontab ng cron daemon data base/usr/share/font/* ## for locally developed font libraries /usr/lib/lib*.a ng for local libraries/usr/share/lint/* ## for locally developed lint libraries /etc/sendmail.cf ng sendmail configuration/usr/share/tabset/* ## for locally developed tab setting files /usr/share/term/* ## for locally developed nroff drive tables/usr/share/tmac/* ## for locally developed troff/nroff macros /etc/uucp/* ng for local uucp configuration files/usr/man/manl * for manual pages for locally developed programs /usr/msgs ng for current msgs/usr/spool/* ng for current mail, news, uucp files, etc. /usr/src/local ng for source for locally developed programs/sys/conf/HOST ng configuration file for your machine /sys/conf/files.HOST ng list of special files in your kernel/*/quotas * file system quota files 27 October 1997 setup.2.11 - 18 Installing and Operating 2.11BSD on the PDP-11 ng Files that can be used from 2.10BSD without change.## Files that need local modifications merged into 2.11BSD files. * Files that require special work to merge and are discussed below. 3.1.1. Installing 2.11BSD The next step is to build a working 2.11BSD system. This can be done by following the steps in sec-tion 2 of this document for extracting the root and /usr file systems from the distribution tape onto unused disk partitions. Once you have extracted the 2.11BSD system and booted from it, you will have to build a kernel cus-tomized for your configuration. If you have any local device drivers, they will have to be incorporated into the new kernel. See section 4.2.3 and ``Building 2.11BSD UNIX Systems.'' With the introduction of disklabels the disk partitions in 2.11BSD the /etc/disktab file has changeddramatically. There is a detailed description later in this chapter about the changes. If you have modified the partition tables in previous versions of 2.11BSD you will need to create a new disktab entry or modifyan existing one. 3.2. Merging your files from earlier PDP-11 UNIX systems into 2.11BSD When your system is booting reliably and you have the 2.11BSD root and /usr file systems fullyinstalled you will be ready to continue with the next step in the conversion process, merging your old files into the new system. If you saved the files on a tar tape, extract them into a scratch directory, say /usr/convert: # mkdir /usr/convert# cd /usr/convert # tar x For sites running 2.10.1BSD, converting local configuration files should be very simple. In generalvery little has changed between 2.10.1BSD and 2.11BSD with regard to these files. For sites running a pre-2.10BSD UNIX, there is very little that can be said here as the variety of pre-vious versions of PDP-11 UNIX systems and how they were administered is large. As an example, most previous versions of PDP-11 UNIX systems used the files /etc/ttys and /etc/ttytype to administer which ter-minals should have login processes attached to them and what the types of terminals those were. Under 2.11BSD /etc/ttytype has disappeared entirely, its functions subsumed by /etc/ttys along with several newfunctions. In general you will simply have to use your previous configuration files as references as you configure 2.11BSD to your site needs. Familiarity with 4.3BSD configuration is very helpful at this pointsince 2.11BSD is nearly identical in most of the files listed in the previous section. If you have any home grown device drivers that use major device numbers reserved by the systemyou will have to modify the commands used to create the devices or alter the system device configuration tables in /sys/pdp/conf.c. Note that almost all 2.11BSD major device numbers are different from those inprevious PDP-11 UNIX systems except 2.10.1BSD. A couple more device numbers were added since the release of 2.10.1BSD for the kernel logging facility (/dev/klog) and a (new) TK50/TU81 driver. System security changes require adding several new ``well-known'' groups to /etc/group. The groupsthat are needed by the system as distributed are: 27 October 1997 Installing and Operating 2.11BSD on the PDP-11 Setup.2.11 - 19 name number wheel 0daemon 1 kmem 2sys 3 tty 4operator 5 staff 10bin 20 Only users in the ``wheel'' group are permitted to su to ``root''. Most programs that manage directories in/usr/spool now run set-group-id to ``daemon'' so that users cannot directly access the files in the spool directories. The special files that access kernel memory, /dev/kmem and /dev/mem, are made readable onlyby group ``kmem''. Standard system programs that require this access are made set-group-id to that group. The group ``sys'' is intended to control access to system sources, and other sources belong to group ``staff.''Rather than make user's terminals writable by all users, they are now placed in group ``tty'' and made only group writable. Programs that should legitimately have access to write on user's terminals such as talk and write now run set-group-id to ``tty''. The ``operator'' group controls access to disks. By default, disks arereadable by group ``operator'', so that programs such as df can access the file system information withoutbeing set-user-id to ``root''. Several new users have also been added to the group of ``well-known'' users in /etc/passwd. The cur-rent list is: name number root 0daemon 1 operator 2uucp 66 nobody 32767 The ``daemon'' user is used for daemon processes that do not need root privileges. The ``operator'' user-idis used as an account for dumpers so that they can log in without having the root password. By placing them in the ``operator'' group, they can get read access to the disks. The ``uucp'' login has existed longbefore 2.11BSD, and is noted here just to provide a common user-id. The password entry ``nobody'' has been added to specify the user with least privilege. After restoring your old password file from tape/backups, a conversion is required to create theshadow password file. Only the steps to convert /etc/passwd are given here, see the various man pages for chpass (1), vipw (8), mkpasswd (8), etc. # awk -f /etc/awk.script < /etc/passwd >/etc/junk# mkpasswd -p /etc/junk # mv /etc/junk.orig /etc/passwd# mv /etc/junk.pag /etc/passwd.pag # mv /etc/junk.dir /etc/passwd.dir# mv /etc/junk /etc/master.passwd # chown root /etc/passwd* /etc/master.passwd# chmod 0600 /etc/master.passwd The format of the cron table, /etc/crontab, is the same as that of 2.10.1BSD. Some of the commands previously in /etc/rc.local have been moved to /etc/rc; several new functionsare now handled by /etc/rc.local. You should look closely at the prototype version of /etc/rc.local and read the manual pages for the commands contained in it before trying to merge your local copy. Note in particu-lar that ifconfig has had many changes, and that host names are now fully specified as domain-style names(e.g, boris.Oswego.EDU). 27 October 1997 setup.2.11 - 20 Installing and Operating 2.11BSD on the PDP-11 The C library and system binaries on the distribution tape are compiled with versions of gethostbyname and gethostbyaddr which use ndbm host table lookup routines instead of the name server. You mustrun mkhosts (8) to create the ndbm host table database from /etc/hosts. For 2.11BSD the mkhosts programhas been enhanced to support multiple addresses per host with order being preserved (the order in which the multiple addresses appear in /etc/hosts for the same host is the same order the addresses will be returnedto the caller of gethostbyname). There is a version of the nameserver which runs under 2.11BSD. However in addition to having avoracious appetite for memory there are memory leaks which cause named (8) to crash after running for anextended period. Restarting named (8) nightly from cron is the only work around solution at present. If you want to compile your system to use the name server resolver routines instead of the ndbm hosttable, you will need to modify /usr/src/lib/libc/Makefile according to the instructions there and then recompile all of the system and local programs (see section 6.5).ng The format of /etc/ttys is the same as it was under 2.10BSD. It includes the terminal type and secu-rity options that were previously in /etc/ttytype and /etc/securettys. syslog is the 4.4BSD-Lite version now. See syslog (3) and syslogd (8) for details. They are used bymany of the system daemons to monitor system problems more closely, for example network routing changes. Again, it must be emphasized that the nameserver is not robust under 2.11BSD, and if the hosts filesare not desired then the best alternative is to use the resolver (5) routines and use the nameserver on aremote larger machine. The resolver (5) routines are known to work. The spooling directories saved on tape may be restored in their eventual resting places without toomuch concern. Be sure to use the ``p'' option to tar so that files are recreated with the same file modes: # cd /usr# tar xp msgs spool/mail spool/uucp spool/uucppublic spool/news The ownership and modes of two of these directories needs to be changed, because at now runs set-user-id ``daemon'' instead of root. Also, the uucp directory no longer needs to be publicly writable, as tipreverts to privileged status to remove its lock files. After copying your version of /usr/spool, you should do the following: # chown -R daemon /usr/spool/at# chown -R root /usr/spool/uucp # chgrp -R daemon /usr/spool/uucp# chmod -R o-w /usr/spool/uucp Whatever else is left is likely to be site specific or require careful scrutiny before placing in its even-tual resting place. Refer to the documentation and source code before arbitrarily overwriting a file. 3.3. Hints on converting from previous PDP-11 UNIX systems to 2.11BSD This section summarizes some of the significant changes in 2.11BSD from 2.10.1BSD. The installa-tion guide for 2.10.1BSD is included in the distribution as /usr/doc/2.10/setup.2.10 and should be read if you are not presently running 2.10BSD or 2.10.1BSD. It does not include changes in the network; seechapter 5 for information on setting up the network. Old core files will not be intelligible by the current debuggers because of numerous changes to theuser structure. Also removed from the user structure are the members u_offset, u_count, u_base, u_segflg, the 4.3BSD uio/iovec/rdwri kernel i/o model having been put in place. The 4.3BSD namei argumentencapsulation technique has been ported, which adds the u_nd member to the user structure. Note, once your system is installed and running, you should make sure that you recompile and rein-stall the directory /usr/src/share/zoneinfo. Read through the Makefile first, if you're not located on the WestCoast you will have to change it. This directory is an addition since 4.3BSD, and is intended to solve the ng Note: The resolver routines add about 5kb of text and 1kb of data to each program. Also, the resolver routines use more stack space which may cause large programs to crash due to failure to extend the stack area. 27 October 1997 Installing and Operating 2.11BSD on the PDP-11 Setup.2.11 - 21 Daylight Savings Time problems once and for all. The incore inode structure has had the i_id member added as part of implementing the 4.3BSD nameicache. The di_addr member of the on disk inode structure is now an array of type daddr_t instead of char. The old 3 byte packed block number is obsolete at last. The on disk directory structure is that of 4.3BSD with the difference that the inode number is anunsigned short instead of a long. This was done to reduce the amount of long arithmetic in the kernel and to maintain compatibility with earlier versions with regard to the maximum number of inodes per filesys-tem. Given the typical size of discs used with 2.11BSD the limit on the number of inodes per filesystem will not be a problem. And again, 2.11BSD is not filesystem compatible with any previous PDP-11 UNIX system. If you want to use ps after booting a new kernel, and before going multiuser, you must initialize itsname list database by running ps -U. 3.4. Hints on possible problems upgrading from the 2.10.1BSD 3.4.1. New utmp UT_NAMESIZE. UT_NAMESIZE in >/dev/console fi 5.7.4. /etc/ftpusers The FTP server included in the system provides support for an anonymous FTP account. Because ofthe inherent security problems with such a facility you should read this section carefully if you consider providing such a service. An anonymous account is enabled by creating a user ftp. When a client uses the anonymous accounta chroot (2) system call is performed by the server to restrict the client from moving outside that part of thefile system where the user ftp home directory is located. Because a chroot call is used, certain programsand files used by the server process must be placed in the ftp home directory. Further, one must be sure that all directories and executable images are unwritable. The following directory setup is recommended. 27 October 1997 setup.2.11 - 38 Installing and Operating 2.11BSD on the PDP-11 # cd ~ftp# chmod 555 .; chown ftp .; chgrp ftp . # mkdir bin etc pub# chown root bin etc # chmod 555 bin etc# chown ftp pub # chmod 777 pub# cd bin # cp /bin/sh /bin/ls .# chmod 111 sh ls # cd ../etc# cp /etc/passwd /etc/group . # chmod 444 passwd group When local users wish to place files in the anonymous area, they must be placed in a subdirectory. In thesetup here, the directory ~ftp/pub is used. NOTE: Mode 777 on the 'pub' directory can and has been abused! Changing the mode to 555 is agood choice but would require administrative assistance for placing files in the 'pub' directory. Probably not a bad idea though. Another issue to consider is the copy of /etc/passwd placed here. It may be copied by users who usethe anonymous account. They may then try to break the passwords of users on your machine for further access. A good choice of users to include in this copy might be root, daemon, uucp, and the ftp user. Aside from the problems of directory modes and such, the ftp server may provide a loophole forinterlopers if certain user accounts are allowed. The file /etc/ftpusers is checked on each connection. If therequested user name is located in the file, the request for service is denied. This file normally has the following names on our systems. uucproot Accounts with nonstandard shells should be listed in this file. Accounts without passwords need not belisted in this file, the ftp server will not service these users. 27 October 1997 Installing and Operating 2.11BSD on the PDP-11 Setup.2.11 - 39 6. SYSTEM OPERATION This section describes procedures used to operate a PDP-11 UNIX system. Procedures describedhere are used periodically, to reboot the system, analyze error messages from devices, do disk backups, monitor system performance, recompile system software and control local changes. 6.1. Bootstrap and shutdown procedures In a normal reboot, the system checks the disks and comes up multi-user without intervention at theconsole. Such a reboot can be stopped (after it prints the date) with a ^C (interrupt). This will leave the system in single-user mode, with only the console terminal active. It is also possible to allow the filesystemchecks to complete and then to return to single-user mode by signaling fsck with a QUIT signal (^\). If booting from the console command level is needed, then the command >>> B will boot from the default device and ask for the name of the system to be booted. Other systems such asthe 11/44 require a device name to be given: >>> B DU to boot from a MSCP/UDA device. Typing a carriage return will cause the default system (as compiled inin section 4.1), to be booted. In any case, the system selected will come up in single-user mode. To bring the system up to a multi-user configuration from the single-user all you have to do is hit ^Don the console. The system will then execute /etc/rc, a multi-user restart script (and /etc/rc.local), and come up on the terminals listed as active in the file /etc/ttys. See init (8) and ttys (5). Note, however, that thisdoes not cause a file system check to be performed. Unless the system was taken down cleanly, you should run ``fsck'' or force a reboot with reboot (8) to have the disks checked. To take the system down to a single user state you can use # kill 1 or use the shutdown (8) command (which is much more polite, if there are other users logged in.) when youare up multi-user. Either command will kill all processes and give you a shell on the console, as if you had just booted. File systems remain mounted after the system is taken single-user. If you wish to come upmulti-user again, you should do this by: # cd /# umount -a # ^D Each system shutdown, crash, processor halt and reboot is recorded in the file /usr/adm/shutdownlogwith the cause. 6.2. Device errors and diagnostics When serious errors occur on peripherals or in the system, the system prints a warning diagnostic onthe console. These messages are written to the kernel logger where they are retrieved by syslogd (8) via /dev/klog - dmesg (8) is now obsolete. dmesg (8) is present in the distribution but no longer used. The mes-sage buffer is now 4kb in size and external to the kernel. Error messages printed by the devices in the system are described with the drivers for the devices insection 4 of the programmer's manual. Some drivers have been modified to use the kernel logger, others still simply do printf statements. If errors occur suggesting hardware problems, you should contact yourhardware support group or field service. It is a good idea to examine the error log files regularly (e.g. with ``tail -r /usr/adm/messages''). 27 October 1997 setup.2.11 - 40 Installing and Operating 2.11BSD on the PDP-11 6.3. File system checks, backups and disaster recovery Periodically (say every week or so in the absence of any problems) and always (usually automati-cally) after a crash, all the file systems should be checked for consistency by fsck (8). The procedures of reboot (8) should be used to get the system to a state where a file system check can be performed manuallyor automatically. Dumping of the file systems should be done on a regular schedule, since once the system is going itis easy to become complacent. Complete and incremental dumps are easily done with dump (8). Youshould arrange to do a towers-of-hanoi dump sequence; we tune ours so that almost all files are dumped on two tapes and kept for at least a week in most every case. We take full dumps every month (and keep theseindefinitely). More precisely, we hav e three sets of dump tapes: 10 daily tapes, 5 weekly sets of 2 tapes, and freshsets of three tapes monthly. We do daily dumps circularly on the daily tapes with sequence `3 2 5 4 7 6 9 8 9 9 9 ...'. Each weekly is a level 1 and the daily dump sequence level restarts after each weekly dump. Fulldumps are level 0 and the daily sequence restarts after each full dump also. Thus a typical dump sequence would be: tape name level number date opr size FULL 0 Nov 24, 1979 jkf 137MBD1 3 Nov 28, 1979 jkf 29MB D2 2 Nov 29, 1979 rrh 34MBD3 5 Nov 30, 1979 rrh 19MB D4 4 Dec 1, 1979 rrh 22MBW1 1 Dec 2, 1979 etc 40MB D5 3 Dec 4, 1979 rrh 15MBD6 2 Dec 5, 1979 jkf 25MB D7 5 Dec 6, 1979 jkf 15MBD8 4 Dec 7, 1979 rrh 19MB W2 1 Dec 9, 1979 etc 118MBD9 3 Dec 11, 1979 rrh 15MB D10 2 Dec 12, 1979 rrh 26MBD1 5 Dec 15, 1979 rrh 14MB W3 1 Dec 17, 1979 etc 71MBD2 3 Dec 18, 1979 etc 13MB FULL 0 Dec 22, 1979 etc 135MB Weekly dumps are done often enough that daily dumps always fit on one tape. Dumping of files by name is best done by tar (1) but the amount of data that can be moved in thisway is limited to a single tape. Finally if there are enough drives entire disks can be copied with dd (1)using the raw special files and an appropriate blocking factor; the number of sectors per track is usually a good value to use, consult /etc/disktab. It is desirable that full dumps of the root file system be made regularly. These dumps should be madein ``bootable`` format, including the standalone programs mentioned back in chapter 2 (boot, mkfs, restor and icheck). This can easily be done by going to /sys/pdpstand and doing: make all./maketape /dev/nrmtXX maketape.data dump 0u / This is especially true when only one disk is available. Then, if the root file system is damaged by a hard-ware or software failure, you can rebuild a workable disk doing a restore in the same way that the initial root file system was created. Exhaustion of user-file space is certain to occur now and then and may be managed with a combina-tion of disc quotas (the 4.3BSD disc quota system is available as a kernel configuration option), threatening messages of the day, and personal letters. 27 October 1997 Installing and Operating 2.11BSD on the PDP-11 Setup.2.11 - 41 6.4. Moving file system data If you have the equipment, the best way to move a file system is to dump it to magtape using dump (8), use newfs (8) to create the new file system, and restore the tape, using restor (8). If for some rea-son you don't want to use magtape, dump accepts an argument telling where to put the dump; you might use another disk. Filesystems may also be moved by piping the output of a tar (1) to another tar. The restor program accesses the raw device, laying down inodes and blocks in the same place they came fromas recorded by dump. Care must therefore be taken when restoring a dump into a file system smaller than the original file system. If you have to shrink a file system or merge a file system into another, existing one, the best bet is touse tar (1). If you are playing with the root file system and only have one drive, the procedure is more com-plicated. If the only drive is a Winchester disk, this procedure may not be used without overwriting the existing root or another partition. What you do is the following: 1. GET A SECOND PACK!!!! 2. Dump the root file system to tape using dump (8). 3. Bring the system down and mount the new pack. 4. Load the distribution tape and install the new root file system as you did when first installing the sys-tem. 5. Boot normally using the newly created disk file system. Note that if you add new disk drivers they should also be added to the standalone system in /sys/pdpstand. If you change the disk partition tables the default disk partition tables in /etc/disktab should be mod-ified. 6.5. Recompiling and reinstalling system software It is easy to regenerate the system, and it is a good idea to try rebuilding pieces of the system to buildconfidence in the procedures. The system consists of two major parts: the kernel itself (/sys) and the user programs (/usr/src and subdirectories). The major part of this is /usr/src. The three major libraries are the C library in /usr/src/lib/libc and the FORTRAN libraries/usr/src/usr.lib/libI77 and /usr/src/usr.lib/libF77. In each case the library is remade by changing into the corresponding directory and doing # make and then installed by # make install Similar to the system, # make clean cleans up. The source for all other libraries is kept in subdirectories of /usr/src/usr.lib; each has a makefile andcan be recompiled by the above recipe. If you look at /usr/src/Makefile, you will see that you can recompile the entire system source withone command. To recompile a specific program, find out where the source resides with the whereis (1)command, then change to that directory and remake it with the makefile present in the directory. For instance, to recompile ``date'', all one has to do is # whereis datedate: /usr/src/bin/date.c /bin/date /usr/man/man1/date.1 # cd /usr/src/bin# make date this will create an unstriped version of the binary of ``date'' in the current directory. To install the binaryimage, use the install command as in 27 October 1997 setup.2.11 - 42 Installing and Operating 2.11BSD on the PDP-11 # install -s date /bin/date The -s option will insure the installed version of date has its symbol table stripped. The install commandshould be used instead of mv or cp as it understands how to install programs even when the program is currently in use. If you wish to recompile and install all programs in a particular target area you can override thedefault target by doing: # make# make DESTDIR= pathname install To regenerate all the system source you can do # cd /usr/src# make If you modify the C library, say to change a system call, and want to rebuild and install everythingfrom scratch you have to be a little careful. You must insure that the libraries are installed before the remainder of the source, otherwise the loaded images will not contain the new routine from the library. Thefollowing sequence will accomplish this. # cd /usr/src# make clean # make build# make installsrc The first make removes any existing binaries in the source trees to insure that everything is reloaded. Thenext make compiles and installs the libraries and compilers, then compiles the remainder of the sources.The final line installs all of the commands not installed in the first phase. This will take about 12 hours on a reasonably configured 11/44. 6.6. Making local modifications /usr/new is used by default for the programs that constitute the contributed software portion of thedistribution but which may not have man pages installed. Locally written commands that aren't distributed (or whose man pages are not up to date) are kept in /usr/src/local and their binaries are kept in /usr/local.This allows /usr/bin, /usr/ucb, and /bin to correspond to the distribution tape People using /usr/local commands are made aware that the programs may not be in the base system yet. 6.7. Accounting UNIX optionally records two kinds of accounting information: connect time accounting and processresource accounting. The connect time accounting information is stored in the file /usr/adm/wtmp, which issummarized by the program ac (8). The process time accounting information is stored in the file /usr/adm/acct after it is enabled by accton (8), and is analyzed and summarized by the program sa (8). If you need to recharge for computing time, you can develop procedures based on the informationprovided by these commands. A convenient way to do this is to give commands to the clock daemon cronto be executed every day at a specified time. This is done by adding lines to /usr/adm/crontab; see cron (8)for details. 6.8. Resource control Resource control in 2.11BSD is more elaborate than in previous PDP-11 UNIX systems. Theresources consumed by any single process can be limited by the mechanisms of setrlimit (2). As dis-tributed, the mechanism is voluntary, though sites may choose to modify the login mechanism to impose limits. Csh now has the limits builtin command enabled. Another available option is the 4.3BSD discquota system. 27 October 1997 Installing and Operating 2.11BSD on the PDP-11 Setup.2.11 - 43 6.9. Files that need periodic attention The discussion of system operations is concluded by listing the files that require periodic attention orare system specific /etc/fstab how disk partitions are used/etc/disktab disk partition sizes /etc/printcap printer data base/etc/gettytab terminal type definitions /etc/remote names and phone numbers of remote machines for tip(1)/etc/group group memberships /etc/motd message of the day/etc/master.passwd password file; each account has a line /etc/rc.local local system restart script; runs reboot; starts daemons/etc/inetd.conf local internet servers /etc/hosts host name data base/etc/networks network name data base /etc/netstart Startup file to configure network/etc/services network services data base /etc/hosts.equiv hosts under same administrative control/etc/syslog.conf error log configuration for syslogd (8)/etc/ttys enables/disables ports /etc/crontab commands that are run periodically/etc/aliases mail forwarding and distribution groups /usr/adm/acct raw process account data/usr/adm/messages system error log /usr/adm/shutdownlog log of system reboots/usr/adm/wtmp login session accounting 27 October 1997 setup.2.11 - 44 Installing and Operating 2.11BSD on the PDP-11 APPENDIX A - KERNEL CONFIGURATION OPTIONS 7.1. Kernel configuration options The 2.11BSD kernel has a number of parameters and options that can be used to tailor the kernel tosite specific needs. This appendix lists the parameters and options used in the kernel. The parameters have numeric values, usually table sizes. The options flags are either defined or undefined (via the values YESor NO respectively.) Prototypes for all the following options can be found in the generic kernel configuration file /sys/conf/GENERIC. The process of configuring a new kernel consists simply of copying the generic con-figuration file to a new file, SYSTEM and then editing the options in SYSTEM to reflect your needs. You cantreat the items copied from GENERIC as a ``grocery list'', checking off those options you want, crossing out those you don't and setting numeric parameters to reasonable values. 7.2. Configuring the number of mountable file systems (NMOUNT) Because of time constraints the NMOUNT constant was not moved into the kernel configuration filewhere it belongs. NMOUNT is used to configure the number of mountable file systems in 2.11BSD. Since each slot in the kernel mount table takes up close to a half Kb of valuable kernel data space, the distributionkernel comes configured with NMOUNT set to 5. This is almost certainly too small for most sites and should be increased to the number of file systems you expect to mount. NMOUNT is defined in /sys/h/param.h . If you change its value, you must recompile the kernel(obviously) and the following applications: mount , quotaon , edquota , umount , and df . 7.3. GENERIC kernel configuration All of the generic kernels support the following devices: Device NumberRK06/07 2MSCP (RA) Controllers 2 MSCP (RA) Disks 3RL01/02 Drives 2 SMD (XP) Controllers 1SMD (XP) Disks 2 TE16, TU45, TU77 (HT) Tape drives 2TM11 (TM) Tape drives 2 TS11 (TS) Tape drives 2TK50 (TMSCP) Tape drives 2 The generic kernel adapts automatically to the booted device. The 'a' partition on the booted deviceis automatically made the root filesystem and the 'b' partition the swap area (except for the RL02 which uses the second drive). The size of the swap partition is determined at run time, the kernel queries thedriver for the number of block in the 'b' partition. NOTE: If the swap partition is not labeled as being of type swap the kernel will panic. 7.3.1. GENERIC kernel configuration file # Ma c h i n e c o n fi g u r a t i o n fi l e f o r 2 . 1 1BSD d i s t r i b u t e d k e r n e l .# # F o r ma t :# n ame v a l u e c omm e n t s # An i t em ' s v a l u e ma y b e e i t h e r n ume r i c a l , b o o l e a n o r a s t r i n g ; i f i t ' s# b o o l e a n , u s e "YE S " o r "NO " t o s e t i t o r u n s e t i t , r e s p e c t i v e l y . U s e 2 7 Oc t o b e r 1 9 9 7 I n s t a l l i n g a n d Op e r a t i n g 2 . 1 1BSD o n t h e PDP - 1 1 S e t u p . 2 . 1 1 - 4 5 # t h e d e f a u l t v a l u e a n d t h e c omm e n t s fi e l d a s i n d i c a t o r s o f t h e t y p e o f# fi e l d i t i s . # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ## MAC H I NE DEPEND E N T PA R AME T ERS # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Ma c h i n e t y p e# S p l i t I / D a n d h a r dw a r e fl o a t i n g p o i n t a r e r e q u i r e d . ## I n c l u d i n g UN I BU S ma p s u p p o r t f o r ma c h i n e s w i t h o u t a UN I BUS w i l l n o t c a u s e # a k e r n e l t o d i e . I t s i mp l y i n c l u d e s c o d e t o s u p p o r t UN I BUS ma p p i n g i f# p r e s e n t . ## T h e d e fi n e UN I BU S _MAP i mp l eme n t s k e r n e l s u p p o r t f o r UN I BUS ma p p e d # ma c h i n e s . Howe v e r , a k e r n e l c omp i l e d w i t h UN I BUS _MA P d o e s * n o t * h a v e t o# b e r u n o n a UN I BUS ma c h i n e . T h e d e fi n e s i mp l y i n c l u d e s s u p p o r t f o r UN I BUS # ma p p i n g i f t h e k e r n e l fi n d s i t s e l f o n a ma c h i n e w i t h UN I BUS ma p p i n g .UN I BU S _MAP YES # i n c l u d e s u p p o r t f o r UN I BUS ma p p i n g # T h e d e fi n e Q2 2 h a s b e e n r emo v e d . T h e r e f e r e n c e s t o i t we r e i n c o r r e c t# ( i . e . u s i n g i t t o d i s t i n g u i s h b e t we e n a n Emu l e x CS 0 2 a n d a DH 1 1 ) o r # i n a p p r o p r i a t e ( t h e i f _ i l . c d r i v e r s h o u l d h a v e b e e n c h e c k i n g i f a Un i b u s# Ma p wa s p r e s e n t a t r u n t i me ) . # L I NEHZ 5 0 # c l o c k f r e q u e n c y E u r o p e a nL I NEHZ 6 0 # c l o c k f r e q u e n c y USA # PDP - 1 1 ma c h i n e t y p e ; a l l ow a b l e v a l u e s a r e GENE R I C , 4 4 , 7 0 , 7 3 . GENE R I C# s h o u l d o n l y b e u s e d t o b u i l d a d i s t r i b u t i o n k e r n e l . T h e o n l y u s e o f t h i s # o p t i o n i s t o s e l e c t t h e p r o p e r i n - l i n e P S i n s t r u c t i o n s ( r e f e r e n c e s t o t h e# PSW u s e ' s p l ' , ' m f p s / m t p s ' o r ' mo v b ' i n s t r u c t i o n s d e p e n d i n g o n t h e c p u t y p e ) . PDP 1 1 GENE R I C # d i s t r i b u t i o n k e r n e l# PDP 1 1 4 4 # PDP - 1 1 / 4 4 # PDP 1 1 7 0 # PDP - 1 1 / 7 0 , 4 5 , 5 0 , 5 5# PDP 1 1 7 3 # PDP - 1 1 / 7 3 , 5 3 , 8 3 , 9 3 , 8 4 , 9 4 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ## GENE RAL SYS TEM PARAME T ERS # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # I DENT GENER I C # ma c h i n e n ameMA X USERS 4 # ma x u s e r s o n ma c h i n e # BOO TDEV i s t h e l e t t e r c omb i n a t i o n d e n o t i n g t h e a u t o b o o t d e v i c e ,# o r NON E i f n o t u s i n g t h e a u t o b o o t f e a t u r e . BOOT D E V NON E # d o n ' t a u t o b o o t#BOO TDEV d v h p # D I VA Comp / V b o o t d e v i c e #BOO TDEV h k 6 # r k 0 6 b o o t d e v i c e#BOO TDEV h k 7 # r k 0 7 b o o t d e v i c e #BOO TDEV r a # MS C P b o o t d e v i c e#BOO TDEV r l # r l 0 1 / 0 2 b o o t d e v i c e #BOO TDEV r m # r m0 2 / 0 3 / 0 5 b o o t d e v i c e#BOO TDEV b r # E a t o n BR1 5 3 7 / BR1 7 1 1 b o o t d e v i c e 2 7 Oc t o b e r 1 9 9 7 s e t u p . 2 . 1 1 - 4 6 I n s t a l l i n g a n d Op e r a t i n g 2 . 1 1BSD o n t h e PDP - 1 1 #BOO TDEV s c 1 1 # Em u l e x SC1 1 / B b o o t d e v i c e#BOO TDEV s c 2 1 # Em u l e x SC2 1 b o o t d e v i c e #BOO TDEV s i # s i 9 5 0 0 b o o t d e v i c e # T i me z o n e , i n m i n u t e s we s t o f GMT# T IME ZON E 3 0 0 # EST # T IME ZON E 3 6 0 # CS T# T IME ZON E 4 2 0 # WS T T IME ZON E 4 8 0 # P STDS T 1 # Da y l i g h t S a v i n g s T i me ( 1 o r 0 ) # F i l e s y s t em c o n fi g u r a t i o n# Ro o t d e v , s wa p d e v e t c . s h o u l d b e i n t e r ms o f ma k e d e v . F o r e x amp l e , # i f y o u h a v e a n SMD d r i v e u s i n g t h e x p d r i v e r , r o o t d e v wo u l d b e x p 0 a ,# o r "ma k e d e v ( 1 0 , 0 ) " . Sw a p d e v wo u l d b e t h e b p a r t i t i o n , x p 0 b , o r # "ma k e d e v ( 1 0 , 1 ) " . T h e 1 0 i s t h e ma j o r n umb e r o f t h e d e v i c e ( t h e o f f s e t# i n t h e b d e v s w t a b l e i n c o n f . c ) a n d t h e 0 a n d 1 a r e t h e m i n o r n umb e r s # wh i c h c o r r e s p o n d t o t h e p a r t i t i o n s a s d e s c r i b e d i n t h e s e c t i o n 4 ma n u a l# p a g e s . Yo u c a n a l s o g e t t h e ma j o r n umb e r s f r om t h e MAK E D E V s c r i p t i n # / d e v .P I PEDEV ma k e d e v ( 1 0 , 0 ) # ma k e d e v ( 1 0 , 0 ) x p 0 a RO OTDEV ma k e d e v ( 1 0 , 0 ) # ma k e d e v ( 1 0 , 0 ) x p 0 aSWAPDEV ma k e d e v ( 1 0 , 1 ) # ma k e d e v ( 1 0 , 1 ) x p 0 b # DUM PRO UT I NE i n d i c a t e s wh i c h d ump r o u t i n e s h o u l d b e u s e d . DUM PDEV# s h o u l d b e i n t e r ms o f ma k e d e v . I f DUM PDEV i s NOD E V n o a u t oma t i c # d ump s w i l l b e t a k e n , a n d DUM PRO UT I NE n e e d s t o b e s e t t o " n u l l d e v " t o# r e s o l v e t h e r e f e r e n c e . S e e p a r am . h a n d i o c o n f . c f o r mo r e i n f o r ma t i o n . # DUM PLO s h o u l d l e a v e r o om f o r t h e k e r n e l t o s t a r t s wa p p i n g w i t h o u t# o v e r w r i t i n g t h e d ump . DUMP LO 5 1 2 # d ump s t a r t a d d r e s sDUMP DEV NOD E V # ma k e d e v ( 1 0 , 1 ) x p 0 b DUMP ROU T I NE n u l l d e v # n o d ump r o u t i n e .#DUM PRO UT I NE h k d ump # h k d r i v e r d ump r o u t i n e #DUM PRO UT I NE h p d ump # h p d r i v e r d ump r o u t i n e#DUM PRO UT I NE r a d ump # r a d r i v e r d ump r o u t i n e #DUM PRO UT I NE r l d ump # r l d r i v e r d ump r o u t i n e#DUM PRO UT I NE r md ump # r m d r i v e r d ump r o u t i n e #DUM PRO UT I NE b r d ump # b r d r i v e r d ump r o u t i n e#DUM PRO UT I NE s i d ump # s i d r i v e r d ump r o u t i n e #DUM PRO UT I NE x p d ump # x p d r i v e r d ump r o u t i n e#DUM PRO UT I NE t ms d ump # t ms d r i v e r d ump r o u t i n e # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ## KERNE L CONF I GU R AT I ON # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # BA DSECT NO # b a d - s e c t o r f o r wa r d i n gEXT ERNAL I T IME S YE S # ma p o u t i n o d e t i me v a l u e s UC B_CL I ST NO # c l i s t s mo v e d f r om k e r n e l d a t a s p a c eNOKA 5 NO # KA 5 n o t u s e d e x c e p t f o r b u f f e r s # a n d c l i s t s ( _ e n d < 0 1 2 0 0 0 0 ) ;QU OTA NO # d y n am i c fi l e s y s t em q u o t a s # NOT E - - * v e r y * e x p e n s i v e 2 7 Oc t o b e r 1 9 9 7 I n s t a l l i n g a n d Op e r a t i n g 2 . 1 1BSD o n t h e PDP - 1 1 S e t u p . 2 . 1 1 - 4 7 # UCB _ME T ER i s f a i r l y e x p e n s i v e , b u t v a r i o u s p r o g r ams ( i o s t a t , vm s t a t , e t c )# u s e i t . UC B_METER NO # vm s t a t p e r f o r ma n c e me t e r i n g # NBU F i s t h e s i z e o f t h e b u f f e r c a c h e , a n d i s d i r e c t l y r e l a t e d t o t h e UN I BUS# ma p p i n g r e g i s t e r s . T h e r e a r e 3 2 t o t a l ma p p i n g r e g i s t e r s , o f wh i c h 3 0 a r e # a v a i l a b l e . T h e 0 ' t h i s u s e d f o r CL I STS , a n d t h e 3 1 s t i s u s e d f o r t h e I / O# p a g e o n s om e PDP ' s . I t ' s s u g g e s t e d t h a t y o u a l l ow 7 ma p p i n g r e g i s t e r s # p e r UN I BUS c h a r a c t e r d e v i c e s o t h a t y o u c a n mo v e 5 6K o f d a t a o n e a c h d e v i c e# s i mu l t a n e o u s l y . T h e r e s t s h o u l d b e a s s i g n e d t o t h e b l o c k b u f f e r p o o l . S o , # i f y o u h a v e a DR - 1 1 a n d a TM - 1 1 , y o u wo u l d l e a v e 1 4 u n a s s i g n e d f o r t h em a n d# a l l o c a t e 1 6 t o t h e b u f f e r p o o l . S i n c e e a c h ma p p i n g r e g i s t e r a d d r e s s e s 8 # b u f f e r s f o r a 1K fi l e s y s t em , NBUF wo u l d b e 1 2 8 . A p o s s i b l e e x c e p t i o n wo u l d# b e t o r e d u c e t h e b u f f e r s t o s a v e o n d a t a s p a c e , a s t h e y we r e 2 4 b y t e s e a c h # S h o u l d b e ' sma l l ' f o r GENE R I C , s o r o om f o r k e r n e l + l a r g e p r o g r am t o r u n .NBUF 3 2 # b u f f e r c a c h e , *mu s t * b e <= 2 4 0 # D I AGNO ST I C d o e s v a r i o u s r u n - t i me c h e c k s , s om e o f wh i c h a r e p r e t t y# e x p e n s i v e a n d a t a h i g h p r i o r i t y . S u g g e s t e d u s e i s wh e n t h e k e r n e l # i s c r a s h i n g a n d y o u d o n ' t k n ow wh y , o t h e r w i s e r u n w i t h i t o f f .D I AGNO ST I C NO # m i s c . d i a g n o s t i c l o o p s a n d c h e c k s # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ## PER I PHERAL S : D I SK DR I VE S # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # NB R 0 # EATON BR1 5 3 7 / BR1 7 1 1 , BR1 5 3 8A , B , C , D NHK 2 # RK6 1 1 , RK0 6 / 0 7 NRAC 1 # NRAD c o n t r o l l e r sNRAD 2 # RX 5 0 , RC2 5 , RD5 1 / 5 2 / 5 3 , RA6 0 / 8 0 / 8 1 NRK 0 # RK0 5 NR L 2 # RL 0 1 / 0 2 NRX 0 # RX0 2 NS I 0 # S I 9 5 0 0 d r i v e r f o r CDC 9 7 6 6 d i s k s # B e c a u s e t h e d i s k d r i v e t y p e r e g i s t e r s c o n fl i c t w i t h o t h e r DEC# c o n t r o l l e r s , y o u c a n n o t u s e XP _ PRO BE f o r t h e Amp e x 9 3 0 0 a n d # D i v a d r i v e s . R e a d t h r o u g h / s y s / p d p u b a / h p r e g . h a n d / s y s / p d p u b a / x p . c# f o r i n f o r ma t i o n o n h ow t o i n i t i a l i z e f o r t h e s e d r i v e s . NX PC 1 # NX P D c o n t r o l l e r s ( RH7 0 / RH1 1 s t y l e )NX P D 2 # RM 0 2 / 0 3 / 0 5 , RP 0 4 / 0 5 / 0 6 , CDC 9 7 6 6 , # Amp e x 9 3 0 0 , D i v a , F u j i 1 6 0 , S I E a g l e .XP _ PRO BE YES # c h e c k d r i v e t y p e s a t b o o t NRAM 0 # RAM d i s k s i z e ( 5 1 2 - b y t e b l o c k s ) # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ## PER I PHERAL S : TAP E DR I VE S # 2 7 Oc t o b e r 1 9 9 7 s e t u p . 2 . 1 1 - 4 8 I n s t a l l i n g a n d Op e r a t i n g 2 . 1 1BSD o n t h e PDP - 1 1 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # NH T 2 # TE 1 6 , TU4 5 , TU7 7 # S e t t i n g AV I VTM c o n fi g u r e s t h e TM d r i v e r f o r t h e AV I V 8 0 0 / 1 6 0 0 / 6 2 5 0# c o n t r o l l e r ( t h e s t a n d a r d DEC TM o n l y s u p p o r t s 8 0 0BP I ) . F o r mo r e d e t a i l s , # s e e / s y s / p d p u b a / t m . c .NTM 2 # TM 1 1 AV I VTM YES # AV I V 8 0 0 / 1 6 0 0 / 6 2 5 0 c o n t r o l l e r NT S 2 # TS 1 1 NTMS C P 2 # TM SCP c o n t r o l l e r sNTMS 2 # TMS C P d r i v e s TM SCP _DE BUG NO # d e b u g g i n g c o d e i n TMS C P d r i v e ( EX PEN S I VE ) # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ## PER I PHERAL S : TERMI NAL S # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # NKL i n c l u d e s b o t h KL 1 1 ' s a n d DL 1 1 ' s .# I t s h o u l d a l wa y s b e a t l e a s t 1 , f o r t h e c o n s o l e . NK L 1 # KL 1 1 , DL 1 1NDH 0 # DH1 1 ; NDH i s i n u n i t s o f b o a r d s ( 1 6 e a c h ) CS 0 2 NO # DH u n i t s a b o v e a r e r e a l l y Emu l e x CS 0 2# b o a r d s o n a 2 2 b i t Qb u s . NDM 0 # DM 1 1 ; NDM i s i n u n i t s o f b o a r d s ( 1 6 e a c h )NDHU 0 # DHU 1 1 NDHV 0 # DHV 1 1ND Z 0 # DZ 1 1 ; NDZ i s i n u n i t s o f b o a r d s ( 8 e a c h ) # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ## PER I PHERAL S : OTHE R # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #NDN 0 # DN1 1 d i a l e r NL P 0 # L i n e P r i n t e rLP _MA XCO L 1 3 2 # Ma x i mum n umb e r o f c o l umn s o n l i n e p r i n t e r s ND R 0 # DR 1 1 -W # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ## PSEUDO DEV I CE S , PRO TOCO LS , NETWO R K I NG # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ## Ne t wo r k i n g o n l y wo r k s w i t h s p l i t I / D a n d SUP ERV I SOR s p a c e , i . e . w i t h t h e # 1 1 / 4 4 / 4 5 / 5 0 / 5 3 / 5 5 / 7 0 / 7 3 / 8 3 / 8 4 . NETHE R s h o u l d b e n o n - z e r o f o r n e t wo r k i n g# s y s t em s u s i n g a n y e t h e r n e t . CHE CKS TAC K ma k e s s u r e t h e n e t wo r k i n g s t a c k # p o i n t e r a n d t h e k e r n e l s t a c k p o i n t e r d o n ' t c o l l i d e ; i t ' s f a i r l y e x p e n s i v e# a t 4 e x t r a i n s t r u c t i o n s f o r EVE RY f u n c t i o n c a l l AND r e t u r n , a l wa y s l e f t # NO u n l e s s d o i n g s e r i o u s d e b u g g i n g .I NET NO # TC P / I P CH ECK STA CK NO # Ke r n e l & S u p e r v i s o r s t a c k p o i n t e r c h e c k i n gNE THER 0 # e t h e r p s e u d o - d e v i c e # No t e , PTY ' s a n d t h e s e l e c t ( 2 ) s y s t em c a l l d o n o t r e q u i r e t h e k e r n e l t o# b e c o n fi g u r e d f o r n e t wo r k i n g ( I NET ) . No t e t h a t y o u c a n a l l o c a t e PTY ' s 2 7 Oc t o b e r 1 9 9 7 I n s t a l l i n g a n d Op e r a t i n g 2 . 1 1BSD o n t h e PDP - 1 1 S e t u p . 2 . 1 1 - 4 9 # i n a n y n umb e r ( mu l t i p l e s o f 8 , o f 1 6 , e v e n , o d d , p r i me , wh a t e v e r ) . No t h i n g# i n t h e k e r n e l c a r e s . PTY ' s c o s t 7 8 b y t e s a p i e c e i n k e r n e l d a t a s p a c e . Yo u # s h o u l d p r o b a b l y h a v e a t l e a s t 8 - 1 0 s i n c e s e v e r a l a p p l i c a t i o n s u s e t h em :# s c r i p t , j o v e , w i n d ow , r l o g i n , . . . NP TY 0 # p s e u d o - t e r m i n a l s - GENE R I C s y s n e e d s NON E # To ma k e t h e 3Com E t h e r n e t b o a r d wo r k c o r r e c t l y , s p l i mp h a s t o b e p r omo t e d# t o s p l 6 ; s p l fi x fi l e s t h a t d o t h i s a r e i n c o n f / 3Com ; t h e c o n fi g s c r i p t # d o e s t h e r i g h t t h i n g .NE C 0 # 3Com E t h e r n e t ND E 0 # DEUNA / DELUAN I L 0 # I n t e r l a n E t h e r n e t NS L 0 # S e r i a l L i n e I PNQ E 0 # DEQNA NQ T 0 # DEQTA ( DE LQA - YM, DELQA - PLUS )NVV 0 # V2 LN I ( P r o n e t ) NA CC 0 # AC C LH / DH ARPAn e t IMP i n t e r f a c ePL I NO # LH / DH i s c o n n e c t e d t o a PL I N IMP 0 # ARPAn e t IMP 1 8 2 2 i n t e r f a c e # T h e f o l l ow i n g a r e u n t e s t e d i n 2 . 1 1BSD ; s ome a r e u n t e s t e d s i n c e b e f o r e 2 . 9BSD# S om e wo n ' t e v e n c omp i l e . Mo s t w i l l r e q u i r e mo d i fi c a t i o n . Go o d l u c k . ENAB LE 3 4 NO # i f h a v e t h e ENA BLE 3 4 b o a r d NC SS 0 # DE C / CSS IMP 1 1 - A ARPAn e t IMP i n t e r f a c eNDMC 0 # DMC 1 1 NEN 0 # Xe r o x p r o t o t y p e ( 3 Mb ) E t h e r n e tNHY 0 # Hy p e r c h a n n e l NS 0 # Xe r o x NS ( XN S )NS R I 0 # SR I DR 1 1 c ARPAn e t IMP NT B 0 # RS 2 3 2 i n t e r f a c e f o r Ge n i s c o / H i t a c h i t a b l e t s # De fi n i n g F PS IM t o YES c omp i l e s a fl o a t i n g p o i n t s i mu l a t o r i n t o t h e k e r n e l# wh i c h w i l l c a t c h fl o a t i n g p o i n t i n s t r u c t i o n t r a p s f r om u s e r s p a c e . T h i s # d o e s n ' t wo r k a t p r e s e n t .FP S IM NO # fl o a t i n g p o i n t s i mu l a t o r # To e n a b l e p r o fi l i n g , t h e : s p l fi x s c r i p t mu s t b e c h a n g e d t o u s e s p l 6 i n s t e a d# o f s p l 7 ( s e e c o n f / : s p l fi x . p r o fi l e ) , a l s o , y o u h a v e t o h a v e a ma c h i n e w i t h a # s u p e r v i s o r PA R / PDR p a i r , i . e . a n 1 1 / 4 4 / 4 5 / 5 0 / 5 3 / 5 5 / 7 0 / 7 3 / 8 3 / 8 4 , a s we l l# a s b o t h a KW 1 1 - L a n d a KW 1 1 - P . ## No t e t h a t p r o fi l i n g i s n o t c u r r e n t l y wo r k i n g . We d o n ' t h a v e a n y p l a n s o n # fi x i n g i t , s o t h i s i s e s s e n t i a l l y a n o n - s u p p o r t e d f e a t u r e .PROF I LE NO # s y s t em p r o fi l i n g w i t h KW1 1 P c l o c k I NGR ES NO # i n c l u d e t h e I n g r e s l o c k d r i v e r 27 October 1997 setup.2.11 - 50 Installing and Operating 2.11BSD on the PDP-11 APPENDIX B - STANDALONE DISKLABEL PROGRAM 8.1. Standalone disklabel example This is a real example of using the disklabel program to place a label on a disk. User input is in boldtype. The disklabel program was loaded from a bootable TK50. The disk being labeled in a RD54. The BOOT> prompt is from the 11/73 console ODT, if you are using an 11/44 the prompt will be >>>. The first thing that is done is request disklabel to create a default partition ('a') which spans the entiredisk. Some disk types have fixed sizes and geometries, for example RK05 (rk), RK06/7 (hk) and RL02 (rl) drives. With this type of disk the standalone disklabel program will generate a label with the correct geom-etry and 'a' partition size. With MSCP ('ra') disks disklabel will query the controller for the information it needs. The last type of disk, SMD (xp), presents many problems, disklabel will attempt to determine thedrive type and geometry but you will have to verify the information. Indented paragraphs like this one are explanatory comments and are not part of the output fromthe disklabel program. In the case of MSCP drives the number of cylinders may be 1 too low. This is discussed in the example below. BOOT> MU 0 73Boot from tms(0,0,0) at 0174500: tms(0,1) Boot: bootdev=06001 bootcsr=0174500disklabel Disk? ra(0,0)d(isplay) D(efault) m(odify) w(rite) q(uit)? D d(isplay) D(efault) m(odify) w(rite) q(uit)? d type: MSCPdisk: RD54 flags:bytes/sector: 512 sectors/track: 17tracks/cylinder: 15 sectors/cylinder: 255cylinders: 1220 rpm: 3600drivedata: 0 0 0 0 0 1 partitions:# size offset fstype [fsize bsize] a: 311200 0 2.11BSD 1024 1024 # (Cyl. 0 - 1220*) The columns do not line up nicely under the headings due to limitations of the sprintf() routinein the standalone I/O package. There is no capability to justify the output. It should be obvious which column belongs under which heading. The '*' says that the partition does not end on acylinder boundary. This is due to the peculiar way in which MSCP returns the geometry information: sectors/track * tracks/cylinder * cylinders != sectors per volume. d(isplay) D(efault) m(odify) w(rite) q(uit)? mmodify d(isplay) g(eometry) m(isc) p(artitions) q(uit)? m 27 October 1997 Installing and Operating 2.11BSD on the PDP-11 Setup.2.11 - 51 It is normally not necessary to change the geometry of an MSCP disk. On the other hand it willalmost always be necessary to specify the geometry of an SMD drive (one which uses the XP driver). Since the drive being labeled is an MSCP drive the next step is to set the pack label tosomething other than DEFAULT . modify miscd(isplay) t(ype) n(ame) l(able) f(lags) r(pm) D(rivedata) q(uit)? l label [DEFAULT]: TESTINGmodify misc d(isplay) t(ype) n(ame) l(able) f(lags) r(pm) D(rivedata) q(uit)? qmodify d(isplay) g(eometry) m(isc) p(artitions) q(uit)? pmodify partitions d(isplay) n(umber) s(elect) q(uit)? d type: MSCPdisk: RD54 flags:bytes/sector: 512 sectors/track: 17tracks/cylinder: 15 sectors/cylinder: 255cylinders: 1220 rpm: 3600drivedata: 0 0 0 0 0 1 partitions:# size offset fstype [fsize bsize] a: 311200 0 2.11BSD 1024 1024 # (Cyl. 0 - 1220*) modify partitionsd(isplay) n(umber) s(elect) q(uit)? s a b c d e f g h q(uit)? asizes and offsets may be given as sectors, cylinders or cylinders plus sectors: 6200, 32c, 19c10s respectivelymodify partition 'a' d(isplay) z(ero) t(ype) o(ffset) s(ize) f(rag) F(size) q(uit)? s'a' size [311200]: 15884 d(isplay) z(ero) t(ype) o(ffset) s(ize) f(rag) F(size) q(uit)? qmodify partitions d(isplay) n(umber) s(elect) q(uit)? sa b c d e f g h q(uit)? b sizes and offsets may be given as sectors, cylindersor cylinders plus sectors: 6200, 32c, 19c10s respectively modify partition 'b'd(isplay) z(ero) t(ype) o(ffset) s(ize) f(rag) F(size) q(uit)? o 'b' offset [0]: 15884modify partition 'b' d(isplay) z(ero) t(ype) o(ffset) s(ize) f(rag) F(size) q(uit)? s'b' size [0]: 16720 modify partition 'b'd(isplay) z(ero) t(ype) o(ffset) s(ize) f(rag) F(size) q(uit)? t 'b' fstype [unused]: swapmodify partition 'b' 27 October 1997 setup.2.11 - 52 Installing and Operating 2.11BSD on the PDP-11 d(isplay) z(ero) t(ype) o(ffset) s(ize) f(rag) F(size) q(uit)? qmodify partitions d(isplay) n(umber) s(elect) q(uit)? sa b c d e f g h q(uit)? c sizes and offsets may be given as sectors, cylindersor cylinders plus sectors: 6200, 32c, 19c10s respectively modify partition 'c'd(isplay) z(ero) t(ype) o(ffset) s(ize) f(rag) F(size) q(uit)? o 'c' offset [0]: 0modify partitions 'c' d(isplay) z(ero) t(ype) o(ffset) s(ize) f(rag) F(size) q(uit)? s'c' size [0]: 311200 modify partitions 'c'd(isplay) z(ero) t(ype) o(ffset) s(ize) f(rag) F(size) q(uit)? t 'c' fstype [unused]: unusedmodify partitions 'c' d(isplay) z(ero) t(ype) o(ffset) s(ize) f(rag) F(size) q(uit)? qmodify partitions d(isplay) n(umber) s(elect) q(uit)? sa b c d e f g h q(uit)? g sizes and offsets may be given as sectors, cylindersor cylinders plus sectors: 6200, 32c, 19c10s respectively modify partition 'g'd(isplay) z(ero) t(ype) o(ffset) s(ize) f(rag) F(size) q(uit)? o 'g' offset [0]: 32604modify partition 'g' d(isplay) z(ero) t(ype) o(ffset) s(ize) f(rag) F(size) q(uit)? s'g' size [0]: 278596 modify partition 'g'd(isplay) z(ero) t(ype) o(ffset) s(ize) f(rag) F(size) q(uit)? t 'g' fstype [unused]: 2.11BSDmodify partition 'g' d(isplay) z(ero) t(ype) o(ffset) s(ize) f(rag) F(size) q(uit)? qmodify partitions d(isplay) n(umber) s(elect) q(uit)? nNumber of partitions (8 max) [7]? 7 modify partitionsd(isplay) n(umber) s(elect) q(uit)? q modifyd(isplay) g(eometry) m(isc) p(artitions) q(uit)? d type: MSCPdisk: RD54 label: TESTINGflags: bytes/sector: 512sectors/track: 17 tracks/cylinder: 15sectors/cylinder: 255 cylinders: 1220rpm: 3600 drivedata: 0 0 0 0 0 7 partitions: 27 October 1997 Installing and Operating 2.11BSD on the PDP-11 Setup.2.11 - 53 # size offset fstype [fsize bsize]a: 15884 0 2.11BSD 1024 1024 # (Cyl. 0 - 62*) b: 16720 15884 swap # (Cyl. 62*- 127*)c: 311200 0 unused 1024 1024 # (Cyl. 0 - 1220*) g: 278596 32604 2.11BSD 1024 1024 # (Cyl. 127- 1220*) modifyd(isplay) g(eometry) m(isc) p(artitions) q(uit)? q On MSCP disks it is possible you will see a warning error like this: partition c: extends past end of unit 0 311200 311100partition g: extends past end of unit 32604 278596 311100 This is not cause for panic. What this is saying is that the number of cylinders is one too low.MSCP devices do not necessarily use all of the last cylinder. The total number of blocks is precisely known for MSCP devices (it is returned in the act of bringing the drive online). Howeverthe number of sectors on the volume is not necessarily evenly divisible by the number of sectors per track (311200 divided by 17*15 gives 1220.392). Basically the last cylinder is not fullyused. What must be done is raise the number of cylinders by 1. NOTE: For any other disk type it is cause for concern if the warning above is issued - it meansthat incorrect partition or geometry information was entered by the user and needs to be corrected. d(isplay) D(efault) m(odify) w(rite) q(uit)? mmodify d(isplay) g(eometry) m(isc) p(artitions) q(uit)? gmodify geometry d(isplay) s(ector/trk) t(rk/cyl) c(yl) S(ector/cyl) q(uit)? ccylinders [1220]: 1221 modify geometryd(isplay) s(ector/trk) t(rk/cyl) c(yl) S(ector/cyl) q(uit)? q modifyd(isplay) g(eometry) m(isc) p(artitions) q(uit)? q d(isplay) D(efault) m(odify) w(rite) q(uit)? wd(isplay) D(efault) m(odify) w(rite) q(uit)? q 73Boot from tms(0,0,1) at 0174500: ra(1,0,0)unix ra1 csr[00]: 0172154 The last string entered shows how I boot from an alternate controller. In normal use, i.e. with asingle MSCP controller, the string would simply be ra(0,0)unix. 8.2. Standalone disklabel program The standalone disklabel program is the second file on a boot tape (after the bootblocks and boot pro-gram). It is used to place an initial label on a disk describing the disk and its partitions. The program is also used when the root ('a') or swap ('b') partitions of a previously labeled system disk must be modified.The second use is mandated because the root and swap partitions can not be modified while the kernel has them open. disklabel effectively runs in CBREAK mode - you do not need to hit the RETURN key except whenprompted for a multicharacter response such as a string (the pack label) or a number (partition size). Defaults are placed inside square brackets ([default]). Entering RETURN accepts the default. 27 October 1997 setup.2.11 - 54 Installing and Operating 2.11BSD on the PDP-11 The program is organized into several levels. disklabel prints the current level out before prompting.At each level there is always the choice of d(isplaying) the current label and q(uit)ing the current level and returning to the previous level. If you are at the top level and enter q the program will exit back to Bootunless you have made changes to the disklabel. In that case you will be asked if you wish to discard the changes, if you answer y the changes will be discarded. If the answer is n the q is ignored and disklabeldoes not exit. In the following paragraphs the convention is to bold the user input while leaving the output from disklabel in normal type. The devices used were a TK50 and an RD54, thus the tape device is tms and thedisk device is ra. The TK50 was booted resulting in the usual message from Boot: 73Boot from tms(0,0,0) at 0174500: tms(0,1) 8.3. Disklabel - tour of the levels. Boot: bootdev=06001 bootcsr=0174500disklabel Disk? ra(0,0)d(isplay) D(efault) m(odify) w(write) q(uit)? m The 'D' option will request disklabel to create a default label based on what the program candetermine about the drive. For some devices, such as RL01/02, RK06/07, MSCP (RD54, RA81, usw.), disklabel can determine what the drive type is and how many sectors it has. For otherdevices, such as SMD drives supported by the xp driver, the task is complicated by the number of different controllers and emulations supported. Some 3rd party controllers have capabilitiesthat DEC controllers do not and the xp has no way of knowing exactly which type of controller is present. In this case disklabel will guess and then depend on you to enter the correct data. modifyd(isplay) g(eometry) m(isc) p(artitions) q(uit)? g modify geometryd(isplay) s(ector/trk) t(rk/cyl) c(yl) S(ector/cyl) q(uit)? q The Sector/cyl entry is rarely used. disklabel will calculate this quantity for you from the sec-tor/trk and trk/cyl quantities. modifyd(isplay) g(eometry) m(isc) p(artitions) q(uit)? m d(isplay) t(ype) n(ame) l(abel) f(lags) r(pm) D(rivedata) q(quit)? f Type is one of: SMD, MSCP, old DEC, SCSI, ESDI, ST506, floppy. Name is a string up to 16 characters in length. It is typically something like rd54 or rm03 butmay be any meaningful string. Label is an arbitrary string up to 16 characters in length - nothing in the system checks for ordepends on the contents of the pack label string. Rpm is the rotational speed of the drive. Nothing in the system uses or depends on this at thepresent time. Default is 3600. Drivedata consists of 5 longwords of arbitrary data. Reserved for future use. modify misc flags 27 October 1997 Installing and Operating 2.11BSD on the PDP-11 Setup.2.11 - 55 d(isplay) c(lear) e(cc) b(adsect) r(emovable) q(uit)? q Ecc says that the controller/driver can correct errors. Badsect indicates that the controller/driver supports bad sector replacement. Removable indicates that the drive uses removable media (floppy, RL02, RA60 for example). modify miscd(isplay) t(type) n(ame) l(abel) f(lags) r(pm) D(rivedata) q(uit)? q modifyd(isplay) g(eometry) m(isc) p(artitions) q(uit)? p modify partitionsd(isplay) n(umber) s(elect) q(uit)? n Number of partitions (8 max) [7]? 7 This is the highest partition number considered to be valid. disklabel will adjust this parametersemi-automatically at the p level but it may be necessary to use n in cases where some partitions are not to be used or contain invalid information. modify partitionsd(isplay) n(umber) s(elect) q(uit)? s a b c d e f g h q(uit)? asizes and offsets may be given as sectors, cylinders or cylinders plus sectors: 6200, 32c, 19c10 respectivelymodify partition 'a' d(isplay) z(ero) t(ype) o(ffset) s(ize) f(rag) F(size) q(uit)? q Zero clears the size and offset fields of a partition entry and sets the filesystem type to unused. Type is the filesystem type and of the possible choices only 2.11BSD, swap and unused makeany sense to specify. Offset is the number of sectors from the beginning of the disk at which the partition starts. Size is the number of sectors which the partition occupies. Frag is the number of fragments a filesystem block can be broken into. It is not presently usedand should be left at the default of 1. Fsize is the filesystem blocksize and should be left at the default of 1024. modify partitionsd(isplay) n(umber) s(elect) q(uit)? q modifyd(isplay) g(eometry) m(isc) p(artitions) q(uit)? q d(isplay) D(efault) m(odify) w(write) q(uit)? qLabel changed. Discard changes [y/n]? y 73Boot from tms(0,0,1) at 0174500 27 October 1997 setup.2.11 - 56 Installing and Operating 2.11BSD on the PDP-11 8.4. Disklabel - helpful hints and tips. Define only those partitions you actually will use. There is no need to set up all 8 partitions. Drivesless than 200Mb probably will only have 3 partitions defined, 'a', 'b' and 'd' for /, swap and /usr respectively. Remember to set the number of partitions. Disklabel will attempt to do this for you by keepingtrack of the highest partition you modify but this is not foolproof. Do not define overlapping partitions unless you are sure what you are doing. disklabel will warn youof overlapping partitions but will not prohibit you from writing such a label to disk. Remember that the prompt levels nest in disklabel. It will be necessary in several cases to enter mul-tiple q commands to get back to the top level. IMPORTANT: Keep at least 1, preferably more, bootable tape or floppy with disklabel on it presentat all times. If the label on a disk ever becomes corrupted the kernel will be very unhappy and probably won't boot. If this happens you will need to boot the standalone disklabel program and relabel the disk. Atleast 2.11BSD provides a standalone disklabel - previous 4BSD systems which implemented disklabels didnot and the cold-start of those systems was painful indeed. IMPORTANT: Write down in at least one place, and keep with the tape/floppy mentioned above, thegeometry and partition layout you assign to the disk. The disklabel (8) program should be used to produce a hardcopy of the disklabel. 27 October 1997