IInnssttaalllliinngg aanndd OOppeerraattiinngg 22..1111BBSSDD oonn tthhee PPDDPP--1111 JJuunnee 1133,, 11999955 _S_t_e_v_e_n _S_c_h_u_l_t_z GTE Government Systems 112 Lakeview Canyon Thousand Oaks CA 91362 sms@wlv.iipo.gtegsc.com _A_B_S_T_R_A_C_T This document contains instructions for the installation and operation of the 2.11BSD PDP-11|^ UNIX|= system. It discusses procedures for installing 2.11BSD UNIX on a PDP-11, including explanations 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 configure the 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 period of time; make sure the ``Index:'' line of the bug report indicates that the release is ``2.11BSD''. See the _s_e_n_d_b_u_g(8) program for more details. All fixes that I make, or that are sent to me, will be posted on _U_S_E_N_E_T, in the news group ``comp.bugs.2bsd''. ----------- |^ DEC, PDP-11, VAX, IDC, SBI, UNIBUS and MASSBUS are trademarks of Digital Equipment Corporation. |= UNIX is a Trademark of Bell Laboratories. 17 March 1998 setup.2.11 - 2Installing and Operating 2.11BSD on the PDP-11 11.. IINNTTRROODDUUCCTTIIOONN This document explains how to install 2.11BSD UNIX for the PDP-11 on your system. This document 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 a standalone ddiisskkllaabbeell 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 names longer 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 lloonnggss now. The procedure for performing a full bootstrap is out- lined in chapter 2. The process includes copying a root file system from the distribution tape into a new file sys- tem, 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 lim- ited ability to access old filesystems which may be used after the system partitions have been loaded from a full bootstrap. It is desirable to recompile 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 be recompiled to pick up changes in the standard libraries. Note too, that the portable ASCII format of _a_r(1) archives is now in place - any local archive files will have to be converted using _/_u_s_r_/_o_l_d_/_a_r_c_v. 11.. HHaarrddwwaarree ssuuppppoorrtteedd This distribution can be booted on a PDP-11 with 1Mb of memory or more|^, separate I&D, and with any of the following disks: ----------- |^ 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. 17 March 1998 Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 3 RK06, RK07 Any MSCP disk, including but not limited to: RD53, RD54, RA81, RZ2x RM03, RM05 RP04, 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 root filesystem 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 a single 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, while listed above, are not very well suited to loading the dis- tribution. The RK06/07 drives are hard pressed to even hold the system binaries, much less the sources. The tape drives supported by this distribution are: TS11, TU80, TK25 TM11, AVIV 6250/1600 TE16, TU45, TU77 TK50, TU81, TU81+, TZ30 Although 2.11BSD contains a kernel level floating point sim- ulator, it has never been tested. In fact it would not 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 sim- ulator can not be tested. At the release of 2.10BSD some thought was given to the possibility of lifting the separate I&D restriction, but that thought has languished. The work will never be done. As time passes more and more programs have become almost too large even with separate I&D. 22.. DDiissttrriibbuuttiioonn ffoorrmmaatt 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 _C_h_a_n_g_e_s _i_n _2_._1_1_B_S_D 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 17 March 1998 setup.2.11 - 4Installing and Operating 2.11BSD on the PDP-11 certain standard PDP-11 packages do not include a tape drive, this means one must either borrow one from another PDP-11 system or one must be purchased separately. TThhee ddiissttrriibbuuttiioonn ddooeess nnoott ffiitt oonn sseevveerraall ssttaannddaarrdd PPDDPP--1111 ccoonnffiigguurraattiioonnss tthhaatt ccoonnttaaiinn oonnllyy ssmmaallll ddiisskkss. If your hardware configuration does not provide at lleeaasstt 7755 Megabytes of disk space you can still install the distribu- tion, but you will probably have to operate without source for the user level commands and, possibly, the source for the operating system. The root file system now occupies aa mmiinniimmuumm ooff 44MMbb. If at all possible a larger, 6 or 7Mb, root partition should be defined when using the standalone ddiisskkllaabbeell program. If you have the facilities, it is a good idea to copy the magnetic tape(s) in the distribution kit to guard against 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 interspersed 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 file on the tape contains preliminary bootstrapping programs. This is followed by several standalone utilities (_d_i_s_k_l_a_b_e_l, _m_k_f_s(8), _r_e_s_t_o_r(8), and _i_c_h_e_c_k(8)|^) followed by a full dump of a root file system (see _d_u_m_p(8)). Following the root file system dump is a tape archive image of //uussrr except for //uussrr//ssrrcc (see _t_a_r(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 _t_a_r format, of all the remaining source that comes with the sys- tem. The entire distribution (barely) fits on a single TK50 cartridge, references to the second tape should be treated as being the 9th file on the TK50. Many of the programs in /usr/src/new have been tar+compress'd in order to keep the distribution to a single tape. ----------- |^ References of the form X(Y) mean the subsection named X in section Y of the UNIX programmer's manual. 17 March 1998 Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 5 TAPE 1: Tape file Record size Records|^ Contents --------------------------------------------------------------------------------------- 0 512 1 primary tape boot block 512 1 boot block (some tape boot ROMs go for this copy) 512 69 standalone bboooott program 1 1024 37 standalone ddiisskkllaabbeell 2 1024 33 standalone mmkkffss(8) 3 1024 35 standalone rreessttoorr(8) 4 1024 32 standalone iicchheecckk(8) 5 10240 285 _d_u_m_p of ``root'' file system 6 10240 3368 _t_a_r dump of /usr, excepting /usr/src 7 10240 519 _t_a_r dump of /usr/src/include and /usr/src/sys TAPE 2: Tape file Record size Records|^ Contents ------------------------------------------------------------------------------------- 0 10240 4092 _t_a_r dump of /usr/src, excepting include and sys 33.. UUNNIIXX ddeevviiccee nnaammiinngg 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 hk RL01, RL02 disks rl RK05 rk MSCP disks ra RM02/03/05 xp RP04/05/06 xp SMD disks xp TM02/03, TE16, TU45, TU77 tapes ht TE10/TM11 tapes tm TS11 tapes ts TMSCP tapes tms Additionally, the following non-DEC devices are also sup- ported: ----------- |^ The number of records in each tape file are approximate and do not necessarily correspond to the actual number on the tape. 17 March 1998 setup.2.11 - 6Installing and Operating 2.11BSD on the PDP-11 SI 9500, CDC 9766 si SI, CDC 9775 xp SI6100, Fujitsu Eagle 2351A xp Emulex SC01B or SI9400, Fujitsu 160 xp Emulex SC-21, xp The generic SMD disk driver, _x_p, will handle most types of SMD disks on one or more controllers (even different types on the same controller). The xxpp 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 the PDP-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 systems. The standalone system used to bootstrap the full UNIX system uses device names of the form: _x_x(_c,_y,_z) where _x_x is one of hhkk, hhtt, rrkk, rrll, ttmm, ttss, ttmmss, or xxpp. The value _c specifies the controller number (0-3). This value is usually not explicitly given. The default is 0 if boot- ing from the standard (first) CSR of a device. Example: if there are two MSCP controllers in the sys- tem addressed as 0172150 and 0172154 respectively booting from the controller at 172154 requires that _c be given as 1. Booting from the standard CSR of 0172150 would be done by specifying _c as 0 or omitting the _c parameter. bboooott auto- matically detects if the first (standard) CSR is being used. All future references will ignore the _c parameter by assum- ing the default value. The value _y specifies the device or drive unit to use. The _z value is interpreted differently for tapes and 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 rreeaallllyy know what you are doing. The ability to load a kernel from the swap area is planned for the future but does not presently exist. For tapes _z is a file number on the tape.|^ 17 March 1998 Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 7 In all simple cases, a drive with unit number 0 (deter- mined either by a unit plug on the front of the drive, or jumper settings on the drive or controller) will be called unit 0 in its UNIX file name. file name. If there are mul- tiple 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 also took 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 by a single tape mark. The distribution tapes have data structures in the tape files and though the first tape con- tains 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 any consecutive cylin- der range on the physical device. While overlapping parti- tions are allowed they are not a good idea, being an acci- dent waiting to happen (making one filesystem will destroy the other overlapping filesystems). The cylinders occupied by the 8 partitions for each drive type are specified by the disk label read from the disk. ----------- |^ NNoottee:: that while a tape file consists of a sin- gle data stream, the distribution tape(s) have data structures in these files. Although the first tape contains only 8 tape files, they com- prise several thousand UNIX files. NNoottee:: 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 ttss only operates at 1600BPI, so there is no special unit density encoding. The hhtt 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 ttmm only supports 800BPI (and hence can't be used with the 2.11BSD distribution tape), but several widely used ttmm emulators sup- port 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. 17 March 1998 setup.2.11 - 8Installing and Operating 2.11BSD on the PDP-11 If no label exists the disk will not be bootable and while the kernel attempts not to damage unlabeled disks (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 ddiisskkllaabbeell program is used to define the partition tables. Each partition may be used either 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 begin- ning of the disk). If the drive is to be used to bootstrap a UNIX system then the 'a' partition must be of type 22..1111BBSSDD (FS_V71K in _d_i_s_k_l_a_b_e_l_._h) and at least 4Mb is size. A 'b' partition of at least 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 the first 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. The third ('c') logical partition of each physical disk also has a conventional usage: it allows access to 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 the entire 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 _/_e_t_c_/_d_i_s_k_t_a_b (_d_i_s_k_t_a_b(5)) do not. The entries in _/_e_t_c_/_d_i_s_k_t_a_b are translations of the old parti- tion tables which used to be embedded in the device 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 be observed when using the _n_e_w_f_s(8) and _d_i_s_k_l_a_b_e_l(8) commands. 44.. UUNNIIXX ddeevviicceess:: bblloocckk aanndd rraaww UNIX makes a distinction between ``block'' and ``raw'' (character) devices. Each disk has a block device interface where the system makes the device byte addressable and you can write a single byte in the middle of the disk. The sys- tem will read out the data from the disk sector, insert the byte you gave it and put 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 17 March 1998 Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 9 ``/dev/rxx0a'', the ``r'' here standing for ``raw''. Raw devices 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 filesys- tems, when checking unmounted filesystems, or for copying quiescent filesystems. The block devices are used to mount file systems, 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 efficiency) 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 ddiisskkllaabbeell program must be used to alter the 'a' and 'b' partitions of a drive being used 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 aallwwaayyss open when the kernel is run- ning. 17 March 1998 setup.2.11 - 10Installing and Operating 2.11BSD on the PDP-11 22.. BBOOOOTTSSTTRRAAPP PPRROOCCEEDDUURREE This section explains the bootstrap procedure that can be used to get the kernel supplied with this distribution running on your machine. It is mandatory to do a full boot- strap since the filesystem has changed from 2.10.1BSD to 2.11BSD. The safest route is to use _t_a_r(1) to dump all of your current file systems, do a full bootstrap of 2.11BSD and then restore user files from the backups. There is also an untested version of _5_1_2_r_e_s_t_o_r(8) available for V7 sites that need to read old dump tapes. It is also desirable to make a convenient copy of sys- tem configuration files for use as guides when setting 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 _r_e_s_t_o_r(8) is able to read and automatically convert to the new on disk directory format _d_u_m_p(8) tapes made under 2.9BSD, 2.10BSD and 2.10.1BSD. 22..11.. BBoooottiinngg ffrroomm ttaappee 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 _d_i_s_k_l_a_- _b_e_l. 3) Create a UNIX ``root'' file system system on disk using _m_k_f_s(8). 4) Restore the full root file system using _r_e_s_t_o_r(8). 5) Boot the UNIX system on the new root file system and copy the appropriate _s_e_c_t_o_r _0 _b_o_o_t _b_l_o_c_k to your boot device. 6) Build and restore the /usr file system from tape with _t_a_r(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). 17 March 1998 Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 11 Certain of these steps are dependent on your hardware configuration. If your disks require formatting, standard DEC diagnostic utilities will have to be used, they are not supplied on the 2.11BSD distribution tape. 22..11..11.. SStteepp 11:: llooaaddiinngg tthhee ttaappee bboooottssttrraapp mmoonniittoorr To load the tape bootstrap monitor, first mount the magnetic tape on drive 0 at load point, making sure 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. bboooott 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 to boot 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): 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): 17 March 1998 setup.2.11 - 12Installing and Operating 2.11BSD on the PDP-11 012700 mov $unit,r0 000000 012701 mov $172522,r1 172522 005011 clr (r1) 105711 1b:tstb (r1) 100376 bpl 1b 012761 mov $setchr,-2(r1) 001040 177776 105711 2b:tstb (r1) 100376 bpl 2b 012761 mov $read,-2(r1) 001060 177776 000000 halt 140004 setchr: TS_ACK|TS_CVC|TS_SETCHR 001050 char 000000 high order address 000010 number of bytes 001070 char: status 000000 000016 000000 140001 read: TS_ACK|TS_CVC|TS_READ 000000 low order of address 000000 high order of address 001000 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 at location 0. The register rr11 MMUUSSTT be left pointing at the device _c_s_r. For the default/first TM or TS this is 0172522. The regis- ter rr00 MMUUSSTT contain the unit number (usually 0). The console should type _n_nBBoooott ffrroomm _x_x((_c_t_l_r,,_d_r_i_v_e,,_p_a_r_t)) aatt _c_s_r :: where _n_n 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 determine the cpu type. At present 2.11BSD runs on the 44, 53, 70, 73, 83, 84, 93 and 94 oonnllyy. It must be empha- sized that 2.11BSD requires separate I/D. _c_t_l_r is the controller number that BBoooott was loaded from. It is 0 unless booting from a non-standard CSR. 17 March 1998 Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 13 _d_r_i_v_e is the drive unit number. The _p_a_r_t number is disk partition or tapefile number booted from. This will always be 0 for the tape BBoooott program. _c_s_r is an octal number telling the CSR of the controller from which BBoooott was loaded. You are now talking to the tape bootstrap monitor. At any point in the following procedure you can return to this section, reload the tape bootstrap, and restart. Through the rest of this section, substitute the correct disk type for _d_k and the tape type for _t_p. 22..11..22.. SStteepp 22:: ccrreeaattiinngg tthhee ddiisskk llaabbeell The standalone _d_i_s_k_l_a_b_e_l program is then run: ::_t_p(0,1) (_d_i_s_k_l_a_b_e_l is tape file 1) BBoooott:: bboooottddeevv==00nnnnnnnn bboooottccssrr==00mmmmmmmmmmmm ddiisskkllaabbeell DDiisskk?? _d_k(0,0) (drive 0, partition 0) d(isplay) D(efault) m(odify) w(rite) q(uit)? ... :: (back at tape boot level) The _d_i_s_k_l_a_b_e_l program is meant to be fairly intuitive. When prompted with a line of choices entering the key just before the left parenthesis selects the entry. If there is an existing label present on _d_k(0,0) it will be used as the default. To have _d_i_s_k_l_a_b_e_l create a new default based on its idea of what the drive is select DD. Then enter mm to modify/edit the label. The MSCP driver is quite good at identifying drives because it can query the controller. Other drivers (notably the SMD (xxpp) 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 the geometry of the drive so you can verify and cor- rect _d_i_s_k_l_a_b_e_l's choices. You can however, if using non-DEC SMD controllers, make things easy for _d_i_s_k_l_a_b_e_l to determine what type of drive is being used. If your controller offers the choice of RM02 emulation you should select that choice. The standalone xxpp driver uses RM02 as the indication that drive identification capabilities not offered by DEC controllers are present. The driver will be able to determine the geometry of the drive in this case. This is ooppttiioonnaall because you can 17 March 1998 setup.2.11 - 14Installing and Operating 2.11BSD on the PDP-11 explicitly specify all of the parameters to the standalone _d_i_s_k_l_a_b_e_l program. A full description of the standalone _d_i_s_k_l_a_b_e_l program is in Appendix B of this document. 22..11..33.. SStteepp 33:: ccrreeaattiinngg aa UUNNIIXX ````rroooott'''' ffiillee ssyysstteemm Now create the root file system using the following procedure.|^ The size of the root ('a') filesystem was assigned in step 2 (creating the disk label). _m_k_f_s will not allow a filesystem to be created if there is not a label present or if the partition size is 0. _m_k_f_s looks at partition 0 ('a') in the disklabel for the root file system size. Finally, determine the proper interleaving factors _m and _n for your disk. Extensive testing has demonstrated that the choice of _m is non critical (performance of a file system varying only by 3 to 4% for a wide range of _m val- ues). Values for _m within the range from 2 to 5 give almost identical performance. Increasing _m too much actu- ally 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 as the 70 and 84) may start with a _m of 2 or 3. On the other hand, the _n value is moderately important. It should 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 _m_k_f_s does by default, based on the geometry informa- tion in the disk label.) These numbers determine the layout of the free list that will be constructed; the proper inter- leaving 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. The default of 4096 bytes per inode is normally enough (resulting in about 2000 inodes for a 8mb root filesystem and 1000 inodes for ----------- |^ NNoottee:: 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 xxpp 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). TThhiiss iiss nnoo lloonnggeerr nneeeeddeedd. All geometry and partition information is obtained from the disklabel created in step 2. We also used to give tables of mm and nn values for various disks, which are now purposely omit- ted. 17 March 1998 Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 15 the 4mb distribution ``generic'' root filesystem). If more inodes are desired then a lower value (perhaps 3072) should be specified when prompted for the number of bytes per inode. Then run the standalone version of the _m_k_f_s (8) pro- gram. The values in square brackets at the size prompt is the default from the disklabel. Simply hit a return to accept the default. _m_k_f_s will allow you to create 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 _t_p and _d_k and the size determined above for _s_i_z_e: ::_t_p(0,2) (_m_k_f_s is tape file 2) BBoooott:: bboooottddeevv==00nnnnnnnn bboooottccssrr==00mmmmmmmmmmmm MMkkffss ffiillee ssyysstteemm:: _d_k(0,0) (root is the first file system on drive 0) ffiillee ssyysstteemm ssiizzee:: [NNNN] _s_i_z_e (count of 1024 byte blocks in root) bbyytteess ppeerr iinnooddee:: [4096] _b_y_t_e_s (number of bytes per inode) iinntteerrlleeaavviinngg ffaaccttoorr ((mm,, 22 ddeeffaauulltt)):: _m (interleaving, see above) iinntteerrlleeaavviinngg mmoodduulluuss ((nn,, 112277 ddeeffaauulltt)):: _n (interleaving, see above) iissiizzee == XXXX (count of inodes in root file system) mm//nn == _m _n (interleave parameters) EExxiitt ccaalllleedd _n_nBBoooott :: (back at tape boot level) The number nnnnnnnn is the device number of the device (high byte is the major device number and the low byte is the unit number). The mmmmmmmmmmmm number is the CSR of the device. This information is mainly used as a reminder and diagnos- tic/testing purposes. You now have an empty UNIX root file system. 22..11..44.. SStteepp 44:: rreessttoorriinngg tthhee rroooott ffiillee ssyysstteemm To restore the root file system onto it, type 17 March 1998 setup.2.11 - 16Installing and Operating 2.11BSD on the PDP-11 ::_t_p(0,3) (_r_e_s_t_o_r is tape file 3) BBoooott:: bboooottddeevv==00nnnnnnnn bboooottccssrr==00mmmmmmmmmmmm RReessttoorr TTaappee?? _t_p(0,5) (root _d_u_m_p is tape file 5) DDiisskk?? _d_k(0,0) (into root file system) LLaasstt cchhaannccee bbeeffoorree ssccrriibbbblliinngg oonn ddiisskk.. (type a carriage return to start) ""EEnndd ooff ttaappee"" (appears on same line as message above) EExxiitt ccaalllleedd _n_nBBoooott :: (back at tape boot level) This takes about 8 minutes with a TZ30 on a 11/93 and about 15 minutes using a TK50 on a 11/73. If you wish, you may use the _i_c_h_e_c_k program on the tape, _t_p(0,4), to check the consistency of the file system you have just installed. This has rarely been useful and is mostly for the voyeuristic. 22..11..55.. SStteepp 55:: bboooottiinngg UUNNIIXX You are now ready to boot from disk. Type: ::_d_k(0,0)unix (bring in unix from the root system) BBoooott:: bboooottddeevv==00nnnnnnnn bboooottccssrr==00mmmmmmmmmmmm The standalone boot program will then load unix from the root file system you just created, and the system should boot: 22..1111BBSSDD BBSSDD UUNNIIXX ##11:: SSaatt JJuull 44 0011::3333::0033 PPDDTT 11999922 rroooott@@wwlloonneexx..iiiippoo..ggtteeggsscc..ccoomm:://uussrr//ssrrcc//ssyyss//GGEENNEERRIICC pphhyyss mmeemm == _?_?_? aavvaaiill mmeemm == _?_?_? uusseerr mmeemm == _?_?_? ccoonnffiigguurree ssyysstteemm _._._. _i_n_f_o_r_m_a_t_i_o_n _a_b_o_u_t _a_v_a_i_l_a_b_l_e _d_e_v_i_c_e_s _._._. (Information about various devices will print; most of them will probably not be found until the addresses are set below.) eerraassee==^^??,, kkiillll==^^UU,, iinnttrr==^^CC ## UNIX itself then runs for the first time and begins by printing out a banner identifying the release and version of the system that is in use and the date that it was compiled. Next the _m_e_m messages give the amount of real (physi- cal) memory, the amount of memory left over after the system 17 March 1998 Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 17 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 _a_u_t_o_c_o_n_f_i_g(8) program. Most of this is not important for the moment, but later the device table, _/_e_t_c_/_d_t_a_b, 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. This message 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 characters. UNIX is now running single user on the installed root file system, and the `UNIX Programmer's Manual' 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, whose login name is ``root''. The disk with the new root file system on it will not be bootable directly until the block 0 bootstrap program for your disk has been installed. There are copies of the boot- straps in /mdec. Use _d_d(1) to copy the right boot block onto block 0 of the disk. ## dd if=/mdec/_b_o_o_t of=/dev/r_d_k0a count=1 Block zero bootstraps and the devices they support are: boot driver devices ------------------------------------------------------------------------- hkuboot hk RK06/07 rauboot ra All RA, RD, RZ, RX (except RX01,02) and RC25 drives rkuboot rk RK05 rluboot rl RL01/02 si95uboot si SI 9500, CDC 9766 dvhpuboot xp Diva Comp V, Ampex 9300 hpuboot xp RP04/05/06 rm03uboot xp RM03 rm05uboot xp RM05 or SI 9500, CDC 9766 si51uboot xp SI 6100, Fujitsu Eagle 2351A si94uboot xp Emulex SC01B/SC03B or SI 9400, Fujitsu 160 NNOOTTEE:: If none of the above are correct (most likely with a SMD drive with differing geometry) then you will have to use a tape/floppy boot proceedure rather than a sector 0 boot- block. This can be fixed by creating a customized sector 0 17 March 1998 setup.2.11 - 18Installing and Operating 2.11BSD on the PDP-11 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 in turn load /boot. //bboooott will print on the console: _n_nBBoooott ffrroomm _d_k((_c_t_l_r,,_u_n_i_t,,_p_a_r_t)) aatt _c_s_r : The bootblock automatically loads and runs /_b_o_o_t for you; if /_b_o_o_t is not found, the system will hang/loop forever. 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 /_b_o_o_t will load _d_k(0,0)unix by default if a carriage return is typed at the :: prompt. NNOOTTEE:: NONE the primary bootstraps have a prompt or alternate program name capability because of space consider- ations. No diagnostic message results if the file cannot be found. 22..11..66.. SStteepp 66:: sseettttiinngg uupp tthhee //uussrr ffiillee ssyysstteemm First set a shell variable to the name of your disk, so the commands used later will work regardless of the 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 disk configura- tion 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 2255 Megabytes in size (this is just barely enough for the system binaries and such and leaves no room for the system source.)|^ ----------- |^ NNoottee:: 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 17 March 1998 Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 19 In the command below _p_a_r_t is the partition name (a-h) for the partition which will hold /usr. nnaammee==$${{ddiisskk}}00$${{ppaarrtt}} Next, find the tape you have in the following table and exe- cute the commands in the right hand portion of the table: DEC TM02/03, TE16/TU45/TU77 ## cd /dev; rm *mt*; ./MAKEDEV ht0; sync DEC TS11, TK25/TU80/TS05 ## cd /dev; rm *mt*; ./MAKEDEV ts0; sync DEC TM11, TU10/TE10/TS03 ## cd /dev; rm *mt*; ./MAKEDEV tm0; sync DEC 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 _y_y_m_m_d_d_h_h_m_m (set date, see _d_a_t_e(1)) .... ## passwd root (set password for super-user) NNeeww ppaasssswwoorrdd:: (password will not echo) RReettyyppee nneeww ppaasssswwoorrdd:: ## hostname _m_y_s_i_t_e_n_a_m_e (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 the TK50 and TZ30 which are mmuucchh slower) The data on the seventh tape file has now been extracted. All that remains on the first tape is a small archive con- taining 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 necessary to 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 ). ----------- partition should have been created for _/_u_s_r. If this was not done then it may be easier to per- form step 2 now than to use the more complex _d_i_s_k_l_a_b_e_l(8) program and _e_d(1). 17 March 1998 setup.2.11 - 20Installing 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 system by doing ## fsck /dev/r${name} The output from _f_s_c_k should look something like: **** //ddeevv//rr_x_x00gg FFiillee SSyysstteemm:: //uussrr NNEEEEDD SSCCRRAATTCCHH FFIILLEE ((117799 BBLLKKSS)) EENNTTEERR FFIILLEENNAAMMEE:: //ttmmpp//xxxxxx **** LLaasstt MMoouunntteedd oonn //uussrr **** PPhhaassee 11 -- CChheecckk BBlloocckkss aanndd SSiizzeess **** PPhhaassee 22 -- CChheecckk PPaatthhnnaammeess **** PPhhaassee 33 -- CChheecckk CCoonnnneeccttiivviittyy **** PPhhaassee 44 -- CChheecckk RReeffeerreennccee CCoouunnttss **** PPhhaassee 55 -- CChheecckk FFrreeee LLiisstt 667711 ffiilleess,, 33449977 uusseedd,, 113377006677 ffrreeee If there are inconsistencies in the file system, you may be prompted to apply corrective action; see the document describing _f_s_c_k for information. To use the /usr file system, you should now remount it by saying ## mount /dev/${name} /usr 22..11..77.. SStteepp 77:: eexxttrraaccttiinngg rreemmaaiinniinngg ssoouurrccee ffrroomm tthhee sseeccoonndd ttaappee You can then extract the source code for the commands from the second distribution tape|^ (with the exception of RK07's, RM03's, and RD52's and other small disks this will fit in the /usr file system): ----------- |^ On the TK50 the remaining source is the 9th file on the cartridge. 17 March 1998 Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 21 ## 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 and use the mmtt command to skip files, then retry the ttaarr command. 22..22.. AAddddiittiioonnaall ccoonnvveerrssiioonn iinnffoorrmmaattiioonn After setting up the new 2.11BSD filesystems, you may restore the user files that were saved on tape before begin- ning the conversion. Note that the 2.11BSD _r_e_s_t_o_r program does its work by accessing the raw file system device and depositing inodes in the appropriate locations on disk. This means that file system dumps might not restore cor- rectly if the characteristics of the file system have changed (eg. if you're restoring 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: ## restor r /dev/rxp1e If _t_a_r images were written instead of doing a dump, you should be sure to use the `p' option when reading the files back. No matter how you restore a file system, be sure and check its integrity with _f_s_c_k when the job is complete. _t_a_r tapes are preferred (when possible) because the inode allocation is performed by the kernel rather than the _r_e_s_t_o_r(8) program. This has the benefit of allocating inodes sequentially starting from the beginning of the inode portion of the filesystem rather than preserving the frag- mented/randomized order of the old filesystem. 17 March 1998 setup.2.11 - 22Installing and Operating 2.11BSD on the PDP-11 33.. UUPPGGRRAADDIINNGG AANN EEXXIISSTTIINNGG SSYYSSTTEEMM Begin by reading the document ``Changes to the System in 2.11BSD'' to get an idea of how the system changes will affect your local modifications. If you have local device drivers, see the file _/_s_y_s_/_O_T_H_E_R_S_/_R_E_A_D_M_E for hints on how to integrate your drivers into 2.11BSD. The only upgrade path to 2.11BSD is to do a full boot- strap as described in Chapter 2. As always, full backups of the existing system should be made to guard against errors or failures. NNOOTTEE:: The old filesystems can not be mounted by the new kernel. If you must access old discs or filesys- tems, there is a version of _d_u_m_p(8) in /usr/src/old/dump which can be used with the rraaww disc to dump old filesystems. The archive file format has changed, the 4.3BSD _a_r(5) format is now used. Local archives will have to be con- verted by the _/_u_s_r_/_o_l_d_/_a_r_c_v program. 33..11.. FFiilleess ttoo ssaavvee The following list enumerates the standard set of files you will want to save and suggests directories in 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 almost certainly 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 _t_a_r image of (at a minimum) the following files before the new file systems are created. 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 _r_e_s_t_o_r(8) program can read and convert old _d_u_m_p(8) tapes. 17 March 1998 Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 23 /.cshrc |^ root csh startup script /.login |^ root csh login script /.profile |^ root sh startup script /.rhosts |^ 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 |^ disk configuration data /etc/ftpusers |^ for local additions /etc/gateways |^ routing daemon database /etc/gettytab |^ getty database /etc/group |^ group data base /etc/hosts |^ for local host information /etc/hosts.dir * must be rebuilt with mkhosts /etc/hosts.pag * must be rebuilt with mkhosts /etc/hosts.equiv |^ for local host equivalence information /etc/networks |^ 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 |^ 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 |^ auto-dialer configuration /etc/services |= for local additions /etc/syslog.conf |^ system logger configuration /etc/securettys * for restricted list of ttys where root can log in /etc/ttys |^ 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 |^ for local changes /usr/include/* |= for local additions /etc/aliases |^ mail forwarding data base /etc/crontab |^ cron daemon data base /usr/share/font/* |= for locally developed font libraries /usr/lib/lib*.a |^ for local libraries /usr/share/lint/* |= for locally developed lint libraries /etc/sendmail.cf |^ 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/* |^ for local uucp configuration files /usr/man/manl * for manual pages for locally developed programs /usr/msgs |^ for current msgs /usr/spool/* |^ for current mail, news, uucp files, etc. /usr/src/local |^ for source for locally developed programs /sys/conf/HOST |^ configuration file for your machine /sys/conf/files.HOST |^ list of special files in your kernel /*/quotas * file system quota files 17 March 1998 setup.2.11 - 24Installing and Operating 2.11BSD on the PDP-11 |^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. 33..11..11.. IInnssttaalllliinngg 22..1111BBSSDD The next step is to build a working 2.11BSD system. This can be done by following the steps in section 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 customized for your configuration. If you have any local device drivers, they will have to be incorporated into the new kernel. See sec- tion 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 changed dramatically. 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 modify an existing one. 33..22.. MMeerrggiinngg yyoouurr ffiilleess ffrroomm eeaarrlliieerr PPDDPP--1111 UUNNIIXX ssyysstteemmss iinnttoo 22..1111BBSSDD When your system is booting reliably and you have the 2.11BSD root and /usr file systems fully installed 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 _t_a_r 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 configu- ration files should be very simple. In general very 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 previous ver- sions 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 _/_e_t_c_/_t_t_y_s and _/_e_t_c_/_t_t_y_t_y_p_e to administer which terminals should have login processes attached to them and what the types of terminals those were. 17 March 1998 Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 25 Under 2.11BSD /etc/ttytype has disappeared entirely, its functions subsumed by /etc/ttys along with several new func- tions. 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 point since 2.11BSD is nearly iden- tical 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 system you 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 in previous 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 groups that are needed by the system as distributed are: name number ------------------ wheel 0 daemon 1 kmem 2 sys 3 tty 4 operator 5 staff 10 bin 20 Only users in the ``wheel'' group are permitted to _s_u 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, _/_d_e_v_/_k_m_e_m and _/_d_e_v_/_m_e_m, are made readable only by group ``kmem''. Stan- dard 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 legiti- mately have access to write on user's terminals such as _t_a_l_k and _w_r_i_t_e now run set-group-id to ``tty''. The ``operator'' group controls access to disks. By default, disks are read- able by group ``operator'', so that programs such as _d_f can access the file system information without being set-user-id to ``root''. 17 March 1998 setup.2.11 - 26Installing and Operating 2.11BSD on the PDP-11 Several new users have also been added to the group of ``well-known'' users in /etc/passwd. The current list is: name number ------------------ root 0 daemon 1 operator 2 uucp 66 nobody 32767 The ``daemon'' user is used for daemon processes that do not need root privileges. The ``operator'' user-id is used as an account for dumpers so that they can log in without hav- ing the root password. By placing them in the ``operator'' group, they can get read access to the disks. The ``uucp'' login has existed long before 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 the shadow password file. Only the steps to convert /etc/passwd are given here, see the various man pages for _c_h_p_a_s_s(1), _v_i_p_w(8), _m_k_p_a_s_s_w_d(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 functions are 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 particular that _i_f_c_o_n_f_i_g has had many changes, and that host names are now fully specified as domain-style names (e.g, boris.Oswego.EDU). The C library and system binaries on the distribution tape are compiled with versions of _g_e_t_h_o_s_t_b_y_n_a_m_e and _g_e_t_h_- _o_s_t_b_y_a_d_d_r which use ndbm host table lookup routines instead 17 March 1998 Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 27 of the name server. You must run _m_k_h_o_s_t_s(8) to create the _n_d_b_m host table database from _/_e_t_c_/_h_o_s_t_s. For 2.11BSD the _m_k_h_o_s_t_s program has been enhanced to support multiple addresses per host with order being preserved (the order in which the multiple addresses appear in _/_e_t_c_/_h_o_s_t_s for the same host is the same order the addresses will be returned to the caller of _g_e_t_h_o_s_t_b_y_n_a_m_e). There is a version of the nameserver which runs under 2.11BSD. However in addition to having a voracious appetite for memory there are memory leaks which cause _n_a_m_e_d(8) to crash after running for an extended period. Restarting _n_a_m_e_d(8) nightly from _c_r_o_n 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 host table, 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).|^ The format of /etc/ttys is the same as it was under 2.10BSD. It includes the terminal type and security options that were previously in /etc/ttytype and /etc/securettys. _s_y_s_l_o_g is the 4.4BSD-Lite version now. See _s_y_s_l_o_g(3) and _s_y_s_l_o_g_d(8) for details. They are used by many 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 _h_o_s_t_s files are not desired then the best alternative is to use the _r_e_s_o_l_v_e_r(5) routines and use the nameserver on a remote larger machine. The _r_e_s_o_l_v_e_r(5) routines are known to work. The spooling directories saved on tape may be restored in their eventual resting places without too much concern. Be sure to use the ``p'' option to _t_a_r 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 _a_t now runs set-user-id ``dae- mon'' instead of root. Also, the uucp directory no longer ----------- |^ 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. 17 March 1998 setup.2.11 - 28Installing and Operating 2.11BSD on the PDP-11 needs to be publicly writable, as _t_i_p reverts 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 eventual resting place. Refer to the documentation and source code before arbitrarily overwriting a file. 33..33.. HHiinnttss oonn ccoonnvveerrttiinngg ffrroomm pprreevviioouuss PPDDPP--1111 UUNNIIXX ssyysstteemmss ttoo 22..1111BBSSDD This section summarizes some of the significant changes in 2.11BSD from 2.10.1BSD. The installation 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; see chapter 5 for information on setting up the network. Old core files will not be intelligible by the current debuggers because of numerous changes to the user 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 _n_a_m_e_i argument encapsulation 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 reinstall the direc- tory _/_u_s_r_/_s_r_c_/_s_h_a_r_e_/_z_o_n_e_i_n_f_o. Read through the Makefile first, if you're not located on the West Coast you will have to change it. This directory is an addition since 4.3BSD, and is intended to solve the 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 namei cache. The di_addr member of the on disk inode structure is now an array of type ddaaddddrr__tt instead of cchhaarr. 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 an unsigned 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 filesystem. Given the typical size of discs used 17 March 1998 Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 29 with 2.11BSD the limit on the number of inodes per filesys- tem 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 _p_s after booting a new kernel, and before going multiuser, you must initialize its name list database by running _p_s _-_U. 33..44.. HHiinnttss oonn ppoossssiibbllee pprroobblleemmss uuppggrraaddiinngg ffrroomm tthhee 22..1100..11BBSSDD 33..44..11.. NNeeww uuttmmpp UUTT__NNAAMMEESSIIZZEE.. UUTT__NNAAMMEESSIIZZEE in >_