home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / unixen.tar / unixen / PDP-11 / Documentation / PUPS_Html / Setup / 2.11bsd_setup.txt < prev    next >
Encoding:
Text File  |  2000-05-25  |  189.2 KB  |  5,215 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.        IInnssttaalllliinngg aanndd OOppeerraattiinngg 22..1111BBSSDD oonn tthhee PPDDPP--1111
  11.                        JJuunnee 1133,, 11999955
  12.  
  13.                        _S_t_e_v_e_n _S_c_h_u_l_t_z
  14.                    GTE Government Systems
  15.                     112 Lakeview Canyon
  16.                    Thousand Oaks CA 91362
  17.                   sms@wlv.iipo.gtegsc.com
  18.  
  19.  
  20.                           _A_B_S_T_R_A_C_T
  21.  
  22.  
  23.  
  24.           This  document  contains instructions for the
  25.      installation and operation of the 2.11BSD  PDP-11|^
  26.      UNIX|= system.
  27.  
  28.           It   discusses   procedures   for  installing
  29.      2.11BSD UNIX on a PDP-11,  including  explanations
  30.      of how to lay out file systems on available disks,
  31.      how to set up terminal lines  and  user  accounts,
  32.      how  to  do  system-specific tailoring, and how to
  33.      install and configure the  networking  facilities.
  34.      Finally,  the  document  details  system operation
  35.      procedures: shutdown and startup,  hardware  error
  36.      reporting and diagnosis, file system backup proce-
  37.      dures, resource control,  performance  monitoring,
  38.      and  procedures  for  recompiling and reinstalling
  39.      system software.
  40.  
  41.           The  ``bugs''  address  supplied  with   this
  42.      release will work for some unknown period of time;
  43.      make sure the ``Index:'' line of  the  bug  report
  44.      indicates  that  the  release is ``2.11BSD''.  See
  45.      the _s_e_n_d_b_u_g(8)  program  for  more  details.   All
  46.      fixes that I make, or that are sent to me, will be
  47.      posted   on   _U_S_E_N_E_T,   in    the    news    group
  48.      ``comp.bugs.2bsd''.
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57. -----------
  58. |^ DEC,  PDP-11,  VAX, IDC, SBI, UNIBUS and MASSBUS
  59.   are trademarks of Digital Equipment Corporation.
  60. |= UNIX is a Trademark of Bell Laboratories.
  61.  
  62.  
  63.  
  64.                         17 March 1998
  65.  
  66.  
  67.  
  68.  
  69.  
  70. setup.2.11 - 2Installing and Operating 2.11BSD on the PDP-11
  71.  
  72.  
  73.                       11.. IINNTTRROODDUUCCTTIIOONN
  74.  
  75.  
  76.  
  77.      This  document explains how to install 2.11BSD UNIX for
  78. the PDP-11 on your system.  This document has  been  revised
  79. several  times  since  the  first  release  of 2.11BSD, most
  80. recently in July 1995 to reflect the addition of disk labels
  81. to the system.  The format of the bootable tape has changed.
  82. There is now a standalone ddiisskkllaabbeell program present.   While
  83. the  system call interface is the same as that of 2.10.1BSD,
  84. a full bootstrap from  the  distribution  tape  is  required
  85. because  the  filesystem  has  changed  to  allow file names
  86. longer than 14 characters.  Also, the 3  byte  block  number
  87. packing  scheme  used  by  earlier  versions of UNIX for the
  88. PDP-11 has been eliminated.  Block numbers are always 4 byte
  89. lloonnggss now.
  90.  
  91.      The  procedure  for performing a full bootstrap is out-
  92. lined in chapter 2.  The process  includes  copying  a  root
  93. file  system from the distribution tape into a new file sys-
  94. tem, booting that root  filesystem,  and  then  reading  the
  95. remainder  of  the  system  binaries  and  sources  from the
  96. archives on the tapes.
  97.  
  98.      As 2.11BSD is not compatible at  the  filesystem  level
  99. with  previous  versions  of UNIX on the PDP-11, any upgrade
  100. procedure is essentially a full bootstrap.  There is a  lim-
  101. ited  ability  to  access  old filesystems which may be used
  102. after the system partitions have been  loaded  from  a  full
  103. bootstrap.  It is desirable to recompile most local software
  104. after the conversion, as there are changes  and  performance
  105. improvements in the standard libraries.
  106.  
  107.      Binaries  from  2.10.1BSD which do not read directories
  108. or inode structures may be used but should be recompiled  to
  109. pick  up  changes in the standard libraries.  Note too, that
  110. the portable ASCII format of _a_r(1) archives is now in  place
  111. -  any  local  archive files will have to be converted using
  112. _/_u_s_r_/_o_l_d_/_a_r_c_v.
  113.  
  114. 11..  HHaarrddwwaarree ssuuppppoorrtteedd
  115.  
  116.      This distribution can be booted on a PDP-11 with 1Mb of
  117. memory or more|^, separate I&D, and with any of the following
  118. disks:
  119.  
  120.  
  121.  
  122. -----------
  123. |^ 2.11BSD  would  probably only require a moderate
  124.   amount of squeezing to fit on machines with less
  125.   memory,  but it would also be very unhappy about
  126.   the prospect.
  127.  
  128.  
  129.  
  130.                         17 March 1998
  131.  
  132.  
  133.  
  134.  
  135.  
  136. Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 3
  137.  
  138.  
  139.      RK06, RK07
  140.      Any MSCP disk, including but not limited to: RD53, RD54, RA81, RZ2x
  141.      RM03, RM05
  142.      RP04, RP05, RP06
  143.      Many other SMD disks, for example: CDC 9766, Fuji 160, Fuji Eagle
  144.  
  145.  
  146.  
  147.      Other  disks are supported (RX23, RX33, RX50, RD51) but
  148. are not large enough to hold a root filesystem plus  a  swap
  149. partition.   The  old  restriction  of  using RL02 drives in
  150. pairs has been lifted.  It is now possible to define a  root
  151. ('a') partition and a swap partition ('b') and load at least
  152. the root filesystem to a single RL02.  Discs which  are  too
  153. small  to hold even a root filesystem (floppies for example)
  154. may be used as data disks or as standalone boot  media,  but
  155. are not useable for loading the distribution.  Others, while
  156. listed above, are not very well suited to loading  the  dis-
  157. tribution.  The RK06/07 drives are hard pressed to even hold
  158. the system binaries, much less the sources.
  159.  
  160.      The tape drives supported by this distribution are:
  161.  
  162.  
  163.      TS11, TU80, TK25
  164.      TM11, AVIV 6250/1600
  165.      TE16, TU45, TU77
  166.      TK50, TU81, TU81+, TZ30
  167.  
  168.  
  169. Although 2.11BSD contains a kernel level floating point sim-
  170. ulator, it has never been tested.  In fact it would not even
  171. compile/assemble without  errors!   That  problem  has  been
  172. fixed  but  it  is  still  not  know if the simulator works,
  173. KDJ-11 based systems have builtin floating point so the sim-
  174. ulator  can  not  be tested.  At the release of 2.10BSD some
  175. thought was given to the possibility of lifting the separate
  176. I&D  restriction, but that thought has languished.  The work
  177. will never be done.  As time passes more and  more  programs
  178. have become almost too large even with separate I&D.
  179.  
  180. 22..  DDiissttrriibbuuttiioonn ffoorrmmaatt
  181.  
  182.      The basic distribution contains the following items:
  183.  
  184.      (2)   1600bpi 2400' magnetic tapes, or
  185.      (2)   TK25 tape cartridges, or
  186.      (1)   TK50 tape cartridge, and
  187.      (1)   Hardcopy of this document,
  188.      (1)   Hardcopy of the _C_h_a_n_g_e_s _i_n _2_._1_1_B_S_D document,
  189.      (1)   Hardcopy of the 2.11BSD /README and /VERSION files, and
  190.      (1)   Hardcopy of manual pages from sections 4, and 8.
  191.  
  192. Installation  on  any  machine  requires a tape unit.  Since
  193.  
  194.  
  195.  
  196.                         17 March 1998
  197.  
  198.  
  199.  
  200.  
  201.  
  202. setup.2.11 - 4Installing and Operating 2.11BSD on the PDP-11
  203.  
  204.  
  205. certain standard PDP-11  packages  do  not  include  a  tape
  206. drive,  this  means  one must either borrow one from another
  207. PDP-11 system or one must be purchased separately.
  208.  
  209.      TThhee ddiissttrriibbuuttiioonn  ddooeess  nnoott  ffiitt  oonn  sseevveerraall  ssttaannddaarrdd
  210. PPDDPP--1111  ccoonnffiigguurraattiioonnss  tthhaatt  ccoonnttaaiinn  oonnllyy ssmmaallll ddiisskkss.  If
  211. your hardware configuration does not  provide  at  lleeaasstt  7755
  212. Megabytes  of disk space you can still install the distribu-
  213. tion, but you will probably have to operate  without  source
  214. for  the  user  level commands and, possibly, the source for
  215. the operating system.
  216.  
  217.      The root file system now occupies aa mmiinniimmuumm ooff 44MMbb.  If
  218. at all possible a larger, 6 or 7Mb, root partition should be
  219. defined when using the standalone ddiisskkllaabbeell program.
  220.  
  221.      If you have the facilities, it is a good idea  to  copy
  222. the  magnetic  tape(s)  in  the  distribution  kit  to guard
  223. against disaster.  The tapes are 9-track 1600 BPI,  TK50  or
  224. TK25  cartridges and contain some 512-byte records, followed
  225. by some  1024-byte  records,  followed  by  many  10240-byte
  226. records.   There are interspersed tape marks; end-of-tape is
  227. signaled by a double end-of-file.
  228.  
  229.      The basic bootstrap material is present  in  six  short
  230. files at the beginning of the first tape.  The first file on
  231. the tape contains preliminary bootstrapping programs.   This
  232. is  followed  by  several  standalone  utilities (_d_i_s_k_l_a_b_e_l,
  233. _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
  234. of  a  root  file  system (see _d_u_m_p(8)).  Following the root
  235. file system dump is a tape archive image of //uussrr except  for
  236. //uussrr//ssrrcc  (see  _t_a_r(1)).   Finally, a tape archive of source
  237. for include files and kernel source  ends  the  first  tape.
  238. The  second  tape contains a tape archive image, also in _t_a_r
  239. format, of all the remaining source that comes with the sys-
  240. tem.
  241.  
  242.      The  entire distribution (barely) fits on a single TK50
  243. cartridge, references to the second tape should  be  treated
  244. as  being the 9th file on the TK50.  Many of the programs in
  245. /usr/src/new have been tar+compress'd in order to  keep  the
  246. distribution to a single tape.
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255. -----------
  256. |^ References of the form X(Y) mean the  subsection
  257.   named  X  in  section Y of the UNIX programmer's
  258.   manual.
  259.  
  260.  
  261.  
  262.                         17 March 1998
  263.  
  264.  
  265.  
  266.  
  267.  
  268. Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 5
  269.  
  270.  
  271. TAPE 1:
  272.  
  273. Tape file   Record size   Records|^   Contents
  274. ---------------------------------------------------------------------------------------
  275.     0            512           1     primary tape boot block
  276.                  512           1     boot block (some tape boot ROMs go for this copy)
  277.                  512          69     standalone bboooott program
  278.     1           1024          37     standalone ddiisskkllaabbeell
  279.     2           1024          33     standalone mmkkffss(8)
  280.     3           1024          35     standalone rreessttoorr(8)
  281.     4           1024          32     standalone iicchheecckk(8)
  282.     5          10240         285     _d_u_m_p of ``root'' file system
  283.     6          10240        3368     _t_a_r dump of /usr, excepting /usr/src
  284.     7          10240         519     _t_a_r dump of /usr/src/include and /usr/src/sys
  285.  
  286.  
  287. TAPE 2:
  288.  
  289. Tape file   Record size   Records|^   Contents
  290. -------------------------------------------------------------------------------------
  291.     0          10240        4092     _t_a_r dump of /usr/src, excepting include and sys
  292.  
  293.  
  294.  
  295. 33..  UUNNIIXX ddeevviiccee nnaammiinngg
  296.  
  297.      UNIX has a set of names for devices which are different
  298. from the DEC names for the devices.
  299.  
  300. The disk and tape names used by the bootstrap and the system
  301. are:
  302.  
  303.  
  304.      RK06, RK07 disks                  hk
  305.      RL01, RL02 disks                  rl
  306.      RK05                              rk
  307.      MSCP disks                        ra
  308.      RM02/03/05                        xp
  309.      RP04/05/06                        xp
  310.      SMD disks                         xp
  311.      TM02/03, TE16, TU45, TU77 tapes   ht
  312.      TE10/TM11 tapes                   tm
  313.      TS11 tapes                        ts
  314.      TMSCP tapes                       tms
  315.  
  316.  
  317. Additionally,  the  following  non-DEC devices are also sup-
  318. ported:
  319.  
  320.  
  321. -----------
  322. |^ The  number  of  records  in  each tape file are
  323.   approximate and do not necessarily correspond to
  324.   the actual number on the tape.
  325.  
  326.  
  327.  
  328.                         17 March 1998
  329.  
  330.  
  331.  
  332.  
  333.  
  334. setup.2.11 - 6Installing and Operating 2.11BSD on the PDP-11
  335.  
  336.  
  337.      SI 9500, CDC 9766                     si
  338.      SI, CDC 9775                          xp
  339.      SI6100, Fujitsu Eagle 2351A           xp
  340.      Emulex SC01B or SI9400, Fujitsu 160   xp
  341.      Emulex SC-21, xp
  342.  
  343.  
  344. The generic SMD disk driver, _x_p, will handle most  types  of
  345. SMD  disks  on one or more controllers (even different types
  346. on the same controller).  The xxpp driver handles RM03,  RM05,
  347. RP04,  RP05  and   RP06  disks on DEC, Emulex, Dilog, and SI
  348. UNIBUS or MASSBUS controllers.
  349.  
  350.      MSCP disks and TMSCP tapes include SCSI drives attached
  351. to  the  RQZX1  controller on the PDP-11/93.  MSCP disks and
  352. TMSCP tapes also include SCSI drives attached to the  Emulex
  353. UC07  or  UC08 Q-BUS controllers on Q-bus systems as well as
  354. the UC17 and UC18 controllers on UNIBUS systems.
  355.  
  356.      The standalone system used to bootstrap the  full  UNIX
  357. system uses device names of the form:
  358.  
  359.      _x_x(_c,_y,_z)
  360.  
  361. where  _x_x is one of hhkk, hhtt, rrkk, rrll, ttmm, ttss, ttmmss, or xxpp.  The
  362. value _c specifies the controller number (0-3).   This  value
  363. is  usually not explicitly given.  The default is 0 if boot-
  364. ing from the standard (first) CSR of a device.
  365.  
  366.      Example: if there are two MSCP controllers in the  sys-
  367. tem  addressed  as  0172150 and 0172154 respectively booting
  368. from the controller at 172154 requires that _c be given as 1.
  369. Booting  from  the  standard CSR of 0172150 would be done by
  370. specifying _c as 0 or omitting the _c parameter.   bboooott  auto-
  371. matically detects if the first (standard) CSR is being used.
  372. All future references will ignore the _c parameter by  assum-
  373. ing the default value.
  374.  
  375.      The  value _y specifies the device or drive unit to use.
  376. The _z value is interpreted differently for tapes and  disks:
  377. for  disks it is a partition number (0 thru 7) corresponding
  378. to partitions 'a' thru 'h' respectively.  This should always
  379. be  zero  unless  you  rreeaallllyy  know what you are doing.  The
  380. ability to load a kernel from the swap area is  planned  for
  381. the  future  but does not presently exist.  For tapes _z is a
  382. file number on the tape.|^
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.                         17 March 1998
  395.  
  396.  
  397.  
  398.  
  399.  
  400. Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 7
  401.  
  402.  
  403.      In all simple cases, a drive with unit number 0 (deter-
  404. mined  either  by  a unit plug on the front of the drive, or
  405. jumper settings on the drive or controller) will  be  called
  406. unit 0 in its UNIX file name.  file name.  If there are mul-
  407. tiple controllers, the drive unit numbers will  normally  be
  408. counted  within  each  controller.   Thus  drives on the the
  409. first controller are numbered 0 thru 7  and  drives  on  the
  410. second  controller  are  numbered  0 thru 7 on controller 1.
  411. Returning to the discussion of the standalone system, recall
  412. that tapes also took two integer parameters.  In the case of
  413. a TE16/TU tape formatter on drive 0, the files on  the  tape
  414. have  names  ``ht(0,0)'',  ``ht(0,1)'',  etc.  Here ``file''
  415. means a tape file containing a single data stream  separated
  416. by  a  single  tape  mark.  The distribution tapes have data
  417. structures in the tape files and though the first tape  con-
  418. tains  only  7 tape files, it contains several thousand UNIX
  419. files.
  420.  
  421.      Each UNIX physical disk is divided into 8 logical  disk
  422. partitions,  each of which may occupy any consecutive cylin-
  423. der range on the physical device.  While overlapping  parti-
  424. tions  are  allowed they are not a good idea, being an acci-
  425. dent waiting to happen (making one filesystem  will  destroy
  426. the  other overlapping filesystems).  The cylinders occupied
  427. by the 8 partitions for each drive type are specified by the
  428. disk label read from the disk.
  429.  
  430. -----------
  431. |^ NNoottee:: that while a tape file consists of a  sin-
  432.   gle  data  stream, the distribution tape(s) have
  433.   data structures in these  files.   Although  the
  434.   first tape contains only 8 tape files, they com-
  435.   prise several thousand UNIX files.
  436.   NNoottee:: The standalone tape drive unit  number  is
  437.   specially  encoded  to  specify both unit number
  438.   and tape density (BPI).   Most  tape  subsystems
  439.   either  automatically  adjust to tape density or
  440.   have switches on the drives to force the density
  441.   to  a  particular  setting,  but for those which
  442.   don't the following  density  select  mechanisms
  443.   may  be  necessary.   The  ttss  only  operates at
  444.   1600BPI, so there is  no  special  unit  density
  445.   encoding.   The hhtt will operate at either 800BPI
  446.   or 1600BPI.  Units 0 through 3 corresponding  to
  447.   800BPI,  and  Units 4 through 7 corresponding to
  448.   1600BPI on drives 0 through 3 respectively.  The
  449.   standard  DEC ttmm only supports 800BPI (and hence
  450.   can't be  used  with  the  2.11BSD  distribution
  451.   tape), but several widely used ttmm emulators sup-
  452.   port 1600BPI and even 6250BPI.  Units 0  through
  453.   3  corresponding  to  800BPI,  Units 4 through 7
  454.   corresponding to 1600BPI, and Units 8 through 11
  455.   corresponding  to  6250BPI on drives 0 through 3
  456.   respectively.
  457.  
  458.  
  459.  
  460.                         17 March 1998
  461.  
  462.  
  463.  
  464.  
  465.  
  466. setup.2.11 - 8Installing and Operating 2.11BSD on the PDP-11
  467.  
  468.  
  469.      If  no  label  exists the disk will not be bootable and
  470. while the kernel attempts not to damage unlabeled disks  (by
  471. swapping  to  or  doing  a  crash dump on a live filesystem)
  472. there is a chance that filesystem damage will  result  if  a
  473. kernel is loaded from an unlabeled disk.
  474.  
  475.      The  standalone ddiisskkllaabbeell program is used to define the
  476. partition tables.  Each partition may be used  either  as  a
  477. raw  data  area (such as a swapping area) or to store a UNIX
  478. file system.  It is mandatory for the first partition  on  a
  479. disk  to  start at sector offset 0 because the 'a' partition
  480. is used to read and write the label (which is at the  begin-
  481. ning  of the disk).  If the drive is to be used to bootstrap
  482. a UNIX system then the 'a' partition must be of type 22..1111BBSSDD
  483. (FS_V71K  in  _d_i_s_k_l_a_b_e_l_._h)  and at least 4Mb is size.  A 'b'
  484. partition of at least 2-3Mb (4Mb is a good choice  if  space
  485. is  available)  for  swapping is also needed.  If a drive is
  486. being used solely for data then that drive need not  have  a
  487. 'b'  (swap)  partition but partition 'a' must still span the
  488. first part of the disk.  The second partition is used  as  a
  489. swapping  area,  and  the  rest  of the disk is divided into
  490. spaces for additional ``mounted file systems'' by use of one
  491. or more additional partitions.
  492.  
  493.      The third ('c') logical partition of each physical disk
  494. also has a conventional  usage:  it  allows  access  to  the
  495. entire  physical device, including the bad sector forwarding
  496. information recorded at the end of the disk (one track  plus
  497. 126  sectors).   It  is  occasionally used to store a single
  498. large file system or to access the entire pack when making a
  499. copy  of  it on another.  Care must be taken when using this
  500. partition not to overwrite the last few tracks  and  thereby
  501. destroying the bad sector information.
  502.  
  503.      Unfortunately  while  the  drivers can follow the rules
  504. 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
  505. entries  in  _/_e_t_c_/_d_i_s_k_t_a_b are translations of the old parti-
  506. tion tables which used to be embedded in the device  drivers
  507. and  are thus probably not suitable for use without editing.
  508. In some cases it may be that the 8th ('h') partition is used
  509. for  access  to  the entire disk rather than the third ('c')
  510. partition.   Caution  should  be  observed  when  using  the
  511. _n_e_w_f_s(8) and _d_i_s_k_l_a_b_e_l(8) commands.
  512.  
  513. 44..  UUNNIIXX ddeevviicceess:: bblloocckk aanndd rraaww
  514.  
  515.      UNIX  makes a distinction between ``block'' and ``raw''
  516. (character) devices.  Each disk has a block device interface
  517. where  the  system makes the device byte addressable and you
  518. can write a single byte in the middle of the disk.  The sys-
  519. tem  will read out the data from the disk sector, insert the
  520. byte you gave it and put the modified data back.  The  disks
  521. with  the names ``/dev/xx0a'', etc are block devices.  There
  522. are also raw  devices  available.   These  have  names  like
  523.  
  524.  
  525.  
  526.                         17 March 1998
  527.  
  528.  
  529.  
  530.  
  531.  
  532. Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 9
  533.  
  534.  
  535. ``/dev/rxx0a'',  the  ``r''  here standing for ``raw''.  Raw
  536. devices bypass the buffer cache and use DMA directly to/from
  537. the  program's  I/O buffers; they are normally restricted to
  538. full-sector transfers.  In the bootstrap procedures we  will
  539. often  suggest  using the raw devices, because these tend to
  540. work faster.  Raw devices are used when making new  filesys-
  541. tems,  when  checking  unmounted filesystems, or for copying
  542. quiescent filesystems.  The block devices are used to  mount
  543. file systems, or when operating on a mounted filesystem such
  544. as the root.
  545.  
  546.      You should be aware  that  it  is  sometimes  important
  547. whether  to use the character device (for efficiency) or not
  548. (because it wouldn't work, e.g. to write a  single  byte  in
  549. the  middle  of a sector).  Don't change the instructions by
  550. using the wrong type of device indiscriminately.
  551.  
  552.      The standalone ddiisskkllaabbeell program must be used to  alter
  553. the  'a'  and  'b'  partitions  of  a drive being used for a
  554. bootable system.  This is because the kernel will not permit
  555. an  open  partition  to change size or offset.  The root and
  556. and swap partitions are aallwwaayyss open when the kernel is  run-
  557. ning.
  558.  
  559.  
  560.  
  561.  
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.                         17 March 1998
  593.  
  594.  
  595.  
  596.  
  597.  
  598. setup.2.11 - 10Installing and Operating 2.11BSD on the PDP-11
  599.  
  600.  
  601.                    22.. BBOOOOTTSSTTRRAAPP PPRROOCCEEDDUURREE
  602.  
  603.  
  604.  
  605.      This  section explains the bootstrap procedure that can
  606. be used to get the kernel supplied  with  this  distribution
  607. running on your machine.  It is mandatory to do a full boot-
  608. strap since the filesystem has  changed  from  2.10.1BSD  to
  609. 2.11BSD.
  610.  
  611.      The  safest  route is to use _t_a_r(1) to dump all of your
  612. current file systems, do a full  bootstrap  of  2.11BSD  and
  613. then  restore user files from the backups.  There is also an
  614. untested version of _5_1_2_r_e_s_t_o_r(8) available for V7 sites that
  615. need to read old dump tapes.
  616.  
  617.      It  is also desirable to make a convenient copy of sys-
  618. tem configuration files for use as guides  when  setting  up
  619. the  new  system;  the  list  of  files to save from earlier
  620. PDP-11 UNIX systems, found in chapter 3, may be  used  as  a
  621. guideline.
  622.  
  623.      2.11BSD  _r_e_s_t_o_r(8)  is  able  to read and automatically
  624. convert to the new on disk directory  format  _d_u_m_p(8)  tapes
  625. made under 2.9BSD, 2.10BSD and 2.10.1BSD.
  626.  
  627. 22..11..  BBoooottiinngg ffrroomm ttaappee
  628.  
  629.      The  tape  bootstrap procedure used to create a working
  630. system involves the following major steps:
  631.  
  632. 1)   Load the tape bootstrap monitor.
  633.  
  634. 2)   Create the partition tables on the disk  using  _d_i_s_k_l_a_-
  635.      _b_e_l.
  636.  
  637. 3)   Create a UNIX ``root'' file system system on disk using
  638.      _m_k_f_s(8).
  639.  
  640. 4)   Restore the full root file system using _r_e_s_t_o_r(8).
  641.  
  642. 5)   Boot the UNIX system on the new root  file  system  and
  643.      copy  the  appropriate _s_e_c_t_o_r _0 _b_o_o_t _b_l_o_c_k to your boot
  644.      device.
  645.  
  646. 6)   Build and restore the /usr file system from  tape  with
  647.      _t_a_r(1).
  648.  
  649. 7)   Restore the include and kernel sources from tape.
  650.  
  651. 8)   Extract the remaining source from the second tape.
  652.  
  653. 9)   Tailor a version of UNIX to your specific hardware (see
  654.      section 4.2).
  655.  
  656.  
  657.  
  658.                         17 March 1998
  659.  
  660.  
  661.  
  662.  
  663.  
  664. Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 11
  665.  
  666.  
  667.      Certain of these steps are dependent on  your  hardware
  668. configuration.   If  your disks require formatting, standard
  669. DEC diagnostic utilities will have to be used, they are  not
  670. supplied on the 2.11BSD distribution tape.
  671.  
  672. 22..11..11..  SStteepp 11:: llooaaddiinngg tthhee ttaappee bboooottssttrraapp mmoonniittoorr
  673.  
  674.      To  load  the  tape  bootstrap monitor, first mount the
  675. magnetic tape on drive 0 at load point, making sure that the
  676. write  ring  is not inserted.  Then use the normal bootstrap
  677. ROM, console monitor or other bootstrap  to  boot  from  the
  678. tape.
  679.  
  680.      NOTE:  The  boot  blocks  expect the CSR of the booting
  681. controller in r0 and the unit number in  r1.   bboooott  may  be
  682. booted from any controller or unit, the earlier restrictions
  683. of controller 0 and unit 0 have been lifted.
  684.  
  685.      If no other means are available, the following code can
  686. be  keyed in and executed at (say) 0100000 to boot from a TM
  687. tape drive (the magic number 172526 is the  address  of  the
  688. TM-11  current memory address register; an adjustment may be
  689. necessary if your controller is at a nonstandard address):
  690.  
  691.  
  692.      012700   (mov $unit, r0)
  693.      000000   (normally unit 0)
  694.      012701   (mov $172526, r1)
  695.      172526
  696.      010141   (mov r1, -(r1))
  697.      012741   (mov $60003, -(r1))
  698.      060003   (if unit 1 use 060403, etc)
  699.      000777   (br .)
  700.  
  701.  
  702. A toggle-in routine which has been used with a TS tape drive
  703. (this should be entered at 01000):
  704.  
  705.  
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.  
  724.                         17 March 1998
  725.  
  726.  
  727.  
  728.  
  729.  
  730. setup.2.11 - 12Installing and Operating 2.11BSD on the PDP-11
  731.  
  732.  
  733.      012700   mov $unit,r0
  734.      000000
  735.      012701   mov $172522,r1
  736.      172522
  737.      005011   clr (r1)
  738.      105711   1b:tstb (r1)
  739.      100376   bpl 1b
  740.      012761   mov $setchr,-2(r1)
  741.      001040
  742.      177776
  743.      105711   2b:tstb (r1)
  744.      100376   bpl 2b
  745.      012761   mov $read,-2(r1)
  746.      001060
  747.      177776
  748.      000000   halt
  749.      140004   setchr: TS_ACK|TS_CVC|TS_SETCHR
  750.      001050   char
  751.      000000   high order address
  752.      000010   number of bytes
  753.      001070   char: status
  754.      000000
  755.      000016
  756.      000000
  757.      140001   read: TS_ACK|TS_CVC|TS_READ
  758.      000000   low order of address
  759.      000000   high order of address
  760.      001000   number of bytes to read
  761.      000000   status:
  762.  
  763.  
  764. When  this  is executed, the first block of the tape will be
  765. read into memory.  Halt the CPU and restart at  location  0.
  766. The  register  rr11  MMUUSSTT  be left pointing at the device _c_s_r.
  767. For the default/first TM or TS this is 0172522.  The  regis-
  768. ter rr00 MMUUSSTT contain the unit number (usually 0).
  769.  
  770.      The console should type
  771.  
  772.      _n_nBBoooott ffrroomm _x_x((_c_t_l_r,,_d_r_i_v_e,,_p_a_r_t)) aatt _c_s_r
  773.      ::
  774.  
  775. where _n_n is the CPU type on which it believes it is running.
  776. The value will be one of 23, 24, 40, 44, 45, 53, 60, 70, 73,
  777. 83,  84, 93 or 94 depending whether separate instruction and
  778. data (separate I/D) and/or a UNIBUS map are  detected.   For
  779. KDJ-11  systems  the System Maintenance Register is examined
  780. to determine the cpu type.  At present 2.11BSD runs  on  the
  781. 44,  53,  70, 73, 83, 84, 93 and 94 oonnllyy.  It must be empha-
  782. sized that 2.11BSD requires separate I/D.
  783.  
  784. _c_t_l_r is the controller number that BBoooott was loaded from.  It
  785. is 0 unless booting from a non-standard CSR.
  786.  
  787.  
  788.  
  789.  
  790.                         17 March 1998
  791.  
  792.  
  793.  
  794.  
  795.  
  796. Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 13
  797.  
  798.  
  799. _d_r_i_v_e is the drive unit number.
  800.  
  801. The  _p_a_r_t number is disk partition or tapefile number booted
  802. from.  This will always be 0 for the tape BBoooott program.
  803.  
  804. _c_s_r is an octal number telling the  CSR  of  the  controller
  805. from which BBoooott was loaded.
  806.  
  807.  
  808.      You  are now talking to the tape bootstrap monitor.  At
  809. any point in the following procedure you can return to  this
  810. section,  reload  the  tape bootstrap, and restart.  Through
  811. the rest of this section, substitute the correct  disk  type
  812. for _d_k and the tape type for _t_p.
  813.  
  814. 22..11..22..  SStteepp 22:: ccrreeaattiinngg tthhee ddiisskk llaabbeell
  815.  
  816.      The standalone _d_i_s_k_l_a_b_e_l program is then run:
  817.  
  818.  
  819.      ::_t_p(0,1)                                       (_d_i_s_k_l_a_b_e_l is tape file 1)
  820.      BBoooott:: bboooottddeevv==00nnnnnnnn bboooottccssrr==00mmmmmmmmmmmm
  821.      ddiisskkllaabbeell
  822.      DDiisskk?? _d_k(0,0)                                  (drive 0, partition 0)
  823.      d(isplay) D(efault) m(odify) w(rite) q(uit)?
  824.       ...
  825.      ::                                              (back at tape boot level)
  826.  
  827.  
  828. The _d_i_s_k_l_a_b_e_l program is meant to be fairly intuitive.  When
  829. prompted with a line of choices entering the key just before
  830. the left parenthesis selects the entry.
  831.  
  832.      If  there  is  an  existing label present on _d_k(0,0) it
  833. will be used as the default.  To have _d_i_s_k_l_a_b_e_l create a new
  834. default  based  on  its  idea of what the drive is select DD.
  835. Then enter mm to modify/edit the label.
  836.  
  837.      The MSCP driver is quite  good  at  identifying  drives
  838. because it can query the controller.  Other drivers (notably
  839. the SMD (xxpp) driver) have to deal with a much wider range of
  840. controllers  which do not all have the same capabilities for
  841. drive identification.  When dealing with SMD drives you must
  842. know  the  geometry of the drive so you can verify  and cor-
  843. rect _d_i_s_k_l_a_b_e_l's choices.
  844.  
  845.      You can however, if using non-DEC SMD controllers, make
  846. things easy for _d_i_s_k_l_a_b_e_l to determine what type of drive is
  847. being used.  If your controller offers the  choice  of  RM02
  848. emulation  you should select that choice.  The standalone xxpp
  849. driver uses RM02 as the indication that drive identification
  850. capabilities  not  offered  by  DEC controllers are present.
  851. The driver will be able to determine  the  geometry  of  the
  852. drive  in  this  case.    This  is  ooppttiioonnaall because you can
  853.  
  854.  
  855.  
  856.                         17 March 1998
  857.  
  858.  
  859.  
  860.  
  861.  
  862. setup.2.11 - 14Installing and Operating 2.11BSD on the PDP-11
  863.  
  864.  
  865. explicitly specify all of the parameters to  the  standalone
  866. _d_i_s_k_l_a_b_e_l program.
  867.  
  868.      A  full description of the standalone _d_i_s_k_l_a_b_e_l program
  869. is in Appendix B of this document.
  870.  
  871. 22..11..33..  SStteepp 33:: ccrreeaattiinngg aa UUNNIIXX ````rroooott'''' ffiillee ssyysstteemm
  872.  
  873.      Now create the root file  system  using  the  following
  874. procedure.|^
  875.  
  876.      The  size  of the root ('a') filesystem was assigned in
  877. step 2 (creating the disk label).  _m_k_f_s  will  not  allow  a
  878. filesystem  to be created if there is not a label present or
  879. if the partition size is 0.  _m_k_f_s looks at partition 0 ('a')
  880. in the disklabel for the root file system size.
  881.  
  882.      Finally,  determine  the  proper interleaving factors _m
  883. and _n for your disk.   Extensive  testing  has  demonstrated
  884. that  the choice of _m is non critical (performance of a file
  885. system varying only by 3 to 4% for a wide range  of  _m  val-
  886. ues).   Values  for  _m  within  the  range from  2 to 5 give
  887. almost identical performance.  Increasing _m too  much  actu-
  888. ally causes degraded performance because the free blocks are
  889. too far apart.  Slower processors (such as the  73  and  44)
  890. may  want  to  start  with  a _m of 3 or 4, faster processors
  891. (such as the 70 and 84) may start with a _m of 2  or  3.   On
  892. the  other  hand,  the  _n value is moderately important.  It
  893. should be the number of filesystem blocks contained  by  one
  894. cylinder  of  the disk, calculated by dividing the number of
  895. sectors per cylinder by 2, rounding down if  needed.   (This
  896. is what _m_k_f_s does by default, based on the geometry informa-
  897. tion in the disk label.)  These numbers determine the layout
  898. of the free list that will be constructed; the proper inter-
  899. leaving will help increase the speed of the file system.
  900.  
  901.      The number of  bytes  per  inode  determines  how  many
  902. inodes  will be allocated in the filesystem.  The default of
  903. 4096 bytes per inode is normally enough (resulting in  about
  904. 2000  inodes  for  a 8mb root filesystem and 1000 inodes for
  905. -----------
  906. |^ NNoottee::  These  instructions  have changed quite a
  907.   bit during the  evolution  of  the  system  from
  908.   2.10.1BSD.  Previously, if the disk on which you
  909.   are creating a root file system was an  xxpp  disk
  910.   you  would  have  been  asked to check the drive
  911.   type register and possibly halt the processor to
  912.   patch  a  location  (hopefully before the driver
  913.   accessed the drive).  TThhiiss iiss nnoo lloonnggeerr  nneeeeddeedd.
  914.   All   geometry   and  partition  information  is
  915.   obtained from the disklabel created in  step  2.
  916.   We  also  used  to give tables of mm and nn values
  917.   for various disks, which are now purposely omit-
  918.   ted.
  919.  
  920.  
  921.  
  922.                         17 March 1998
  923.  
  924.  
  925.  
  926.  
  927.  
  928. Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 15
  929.  
  930.  
  931. the 4mb distribution ``generic'' root filesystem).  If  more
  932. inodes  are desired then a lower value (perhaps 3072) should
  933. be specified when prompted  for  the  number  of  bytes  per
  934. inode.
  935.  
  936.      Then  run  the  standalone version of the _m_k_f_s (8) pro-
  937. gram.  The values in square brackets at the size  prompt  is
  938. the  default  from  the  disklabel.   Simply hit a return to
  939. accept the default.  _m_k_f_s will allow you to create a smaller
  940. filesystem  but  you  can not enter a larger number than the
  941. one in brackets.  In the following procedure, substitute the
  942. correct  types  for  _t_p and _d_k and the size determined above
  943. for _s_i_z_e:
  944.  
  945.  
  946.      ::_t_p(0,2)                                   (_m_k_f_s is tape file 2)
  947.      BBoooott:: bboooottddeevv==00nnnnnnnn bboooottccssrr==00mmmmmmmmmmmm
  948.      MMkkffss
  949.      ffiillee ssyysstteemm:: _d_k(0,0)                       (root is the first file system on drive 0)
  950.      ffiillee ssyysstteemm ssiizzee:: [NNNN] _s_i_z_e              (count of 1024 byte blocks in root)
  951.      bbyytteess ppeerr iinnooddee:: [4096] _b_y_t_e_s              (number of bytes per inode)
  952.      iinntteerrlleeaavviinngg ffaaccttoorr ((mm,, 22 ddeeffaauulltt)):: _m      (interleaving, see above)
  953.      iinntteerrlleeaavviinngg mmoodduulluuss ((nn,, 112277 ddeeffaauulltt)):: _n   (interleaving, see above)
  954.      iissiizzee == XXXX                                 (count of inodes in root file system)
  955.      mm//nn == _m _n                                  (interleave parameters)
  956.      EExxiitt ccaalllleedd
  957.      _n_nBBoooott
  958.      ::                                          (back at tape boot level)
  959.  
  960.  
  961.  
  962. The number nnnnnnnn is the device number  of  the  device  (high
  963. byte is the major device number and the low byte is the unit
  964. number).  The mmmmmmmmmmmm number is the CSR of the device.   This
  965. information  is  mainly  used  as  a  reminder  and diagnos-
  966. tic/testing purposes.
  967.  
  968. You now have an empty UNIX root file system.
  969.  
  970. 22..11..44..  SStteepp 44:: rreessttoorriinngg tthhee rroooott ffiillee ssyysstteemm
  971.  
  972.      To restore the root file system onto it, type
  973.  
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.  
  988.                         17 March 1998
  989.  
  990.  
  991.  
  992.  
  993.  
  994. setup.2.11 - 16Installing and Operating 2.11BSD on the PDP-11
  995.  
  996.  
  997.      ::_t_p(0,3)                                 (_r_e_s_t_o_r is tape file 3)
  998.      BBoooott:: bboooottddeevv==00nnnnnnnn bboooottccssrr==00mmmmmmmmmmmm
  999.      RReessttoorr
  1000.      TTaappee?? _t_p(0,5)                            (root _d_u_m_p is tape file 5)
  1001.      DDiisskk?? _d_k(0,0)                            (into root file system)
  1002.      LLaasstt cchhaannccee bbeeffoorree ssccrriibbbblliinngg oonn ddiisskk..   (type a carriage return to start)
  1003.      ""EEnndd ooff ttaappee""                            (appears on same line as message above)
  1004.      EExxiitt ccaalllleedd
  1005.      _n_nBBoooott
  1006.      ::                                        (back at tape boot level)
  1007.  
  1008.  
  1009.      This takes about 8 minutes with a TZ30 on a 11/93 and about 15 minutes using
  1010.      a TK50 on a 11/73.
  1011.  
  1012. If you wish, you may use the _i_c_h_e_c_k  program  on  the  tape,
  1013. _t_p(0,4),  to  check  the  consistency of the file system you
  1014. have just installed.  This has rarely  been  useful  and  is
  1015. mostly for the voyeuristic.
  1016.  
  1017. 22..11..55..  SStteepp 55:: bboooottiinngg UUNNIIXX
  1018.  
  1019.      You are now ready to boot from disk.  Type:
  1020.  
  1021.  
  1022.      ::_d_k(0,0)unix                          (bring in unix from the root system)
  1023.      BBoooott:: bboooottddeevv==00nnnnnnnn bboooottccssrr==00mmmmmmmmmmmm
  1024.  
  1025.  
  1026. The  standalone  boot  program  will then load unix from the
  1027. root file system you just created,  and  the  system  should
  1028. boot:
  1029.  
  1030.      22..1111BBSSDD BBSSDD UUNNIIXX ##11:: SSaatt JJuull 44 0011::3333::0033 PPDDTT 11999922
  1031.          rroooott@@wwlloonneexx..iiiippoo..ggtteeggsscc..ccoomm:://uussrr//ssrrcc//ssyyss//GGEENNEERRIICC
  1032.      pphhyyss mmeemm  == _?_?_?
  1033.      aavvaaiill mmeemm == _?_?_?
  1034.      uusseerr mmeemm  == _?_?_?
  1035.  
  1036.      ccoonnffiigguurree ssyysstteemm
  1037.      _._._. _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 _._._.
  1038.      (Information about various devices will print;
  1039.      most of them will probably not be found until
  1040.      the addresses are set below.)
  1041.      eerraassee==^^??,, kkiillll==^^UU,, iinnttrr==^^CC
  1042.      ##
  1043.  
  1044.  
  1045.      UNIX  itself then runs for the first time and begins by
  1046. printing out a banner identifying the release and version of
  1047. the system that is in use and the date that it was compiled.
  1048.  
  1049.      Next the _m_e_m messages give the amount of  real  (physi-
  1050. cal) memory, the amount of memory left over after the system
  1051.  
  1052.  
  1053.  
  1054.                         17 March 1998
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060. Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 17
  1061.  
  1062.  
  1063. has allocated various data structures,  and  the  amount  of
  1064. memory available to user programs in bytes.
  1065.  
  1066.      The  information about different devices being attached
  1067. or not being found is produced by the _a_u_t_o_c_o_n_f_i_g(8) program.
  1068. Most  of this is not important for the moment, but later the
  1069. device table, _/_e_t_c_/_d_t_a_b, can be edited to correspond to your
  1070. hardware.   However,  the  tape  drive  of  the correct type
  1071. should have been detected and attached.
  1072.  
  1073.      The ``erase ...'' message is part of /.profile that was
  1074. executed by the root shell when it started.  This message is
  1075. present to remind you that the character erase, line  erase,
  1076. and interrupt characters are set to what is standard for DEC
  1077. systems; this insures that things are  consistent  with  the
  1078. DEC console interface characters.
  1079.  
  1080.      UNIX  is  now running single user on the installed root
  1081. file system, and the  `UNIX  Programmer's  Manual'  applies.
  1082. The  next  section tells how to complete the installation of
  1083. distributed software on the /usr file system.   The  `#'  is
  1084. the  prompt  from  the shell, and lets you know that you are
  1085. the super-user, whose login name is ``root''.
  1086.  
  1087.      The disk with the new root file system on it  will  not
  1088. be bootable directly until the block 0 bootstrap program for
  1089. your disk has been installed.  There are copies of the boot-
  1090. straps  in  /mdec.   Use  _d_d(1) to copy the right boot block
  1091. onto block 0 of the disk.
  1092.  
  1093.      ## dd if=/mdec/_b_o_o_t of=/dev/r_d_k0a count=1
  1094.  
  1095. Block zero bootstraps and the devices they support are:
  1096.  
  1097.  
  1098.      boot        driver   devices
  1099.      -------------------------------------------------------------------------
  1100.      hkuboot     hk       RK06/07
  1101.      rauboot     ra       All RA, RD, RZ, RX (except RX01,02) and RC25 drives
  1102.      rkuboot     rk       RK05
  1103.      rluboot     rl       RL01/02
  1104.      si95uboot   si       SI 9500, CDC 9766
  1105.      dvhpuboot   xp       Diva Comp V, Ampex 9300
  1106.      hpuboot     xp       RP04/05/06
  1107.      rm03uboot   xp       RM03
  1108.      rm05uboot   xp       RM05 or SI 9500, CDC 9766
  1109.      si51uboot   xp       SI 6100, Fujitsu Eagle 2351A
  1110.      si94uboot   xp       Emulex SC01B/SC03B or SI 9400, Fujitsu 160
  1111.  
  1112.  
  1113. NNOOTTEE:: If none of the above are correct (most likely  with  a
  1114. SMD drive with differing geometry) then you will have to use
  1115. a tape/floppy boot proceedure rather than a sector  0  boot-
  1116. block.   This can be fixed by creating a customized sector 0
  1117.  
  1118.  
  1119.  
  1120.                         17 March 1998
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126. setup.2.11 - 18Installing and Operating 2.11BSD on the PDP-11
  1127.  
  1128.  
  1129. boot program once the system sources have been loaded.
  1130.  
  1131.      Once this is done, booting from this disk will load and
  1132. execute  the  block  0  bootstrap,  which  will in turn load
  1133. /boot.  //bboooott will print on the console:
  1134.  
  1135.  
  1136.      _n_nBBoooott ffrroomm _d_k((_c_t_l_r,,_u_n_i_t,,_p_a_r_t)) aatt _c_s_r
  1137.      :
  1138.  
  1139.  
  1140. The bootblock automatically loads and runs /_b_o_o_t for you; if
  1141. /_b_o_o_t  is not found, the system will hang/loop forever.  The
  1142. block 0 program is very small (has to fit in 512 bytes)  and
  1143. simple  program, however, and can only boot the second-stage
  1144. boot from the first file system.  Once /boot is running  and
  1145. prints its ``: '' prompt, boot unix as above.
  1146.  
  1147.      As  distributed  /_b_o_o_t will load _d_k(0,0)unix by default
  1148. if a carriage return is typed at the :: prompt.
  1149.  
  1150.      NNOOTTEE:: NONE the primary  bootstraps  have  a  prompt  or
  1151. alternate program name capability because of space consider-
  1152. ations.  No diagnostic message results if the file cannot be
  1153. found.
  1154.  
  1155. 22..11..66..  SStteepp 66:: sseettttiinngg uupp tthhee //uussrr ffiillee ssyysstteemm
  1156.  
  1157.      First set a shell variable to the name of your disk, so
  1158. the commands used later will work regardless of the disk you
  1159. have; do one of the following:
  1160.  
  1161.  
  1162.      ## disk=hk   (if you have RK06's or RK07's)
  1163.      ## disk=rl   (if you have RL01's or RL02's)
  1164.      ## disk=ra   (if you have an MSCP drive)
  1165.      ## disk=xp   (if you have an RP06, RM03, RM05, or other SMD drive)
  1166.  
  1167.  
  1168.  
  1169.      The next thing to do is to extract the rest of the data
  1170. from the tape.  You might wish to review the disk configura-
  1171. tion  information in section 4.3 before continuing; you will
  1172. have to select a partition to restore the /usr  file  system
  1173. into  which  is  at least 2255 Megabytes in size (this is just
  1174. barely enough for the system binaries and such and leaves no
  1175. room for the system source.)|^
  1176. -----------
  1177. |^ NNoottee::  Previously  a  lengthy table of partition
  1178.   names organized by specific disk type was given.
  1179.   With  the  introduction of disklabels this is no
  1180.   longer necessary (or possible  since  each  site
  1181.   can  select  whatever  partitioning  scheme they
  1182.   desire).  In step 2 (creating the  disklabel)  a
  1183.  
  1184.  
  1185.  
  1186.                         17 March 1998
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192. Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 19
  1193.  
  1194.  
  1195.      In the command below _p_a_r_t is the partition  name  (a-h)
  1196. for the partition which will hold /usr.
  1197.  
  1198.  
  1199.      nnaammee==$${{ddiisskk}}00$${{ppaarrtt}}
  1200.  
  1201.  
  1202. Next, find the tape you have in the following table and exe-
  1203. cute the commands in the right hand portion of the table:
  1204.  
  1205.  
  1206.      DEC TM02/03, TE16/TU45/TU77   ## cd /dev; rm *mt*; ./MAKEDEV ht0; sync
  1207.      DEC TS11, TK25/TU80/TS05      ## cd /dev; rm *mt*; ./MAKEDEV ts0; sync
  1208.      DEC TM11, TU10/TE10/TS03      ## cd /dev; rm *mt*; ./MAKEDEV tm0; sync
  1209.      DEC TMSCP, TK50/TZ30/TU81     ## cd /dev; rm *mt*; ./MAKEDEV tu0; sync
  1210.      EMULEX TC11                   ## cd /dev; rm *mt*; ./MAKEDEV tm0; sync
  1211.  
  1212.  
  1213. Then execute the following commands:
  1214.  
  1215.  
  1216.  
  1217.      ## date _y_y_m_m_d_d_h_h_m_m                                (set date, see _d_a_t_e(1))
  1218.      ....
  1219.      ## passwd root                                    (set password for super-user)
  1220.      NNeeww ppaasssswwoorrdd::                                    (password will not echo)
  1221.      RReettyyppee nneeww ppaasssswwoorrdd::
  1222.      ## hostname _m_y_s_i_t_e_n_a_m_e                            (set your hostname)
  1223.      ## newfs ${name}                                  (create empty user file system)
  1224.      (this takes a minute)
  1225.      ## mount /dev/${name} /usr                        (mount the usr file system)
  1226.      ## cd /usr                                        (make /usr the current directory)
  1227.      ## mt rew
  1228.      ## mt fsf 6
  1229.      ## tar xpbf 20 /dev/rmt12                         (extract all of usr except usr/src)
  1230.      (this takes about 15-20 minutes except for the
  1231.      TK50 and TZ30 which are mmuucchh slower)
  1232.  
  1233.  
  1234. The data on the seventh tape file has  now  been  extracted.
  1235. All  that  remains on the first tape is a small archive con-
  1236. taining source for the kernel and include files.
  1237.  
  1238.      If you have an existing/old password file to be  merged
  1239. back  into  2.11BSD,  special steps are necessary to convert
  1240. the old password file to the  shadow  password  file  format
  1241. (shadow  password  file  and password aging were ported from
  1242. 4.3BSD and are standard in 2.11BSD ).
  1243.  
  1244. -----------
  1245.   partition should have been created for _/_u_s_r.  If
  1246.   this was not done then it may be easier to  per-
  1247.   form  step  2  now  than to use the more complex
  1248.   _d_i_s_k_l_a_b_e_l(8) program and _e_d(1).
  1249.  
  1250.  
  1251.  
  1252.                         17 March 1998
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258. setup.2.11 - 20Installing and Operating 2.11BSD on the PDP-11
  1259.  
  1260.  
  1261.      ## mt -f /dev/rmt12 fsf                        (position tape at beginning of next tape file)
  1262.      ## mkdir src                                   (make directory for source)
  1263.      ## cd src                                      (make /usr/src the current directory)
  1264.      ## tar xpbf 20 /dev/rmt12                      (extract the system and include source)
  1265.      (this takes about 5-10 minutes)
  1266.      ## cd /                                        (back to root)
  1267.      ## chmod 755  /  /usr  /usr/src /usr/src/sys
  1268.      ## rm -f sys
  1269.      ## ln -s usr/src/sys sys                       (make a symbolic link to the system source)
  1270.      ## umount /dev/${name}                         (unmount /usr)
  1271.  
  1272.  
  1273.  
  1274.      The first tape has been been  completely  loaded.   You
  1275. can check the consistency of the /usr file system by doing
  1276.  
  1277.      ## fsck /dev/r${name}
  1278.  
  1279. The output from _f_s_c_k should look something like:
  1280.  
  1281.      **** //ddeevv//rr_x_x00gg
  1282.      FFiillee SSyysstteemm:: //uussrr
  1283.  
  1284.      NNEEEEDD SSCCRRAATTCCHH FFIILLEE ((117799 BBLLKKSS))
  1285.      EENNTTEERR FFIILLEENNAAMMEE::  //ttmmpp//xxxxxx
  1286.      **** LLaasstt MMoouunntteedd oonn //uussrr
  1287.      **** PPhhaassee 11 -- CChheecckk BBlloocckkss aanndd SSiizzeess
  1288.      **** PPhhaassee 22 -- CChheecckk PPaatthhnnaammeess
  1289.      **** PPhhaassee 33 -- CChheecckk CCoonnnneeccttiivviittyy
  1290.      **** PPhhaassee 44 -- CChheecckk RReeffeerreennccee CCoouunnttss
  1291.      **** PPhhaassee 55 -- CChheecckk FFrreeee LLiisstt
  1292.      667711 ffiilleess,, 33449977 uusseedd,, 113377006677 ffrreeee
  1293.  
  1294.  
  1295.      If  there  are  inconsistencies in the file system, you
  1296. may be prompted to apply corrective action; see the document
  1297. describing _f_s_c_k for information.
  1298.  
  1299.      To  use the /usr file system, you should now remount it
  1300. by saying
  1301.  
  1302.      ## mount /dev/${name} /usr
  1303.  
  1304.  
  1305. 22..11..77..  SStteepp 77:: eexxttrraaccttiinngg rreemmaaiinniinngg ssoouurrccee ffrroomm tthhee  sseeccoonndd
  1306. ttaappee
  1307.  
  1308.      You  can  then extract the source code for the commands
  1309. from  the  second  distribution tape|^ (with the exception of
  1310. RK07's, RM03's, and RD52's and other small disks  this  will
  1311. fit in the /usr file system):
  1312. -----------
  1313. |^ On the TK50 the remaining source is the 9th file
  1314.   on the cartridge.
  1315.  
  1316.  
  1317.  
  1318.                         17 March 1998
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324. Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 21
  1325.  
  1326.  
  1327.      ## cd /usr/src
  1328.      ## tar xpb 20
  1329.  
  1330. If  you  get  an  error  at this point, most likely it was a
  1331. problem with tape positioning.  Rewind the tape and use  the
  1332. mmtt command to skip files, then retry the ttaarr command.
  1333.  
  1334. 22..22..  AAddddiittiioonnaall ccoonnvveerrssiioonn iinnffoorrmmaattiioonn
  1335.  
  1336.      After  setting  up the new 2.11BSD filesystems, you may
  1337. restore the user files that were saved on tape before begin-
  1338. ning  the  conversion.  Note that the 2.11BSD _r_e_s_t_o_r program
  1339. does its work by accessing the raw file  system  device  and
  1340. depositing  inodes  in  the  appropriate  locations on disk.
  1341. This means that file system dumps  might  not  restore  cor-
  1342. rectly  if  the  characteristics  of  the  file  system have
  1343. changed (eg. if you're restoring a dump  of  a  file  system
  1344. into a file system smaller than the original.)  To restore a
  1345. dump tape for, say, the /u file system  something  like  the
  1346. following would be used:
  1347.  
  1348.      ## restor r /dev/rxp1e
  1349.  
  1350.  
  1351.      If _t_a_r images were written instead of doing a dump, you
  1352. should be sure to use the `p' option when reading the  files
  1353. back.   No matter how you restore a file system, be sure and
  1354. check its integrity with _f_s_c_k when the job is complete.
  1355.  
  1356.      _t_a_r tapes are preferred  (when  possible)  because  the
  1357. inode  allocation is performed by the kernel rather than the
  1358. _r_e_s_t_o_r(8) program.   This  has  the  benefit  of  allocating
  1359. inodes sequentially starting from the beginning of the inode
  1360. portion of the filesystem rather than preserving  the  frag-
  1361. mented/randomized order of the old filesystem.
  1362.  
  1363.  
  1364.  
  1365.  
  1366.  
  1367.  
  1368.  
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.  
  1384.                         17 March 1998
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390. setup.2.11 - 22Installing and Operating 2.11BSD on the PDP-11
  1391.  
  1392.  
  1393.               33.. UUPPGGRRAADDIINNGG AANN EEXXIISSTTIINNGG SSYYSSTTEEMM
  1394.  
  1395.  
  1396.  
  1397.      Begin  by  reading the document ``Changes to the System
  1398. in 2.11BSD'' to get an idea of how the system  changes  will
  1399. affect  your  local modifications.  If you have local device
  1400. drivers, see the file _/_s_y_s_/_O_T_H_E_R_S_/_R_E_A_D_M_E for hints on how to
  1401. integrate your drivers into 2.11BSD.
  1402.  
  1403.      The  only upgrade path to 2.11BSD is to do a full boot-
  1404. strap as described in Chapter 2.  As always, full backups of
  1405. the  existing  system should be made to guard against errors
  1406. or failures.  NNOOTTEE:: The old filesystems can not  be  mounted
  1407. by the new kernel.  If you must access old discs or filesys-
  1408. tems, there is a version  of  _d_u_m_p(8)  in  /usr/src/old/dump
  1409. which can be used with the rraaww disc to dump old filesystems.
  1410.  
  1411.      The archive file format has changed, the  4.3BSD  _a_r(5)
  1412. format  is  now  used.   Local archives will have to be con-
  1413. verted by the _/_u_s_r_/_o_l_d_/_a_r_c_v program.
  1414.  
  1415. 33..11..  FFiilleess ttoo ssaavvee
  1416.  
  1417.      The following list enumerates the standard set of files
  1418. you will want to save and suggests directories in which site
  1419. specific files should be present.  Note that because 2.10BSD
  1420. changed  so  radically from previous versions of UNIX on the
  1421. PDP-11, many of these files may not exist  on  your  system,
  1422. and  will  almost  certainly  require  extensive changes for
  1423. 2.11BSD, but it's still handy to have them around as  you're
  1424. configuring  2.11BSD.   This  list  will likely be augmented
  1425. with non-standard files you have added to your system.
  1426.  
  1427.      You should create a _t_a_r image of  (at  a  minimum)  the
  1428. following files before the new file systems are created.  In
  1429. addition, you should do a full dump  before  rebuilding  the
  1430. file  system  to  guard  against missing something the first
  1431. time around.  The 2.11BSD _r_e_s_t_o_r(8)  program  can  read  and
  1432. convert old _d_u_m_p(8) tapes.
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450.                         17 March 1998
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456. Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 23
  1457.  
  1458.  
  1459.      /.cshrc                |^   root csh startup script
  1460.      /.login                |^   root csh login script
  1461.      /.profile              |^   root sh startup script
  1462.      /.rhosts               |^   for trusted machines and users
  1463.      /dev/MAKEDEV           |=   in case you added anything here
  1464.      /dev/MAKEDEV.local     *   for making local devices
  1465.      /etc/disktab           *   in case you changed disk partition sizes
  1466.      /etc/dtab              |=   table of devices to attach at boot time
  1467.      /etc/fstab             |^   disk configuration data
  1468.      /etc/ftpusers          |^   for local additions
  1469.      /etc/gateways          |^   routing daemon database
  1470.      /etc/gettytab          |^   getty database
  1471.      /etc/group             |^   group data base
  1472.      /etc/hosts             |^   for local host information
  1473.      /etc/hosts.dir         *   must be rebuilt with mkhosts
  1474.      /etc/hosts.pag         *   must be rebuilt with mkhosts
  1475.      /etc/hosts.equiv       |^   for local host equivalence information
  1476.      /etc/networks          |^   for local network information
  1477.      /etc/netstart          *   site dependent network startup script
  1478.      /etc/passwd            *   must be converted to shadow password file format
  1479.      /etc/passwd.dir        *   must be rebuilt with mkpasswd
  1480.      /etc/passwd.pag        *   must be rebuilt with mkpasswd
  1481.      /etc/printcap          |^   line printer database
  1482.      /etc/protocols         |=   in case you added any local protocols
  1483.      /etc/rc                *   for any local additions
  1484.      /etc/rc.local          *   site specific system startup commands
  1485.      /etc/remote            |^   auto-dialer configuration
  1486.      /etc/services          |=   for local additions
  1487.      /etc/syslog.conf       |^   system logger configuration
  1488.      /etc/securettys        *   for restricted list of ttys where root can log in
  1489.      /etc/ttys              |^   terminal line configuration data
  1490.      /etc/ttytype           *   terminal line to terminal type mapping data
  1491.      /etc/termcap           |=   for any local entries that may have been added
  1492.      /lib                   |=   for any locally developed language processors
  1493.      /usr/dict/*            |=   for local additions to words and papers
  1494.      /usr/hosts/MAKEHOSTS   |^   for local changes
  1495.      /usr/include/*         |=   for local additions
  1496.      /etc/aliases           |^   mail forwarding data base
  1497.      /etc/crontab           |^   cron daemon data base
  1498.      /usr/share/font/*      |=   for locally developed font libraries
  1499.      /usr/lib/lib*.a        |^   for local libraries
  1500.      /usr/share/lint/*      |=   for locally developed lint libraries
  1501.      /etc/sendmail.cf       |^   sendmail configuration
  1502.      /usr/share/tabset/*    |=   for locally developed tab setting files
  1503.      /usr/share/term/*      |=   for locally developed nroff drive tables
  1504.      /usr/share/tmac/*      |=   for locally developed troff/nroff macros
  1505.      /etc/uucp/*            |^   for local uucp configuration files
  1506.      /usr/man/manl          *   for manual pages for locally developed programs
  1507.      /usr/msgs              |^   for current msgs
  1508.      /usr/spool/*           |^   for current mail, news, uucp files, etc.
  1509.      /usr/src/local         |^   for source for locally developed programs
  1510.      /sys/conf/HOST         |^   configuration file for your machine
  1511.      /sys/conf/files.HOST   |^   list of special files in your kernel
  1512.      /*/quotas              *   file system quota files
  1513.  
  1514.  
  1515.  
  1516.                         17 March 1998
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522. setup.2.11 - 24Installing and Operating 2.11BSD on the PDP-11
  1523.  
  1524.  
  1525.      |^Files that can be used from 2.10BSD without change.
  1526.      |=Files that need local modifications merged into 2.11BSD files.
  1527.      *Files that require special work to merge and are discussed below.
  1528.  
  1529.  
  1530.  
  1531. 33..11..11..  IInnssttaalllliinngg 22..1111BBSSDD
  1532.  
  1533.      The  next  step  is  to build a working 2.11BSD system.
  1534. This can be done by following the steps in section 2 of this
  1535. document  for extracting the root and /usr file systems from
  1536. the distribution tape onto unused disk partitions.
  1537.  
  1538.      Once you have extracted the 2.11BSD system  and  booted
  1539. from it, you will have to build a kernel customized for your
  1540. configuration.  If you have any local device  drivers,  they
  1541. will  have to be incorporated into the new kernel.  See sec-
  1542. tion 4.2.3 and ``Building 2.11BSD UNIX Systems.''
  1543.  
  1544.      With the introduction of disklabels the disk partitions
  1545. in  2.11BSD  the /etc/disktab file has changed dramatically.
  1546. There is a detailed description later in this chapter  about
  1547. the  changes.   If you have modified the partition tables in
  1548. previous versions of 2.11BSD you will need to create  a  new
  1549. disktab entry or modify an existing one.
  1550.  
  1551. 33..22..   MMeerrggiinngg  yyoouurr  ffiilleess ffrroomm eeaarrlliieerr PPDDPP--1111 UUNNIIXX ssyysstteemmss
  1552. iinnttoo 22..1111BBSSDD
  1553.  
  1554.      When your system is booting reliably and you  have  the
  1555. 2.11BSD  root and /usr file systems fully installed you will
  1556. be ready to continue with the next step  in  the  conversion
  1557. process, merging your old files into the new system.
  1558.  
  1559.      If you saved the files on a _t_a_r tape, extract them into
  1560. a scratch directory, say /usr/convert:
  1561.  
  1562.      ## mkdir /usr/convert
  1563.      ## cd /usr/convert
  1564.      ## tar x
  1565.  
  1566.  
  1567.      For sites running 2.10.1BSD, converting local  configu-
  1568. ration  files should be very simple.  In general very little
  1569. has changed between 2.10.1BSD and  2.11BSD  with  regard  to
  1570. these files.
  1571.  
  1572.      For  sites  running  a  pre-2.10BSD UNIX, there is very
  1573. little that can be said here as the variety of previous ver-
  1574. sions  of PDP-11 UNIX systems and how they were administered
  1575. is large.  As an example, most previous versions  of  PDP-11
  1576. UNIX  systems  used  the files _/_e_t_c_/_t_t_y_s and _/_e_t_c_/_t_t_y_t_y_p_e to
  1577. administer  which  terminals  should  have  login  processes
  1578. attached to them and what the types of terminals those were.
  1579.  
  1580.  
  1581.  
  1582.                         17 March 1998
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588. Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 25
  1589.  
  1590.  
  1591. Under 2.11BSD /etc/ttytype  has  disappeared  entirely,  its
  1592. functions subsumed by /etc/ttys along with several new func-
  1593. tions.  In general you will simply have to use your previous
  1594. configuration  files  as references as you configure 2.11BSD
  1595. to your site needs.  Familiarity with  4.3BSD  configuration
  1596. is  very helpful at this point since 2.11BSD is nearly iden-
  1597. tical in most of the files listed in the previous section.
  1598.  
  1599.      If you have any home  grown  device  drivers  that  use
  1600. major device numbers reserved by the system you will have to
  1601. modify the commands used to create the devices or alter  the
  1602. system device configuration tables in /sys/pdp/conf.c.  Note
  1603. that almost all 2.11BSD major device numbers  are  different
  1604. from those in previous PDP-11 UNIX systems except 2.10.1BSD.
  1605. A couple more device numbers were added since the release of
  1606. 2.10.1BSD  for the kernel logging facility (/dev/klog) and a
  1607. (new) TK50/TU81 driver.
  1608.  
  1609.      System security  changes  require  adding  several  new
  1610. ``well-known''  groups  to  /etc/group.  The groups that are
  1611. needed by the system as distributed are:
  1612.  
  1613.  
  1614.      name       number
  1615.      ------------------
  1616.      wheel        0
  1617.      daemon       1
  1618.      kmem         2
  1619.      sys          3
  1620.      tty          4
  1621.      operator     5
  1622.      staff        10
  1623.      bin          20
  1624.  
  1625.  
  1626. Only users in the ``wheel'' group are  permitted  to  _s_u  to
  1627. ``root''.    Most   programs   that  manage  directories  in
  1628. /usr/spool now run set-group-id to ``daemon'' so that  users
  1629. cannot  directly  access the files in the spool directories.
  1630. The special files that access kernel memory,  _/_d_e_v_/_k_m_e_m  and
  1631. _/_d_e_v_/_m_e_m,  are  made readable only by group ``kmem''.  Stan-
  1632. dard system programs that require this access are made  set-
  1633. group-id  to  that  group.  The group ``sys'' is intended to
  1634. control access to system sources, and other  sources  belong
  1635. to  group  ``staff.''   Rather  than  make  user's terminals
  1636. writable by all users, they are now placed in group  ``tty''
  1637. and  made only group writable.  Programs that should legiti-
  1638. mately have access to write on user's terminals such as _t_a_l_k
  1639. and _w_r_i_t_e now run set-group-id to ``tty''.  The ``operator''
  1640. group controls access to disks.  By default, disks are read-
  1641. able  by group ``operator'', so that programs such as _d_f can
  1642. access the file system information without being set-user-id
  1643. to ``root''.
  1644.  
  1645.  
  1646.  
  1647.  
  1648.                         17 March 1998
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654. setup.2.11 - 26Installing and Operating 2.11BSD on the PDP-11
  1655.  
  1656.  
  1657.      Several  new users have also been added to the group of
  1658. ``well-known'' users in /etc/passwd.  The current list is:
  1659.  
  1660.  
  1661.      name       number
  1662.      ------------------
  1663.      root         0
  1664.      daemon       1
  1665.      operator     2
  1666.      uucp         66
  1667.      nobody     32767
  1668.  
  1669.  
  1670. The ``daemon'' user is used for daemon processes that do not
  1671. need  root  privileges.  The ``operator'' user-id is used as
  1672. an account for dumpers so that they can log in without  hav-
  1673. ing  the root password.  By placing them in the ``operator''
  1674. group, they can get read access to the disks.  The  ``uucp''
  1675. login  has  existed  long  before 2.11BSD, and is noted here
  1676. just to  provide  a  common  user-id.   The  password  entry
  1677. ``nobody''  has  been  added  to specify the user with least
  1678. privilege.
  1679.  
  1680.      After   restoring   your   old   password   file   from
  1681. tape/backups,  a conversion is required to create the shadow
  1682. password file.  Only the steps to  convert  /etc/passwd  are
  1683. given  here,  see  the  various  man  pages  for  _c_h_p_a_s_s(1),
  1684. _v_i_p_w(8), _m_k_p_a_s_s_w_d(8), etc.
  1685.  
  1686.      ## awk -f /etc/awk.script < /etc/passwd >/etc/junk
  1687.      ## mkpasswd -p /etc/junk
  1688.      ## mv /etc/junk.orig /etc/passwd
  1689.      ## mv /etc/junk.pag /etc/passwd.pag
  1690.      ## mv /etc/junk.dir /etc/passwd.dir
  1691.      ## mv /etc/junk /etc/master.passwd
  1692.      ## chown root /etc/passwd* /etc/master.passwd
  1693.      ## chmod 0600 /etc/master.passwd
  1694.  
  1695.  
  1696.      The format of the cron table, /etc/crontab, is the same
  1697. as that of 2.10.1BSD.
  1698.  
  1699.      Some  of  the commands previously in /etc/rc.local have
  1700. been moved to /etc/rc; several new functions are now handled
  1701. by  /etc/rc.local.  You should look closely at the prototype
  1702. version of /etc/rc.local and read the manual pages  for  the
  1703. commands  contained  in it before trying to merge your local
  1704. copy.   Note  in  particular  that  _i_f_c_o_n_f_i_g  has  had  many
  1705. changes,  and  that  host  names  are now fully specified as
  1706. domain-style names (e.g, boris.Oswego.EDU).
  1707.  
  1708.      The C library and system binaries on  the  distribution
  1709. tape  are  compiled with versions of _g_e_t_h_o_s_t_b_y_n_a_m_e and _g_e_t_h_-
  1710. _o_s_t_b_y_a_d_d_r which use ndbm host table lookup routines  instead
  1711.  
  1712.  
  1713.  
  1714.                         17 March 1998
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720. Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 27
  1721.  
  1722.  
  1723. of  the  name server.  You must run _m_k_h_o_s_t_s(8) to create the
  1724. _n_d_b_m host table database from _/_e_t_c_/_h_o_s_t_s.  For  2.11BSD  the
  1725. _m_k_h_o_s_t_s  program  has  been  enhanced  to  support  multiple
  1726. addresses per host with order being preserved (the order  in
  1727. which  the  multiple  addresses appear in _/_e_t_c_/_h_o_s_t_s for the
  1728. same host is the same order the addresses will  be  returned
  1729. to the caller of _g_e_t_h_o_s_t_b_y_n_a_m_e).
  1730.  
  1731.      There  is  a version of the nameserver which runs under
  1732. 2.11BSD.  However in addition to having a voracious appetite
  1733. for  memory  there  are memory leaks which cause _n_a_m_e_d(8) to
  1734. crash after running  for  an  extended  period.   Restarting
  1735. _n_a_m_e_d(8)  nightly from _c_r_o_n is the only work around solution
  1736. at present.
  1737.  
  1738.      If you want to compile your  system  to  use  the  name
  1739. server resolver routines instead of the ndbm host table, you
  1740. will need to modify /usr/src/lib/libc/Makefile according  to
  1741. the  instructions there and then recompile all of the system
  1742. and local programs (see section 6.5).|^
  1743.  
  1744.      The format of /etc/ttys is the same  as  it  was  under
  1745. 2.10BSD.  It includes the terminal type and security options
  1746. that were previously in /etc/ttytype and /etc/securettys.
  1747.  
  1748.      _s_y_s_l_o_g is the 4.4BSD-Lite version now.   See  _s_y_s_l_o_g(3)
  1749. and  _s_y_s_l_o_g_d(8)  for  details.  They are used by many of the
  1750. system daemons to monitor system problems more closely,  for
  1751. example network routing changes.
  1752.  
  1753.      Again, it must be emphasized that the nameserver is not
  1754. robust under 2.11BSD, and if the _h_o_s_t_s files are not desired
  1755. then the best alternative is to use the _r_e_s_o_l_v_e_r(5) routines
  1756. and use the nameserver on  a  remote  larger  machine.   The
  1757. _r_e_s_o_l_v_e_r(5) routines are known to work.
  1758.  
  1759.      The  spooling directories saved on tape may be restored
  1760. in their eventual resting places without too  much  concern.
  1761. Be  sure  to  use  the ``p'' option to _t_a_r so that files are
  1762. recreated with the same file modes:
  1763.  
  1764.      ## cd /usr
  1765.      ## tar xp msgs spool/mail spool/uucp spool/uucppublic spool/news
  1766.  
  1767.  
  1768.      The ownership and modes of  two  of  these  directories
  1769. needs  to be changed, because _a_t now runs set-user-id ``dae-
  1770. mon'' instead of root.  Also, the uucp directory  no  longer
  1771. -----------
  1772. |^ Note: The resolver routines  add  about  5kb  of
  1773.   text and 1kb of data to each program.  Also, the
  1774.   resolver routines use more stack space which may
  1775.   cause  large programs to crash due to failure to
  1776.   extend the stack area.
  1777.  
  1778.  
  1779.  
  1780.                         17 March 1998
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786. setup.2.11 - 28Installing and Operating 2.11BSD on the PDP-11
  1787.  
  1788.  
  1789. needs  to be publicly writable, as _t_i_p reverts to privileged
  1790. status to remove its lock files.  After copying your version
  1791. of /usr/spool, you should do the following:
  1792.  
  1793.      ## chown -R daemon /usr/spool/at
  1794.      ## chown -R root /usr/spool/uucp
  1795.      ## chgrp -R daemon /usr/spool/uucp
  1796.      ## chmod -R o-w /usr/spool/uucp
  1797.  
  1798.  
  1799.      Whatever  else is left is likely to be site specific or
  1800. require careful scrutiny  before  placing  in  its  eventual
  1801. resting  place.   Refer to the documentation and source code
  1802. before arbitrarily overwriting a file.
  1803.  
  1804. 33..33..  HHiinnttss oonn ccoonnvveerrttiinngg ffrroomm pprreevviioouuss PPDDPP--1111 UUNNIIXX  ssyysstteemmss
  1805. ttoo 22..1111BBSSDD
  1806.  
  1807.      This section summarizes some of the significant changes
  1808. in 2.11BSD  from  2.10.1BSD.   The  installation  guide  for
  1809. 2.10.1BSD    is    included    in    the   distribution   as
  1810. /usr/doc/2.10/setup.2.10 and should be read if you  are  not
  1811. presently running 2.10BSD or 2.10.1BSD.  It does not include
  1812. changes in the network; see chapter  5  for  information  on
  1813. setting up the network.
  1814.  
  1815.      Old  core files will not be intelligible by the current
  1816. debuggers because of numerous changes to the user structure.
  1817. Also  removed  from  the  user  structure  are  the  members
  1818. u_offset,   u_count,   u_base,    u_segflg,    the    4.3BSD
  1819. uio/iovec/rdwri  kernel  i/o model having been put in place.
  1820. The 4.3BSD _n_a_m_e_i argument encapsulation technique  has  been
  1821. ported, which adds the u_nd member to the user structure.
  1822.  
  1823.      Note,  once  your  system is installed and running, you
  1824. should make sure that you recompile and reinstall the direc-
  1825. tory  _/_u_s_r_/_s_r_c_/_s_h_a_r_e_/_z_o_n_e_i_n_f_o.   Read  through  the Makefile
  1826. first, if you're not located on the West Coast you will have
  1827. to  change  it.  This directory is an addition since 4.3BSD,
  1828. and is intended to solve the Daylight Savings Time  problems
  1829. once and for all.
  1830.  
  1831.      The  incore  inode  structure  has  had the i_id member
  1832. added as part of implementing the 4.3BSD namei  cache.   The
  1833. di_addr  member  of  the  on  disk inode structure is now an
  1834. array of type ddaaddddrr__tt instead  of  cchhaarr.   The  old  3  byte
  1835. packed block number is obsolete at last.
  1836.  
  1837.      The  on disk directory structure is that of 4.3BSD with
  1838. the difference that the inode number is  an  unsigned  short
  1839. instead  of  a  long.  This was done to reduce the amount of
  1840. long arithmetic in the kernel and to maintain  compatibility
  1841. with  earlier  versions with regard to the maximum number of
  1842. inodes per filesystem.  Given the typical size of discs used
  1843.  
  1844.  
  1845.  
  1846.                         17 March 1998
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852. Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 29
  1853.  
  1854.  
  1855. with  2.11BSD the limit on the number of inodes per filesys-
  1856. tem will not be a problem.
  1857.  
  1858.      And again, 2.11BSD is not  filesystem  compatible  with
  1859. any previous PDP-11 UNIX system.
  1860.  
  1861.      If  you  want to use _p_s after booting a new kernel, and
  1862. before going multiuser, you must initialize  its  name  list
  1863. database by running _p_s _-_U.
  1864.  
  1865. 33..44..    HHiinnttss   oonn  ppoossssiibbllee  pprroobblleemmss  uuppggrraaddiinngg  ffrroomm  tthhee
  1866. 22..1100..11BBSSDD
  1867.  
  1868. 33..44..11..  NNeeww uuttmmpp UUTT__NNAAMMEESSIIZZEE..
  1869.  
  1870.      UUTT__NNAAMMEESSIIZZEE in >_<utmp.h was changed from 8 to 15.  This
  1871. won't  affect correctly written programs (those which do not
  1872. hard code the constant 8) at the source level but does cause
  1873. changes  in various databases.  This means that old binaries
  1874. won't be able to cope with new databases  (passwd,  aliases,
  1875. etc) and vice versa.
  1876.  
  1877.      This  change  was necessary since the systems available
  1878. for 2.11BSD development had to be  shared  with  systems  in
  1879. which    UT_NAMESIZE    was    set    at    15.    If   this
  1880. change/incompatibility  is  not  desired,  then  utmp.h  and
  1881. wtmp.h will have to be modified and the system libraries and
  1882. applications rebuilt before proceeding to load  local  soft-
  1883. ware.
  1884.  
  1885.      The  simplest  way to deal with this incompatibility is
  1886. simply to rebuild all your databases from the  source  data.
  1887. In  particular,  you should be sure you rebuild _/_e_t_c_/_p_a_s_s_w_d,
  1888. _/_e_t_c_/_h_o_s_t_s, and _/_e_t_c_/_a_l_i_a_s_e_s  databases  via  the  commands:
  1889. _m_k_p_a_s_s_w_d     _/_e_t_c_/_p_a_s_s_w_d,     _m_k_h_o_s_t_s     _/_e_t_c_/_h_o_s_t_s,    and
  1890. _/_u_s_r_/_u_c_b_/_n_e_w_a_l_i_a_s_e_s_.
  1891.  
  1892. 33..44..22..  mmaann ssyysstteemm
  1893.  
  1894.      The manual system continues to track the changes  going
  1895. on  in 4BSD.  I'm not convinced the new setup is better, but
  1896. it does seem to be the method of the moment.  The  setup  is
  1897. essentially  the  same as that in the 44..33BBSSDD--TTAAHHOOEE distribu-
  1898. tion with the manual source in /usr/src/man.
  1899.  
  1900. 33..44..33..  NNMMOOUUNNTT lloowweerreedd
  1901.  
  1902.      The value of NNMMOOUUNNTT in _/_s_y_s_/_h_/_p_a_r_a_m_._h is set  to  5  in
  1903. the  distribution  system.   This will be too small for many
  1904. sites.  Since each mount table entry costs about  440  bytes
  1905. of  valuable  kernel  dataspace this number should be chosen
  1906. with care.  See Appendix A for  an  explanation  of  how  to
  1907. reconfigure NNMMOOUUNNTT..
  1908.  
  1909.  
  1910.  
  1911.  
  1912.                         17 March 1998
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918. setup.2.11 - 30Installing and Operating 2.11BSD on the PDP-11
  1919.  
  1920.  
  1921. 33..44..44..  SShhaaddooww ppaasssswwoorrddss
  1922.  
  1923.      The May 1989 release of the 4.3BSD shadow password file
  1924. has been ported to 2.11BSD.  Password aging is  also  imple-
  1925. mented.
  1926.  
  1927. 33..44..55..  NNeeww //eettcc//rrcc ssttaarrttuupp ssccrriippttss
  1928.  
  1929.      _/_e_t_c_/_r_c  and _/_e_t_c_/_r_c_._l_o_c_a_l have changed fairly signifi-
  1930. cantly, and
  1931.  
  1932.      _/_e_t_c_/_n_e_t_s_t_a_r_t has been added to configure site specific
  1933. network  features  (much  of  this  was  pulled from the old
  1934. rc.local).  _/_e_t_c_/_n_e_t_s_t_a_r_t  uses  the  tiny  program  _t_e_s_t_n_e_t
  1935. which attempts to create a socket and prints NO on stdout if
  1936. an error is returned by the kernel,  YES  if  no  error  was
  1937. returned.
  1938.  
  1939. 33..44..66..  mmkkffss,, mmkkpprroottoo,, mmkklloosstt++ffoouunndd
  1940.  
  1941.      _m_k_f_s(8) no longer can populate a filesystem with files.
  1942. The 4.3BSD versions of _m_k_f_s(8) and _m_k_p_r_o_t_o(8) were ported to
  1943. 2.11BSD.   There  is  a  limit on the size of the file which
  1944. _m_k_p_r_o_t_o(8) can place on a newly  created  filesystem.   Only
  1945. files  up  to single indirect (about 260kb) may be copied at
  1946. this time.
  1947.  
  1948.      _m_k_l_o_s_t_+_f_o_u_n_d(8) is a ported version  from  4.3BSD,  the
  1949. only  change being to use 63 character file names (MAXNAMLEN
  1950. is  63  at  this  time   in   2.11BSD)   instead   of   255.
  1951. _m_k_l_o_s_t_+_f_o_u_n_d(8) is really not needed, _f_s_c_k(8) is now capable
  1952. of automatically extending lost+found by up to the number of
  1953. direct blocks in an inode.
  1954.  
  1955. 33..44..77..  //eettcc//ddiisskkttaabb
  1956.  
  1957.      The  format  of /etc/disktab is now the same as 4.3BSD-
  1958. Reno and 4.4BSD.  Previously to describe a  drive  (an  RM03
  1959. for example) the /etc/disktab file had entries of the form:
  1960.  
  1961. :ty=removable:ns#32:nt#5:nc#823:sf:
  1962. :b0=/mdec/rm03uboot:
  1963. :pa#9600:ba#1024:fa#1024:
  1964. :pb#9600:bb#1024:fb#1024:
  1965. :pc#131520:bc#1024:fc#1024:
  1966. :pf#121920:bf#1024:ff#1024:
  1967. :pg#112320:bg#1024:fg#1024:
  1968. :ph#131520:bh#1024:fh#1024:
  1969.  
  1970. Note  that there is no information at all about which cylin-
  1971. der a partition starts at or which  partitions  overlap  and
  1972. may  not  be used simultaneously.  That information was kept
  1973. in tables in the driver.  If you  modified  /etc/disktab  it
  1974. would  have  no  effect without also changing the driver and
  1975.  
  1976.  
  1977.  
  1978.                         17 March 1998
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984. Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 31
  1985.  
  1986.  
  1987. recompiling the kernel.
  1988.  
  1989. The new /etc/disktab file looks like this:
  1990.  
  1991. :ty=removable:ns#32:nt#5:nc#823:sf:
  1992. :b0=/mdec/rm03uboot:
  1993. :pa#9600:oa#0:ba#1024:fa#1024:ta=2.11BSD:
  1994. :pb#9600:ob#9600:bb#1024:fb#1024:tb=swap:
  1995. :pc#131520:oc#0:bc#1024:fc#1024:
  1996. :pf#121920:of#9600:bf#1024:ff#1024:tf=2.11BSD:
  1997. :pg#112320:og#19200:bg#1024:fg#1024:tg=2.11BSD:
  1998. :ph#131520:oh#0:bh#1024:fh#1024:th=2.11BSD
  1999.  
  2000.  
  2001.      There are two new fields per partition,  the  'o'  (oa,
  2002. ob,  usw.)  field  specifies  the offset in sectors that the
  2003. partition begins at.  The 't' field specifies the  partition
  2004. type.   Only those partitions which are 22..1111BBSSDD will be rec-
  2005. ognized by _n_e_w_f_s(8) and the kernel as filesystems.  The ker-
  2006. nel  also will not swap or place a crash dump on a partition
  2007. that is not of type sswwaapp.
  2008.  
  2009.      The two examples above are equivalent  and  provide  an
  2010. example  of  a translating an old style disktab entry into a
  2011. new style entry.  To translate a customized disktab  entries
  2012. you  will  need:  1) a copy of your current partition tables
  2013. from the device driver, 2) a copy of the old disktab  entry,
  2014. 3) your current /etc/fstab file.  In new disktab entries you
  2015. should only place those partitions you actually use.   There
  2016. is  no  need  to declare (as was done in the examples above)
  2017. all of the possible partitions.
  2018.  
  2019.      If you have changed the disk partition sizes,  be  sure
  2020. to  make  the  necessary /etc/disktab changes and label your
  2021. disks BEFORE trying to access any of your old file  systems!
  2022. There  are  two  ways  to  label your disks.  The standalone
  2023. disklabel program is one way.  It is also possible to  label
  2024. disks  using  _d_i_s_k_l_a_b_e_l(8)  with  the -r option - this works
  2025. even when running on a kernel which does not support  labels
  2026. (-r  reads  and  writes the raw disk, thus it is possible to
  2027. label disks on an older kernel as long as  the  _d_i_s_k_l_a_b_e_l(8)
  2028. program is present).
  2029.  
  2030.  
  2031.  
  2032.  
  2033.  
  2034.  
  2035.  
  2036.  
  2037.  
  2038.  
  2039.  
  2040.  
  2041.  
  2042.  
  2043.  
  2044.                         17 March 1998
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050. setup.2.11 - 32Installing and Operating 2.11BSD on the PDP-11
  2051.  
  2052.  
  2053.                       44.. SSYYSSTTEEMM SSEETTUUPP
  2054.  
  2055.  
  2056.  
  2057.      This  section  describes  procedures  used  to set up a
  2058. PDP-11 UNIX system.  These procedures are used when a system
  2059. is first installed or when the system configuration changes.
  2060. Procedures for normal system operation are described in  the
  2061. next section.
  2062.  
  2063. 44..11..  CCrreeaattiinngg aa UUNNIIXX bboooott
  2064.  
  2065.      _/_b_o_o_t uses the device information passed to it from the
  2066. bootstrap in determining the device, unit and file to  load.
  2067. If  an  autoreboot is being done the kernel will have passed
  2068. the device information to the bootstrap as well  as  setting
  2069. the autoreboot flag.
  2070.  
  2071.      _/_b_o_o_t  does not require recompilation to adapt to a new
  2072. autoreboot device.
  2073.  
  2074. 44..22..  KKeerrnneell ccoonnffiigguurraattiioonn
  2075.  
  2076.      This section briefly describes the layout of the kernel
  2077. code and how files for devices are made.
  2078.  
  2079. 44..22..11..  KKeerrnneell oorrggaanniizzaattiioonn
  2080.  
  2081.      As  distributed, the kernel source is in a separate tar
  2082. image.  The source may be physically located anywhere within
  2083. any  file  system so long as a symbolic link to the location
  2084. is created for the file /sys (many files in /usr/include are
  2085. normally  symbolic links relative to /sys).  In further dis-
  2086. cussions of the system source all path names will  be  given
  2087. relative to /sys.
  2088.  
  2089.      The  directory  /sys/sys  contains the mainline machine
  2090. independent operating system code.  Files within this direc-
  2091. tory are conventionally named with the following prefixes:
  2092.  
  2093.  
  2094.      init_        system initialization
  2095.      kern_        kernel (authentication, process management, etc.)
  2096.      quota_       kernel portion of disk quota system
  2097.      subr_        misc. subroutines used throughout the kernel
  2098.      sys_         system calls and the like
  2099.      tty_         terminal handling
  2100.      ufs_         file system
  2101.      uipc_        interprocess communication
  2102.      vm_          memory management
  2103.  
  2104.  
  2105.  
  2106.  
  2107.  
  2108.  
  2109.  
  2110.                         17 March 1998
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116. Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 33
  2117.  
  2118.  
  2119.      The remaining directories are organized as follows:
  2120.  
  2121.  
  2122.      /sys/h         machine independent include files
  2123.      /sys/conf      site configuration files and basic templates
  2124.      /sys/net       network independent, but network related code
  2125.      /sys/netinet   DARPA Internet code
  2126.      /sys/netimp    IMP support code
  2127.      /sys/netns     Xerox NS support code
  2128.      /sys/pdp       PDP-11 specific mainline code
  2129.      /sys/pdpif     PDP-11 network interface code
  2130.      /sys/pdpmba    PDP-11 MASSBUS device drivers and related code
  2131.      /sys/pdpuba    PDP-11 UNIBUS device drivers and related code
  2132.  
  2133.  
  2134.  
  2135.      Many   of  these  directories  are  referenced  through
  2136. /usr/include   with   symbolic    links.     For    example,
  2137. /usr/include/sys  is  a symbolic link to /sys/h.  The system
  2138. code, as distributed, is mostly independent of  the  include
  2139. files  in /usr/include.  Unfortunately not all references to
  2140. /usr/include have been eradicated, so compiling  the  system
  2141. requires the /usr file system to be mounted.
  2142.  
  2143. 44..22..22..  DDeevviicceess aanndd ddeevviiccee ddrriivveerrss
  2144.  
  2145.      Devices supported by UNIX are implemented in the kernel
  2146. by drivers whose source is kept in /sys/pdp, /sys/pdpuba, or
  2147. /sys/pdpmba.   These drivers are loaded into the system when
  2148. included in a cpu specific configuration file  kept  in  the
  2149. conf  directory.  Devices are accessed through special files
  2150. in the file system, made by the _m_k_n_o_d(8)  program  and  nor-
  2151. mally  kept in the /dev directory.  For all the devices sup-
  2152. ported by the distribution system, the  files  in  /dev  are
  2153. created by the /dev/MAKEDEV shell script.
  2154.  
  2155.      Determine the set of devices that you have and create a
  2156. new /dev directory by running  the  MAKEDEV  script.   First
  2157. create  a  new directory /newdev, copy MAKEDEV into it, edit
  2158. the file MAKEDEV.local to provide an entry for local  needs,
  2159. and  run  it to generate a /newdev directory.  For instance,
  2160. if your machine has a single DZ11, a single  DH11,  an  RM03
  2161. disk,  an  EMULEX  UNIBUS SMD disk controller, an AMPEX 9300
  2162. disk, and a TE16 tape drive you would do:
  2163.  
  2164.      ## cd /
  2165.      ## mkdir newdev
  2166.      ## cp dev/MAKEDEV newdev/MAKEDEV
  2167.      ## cd newdev
  2168.      ## MAKEDEV dz0 dh0 xp0 xp1 ht0 std LOCAL
  2169.  
  2170. Note the ``std'' argument causes standard  devices  such  as
  2171. _/_d_e_v_/_c_o_n_s_o_l_e,  the  machine  console,  _/_d_e_v_/_n_u_l_l,  _/_d_e_v_/_t_t_y,
  2172. _/_d_e_v_/_k_l_o_g, etc.  to be created.
  2173.  
  2174.  
  2175.  
  2176.                         17 March 1998
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182. setup.2.11 - 34Installing and Operating 2.11BSD on the PDP-11
  2183.  
  2184.  
  2185.      You can then do
  2186.  
  2187.      ## cd /
  2188.      ## mv dev olddev ; mv newdev dev
  2189.      ## sync
  2190.  
  2191. to  install the new device directory.|^ As distributed almost
  2192. all of the device nodes are already present and you may wish
  2193. to  remove  unused entries from /dev to speed up scanning of
  2194. the directory.  The  terminal  nodes  are  almost  certainly
  2195. incorrect  for  your  site  and  will need to be deleted and
  2196. recreated.  Directly connected  terminals  should  have  the
  2197. softcarrier  bit  on  in  their minor device numbers.  Since
  2198. MAKEDEV by default creates terminal (dh, dz, etc) nodes with
  2199. the  softcarrier bit off you will have to delete those nodes
  2200. and recreate those terminal nodes which  are  directly  con-
  2201. nected:
  2202.  
  2203.      ## cd /dev
  2204.      ## rm ttyh0
  2205.      ## mknod ttyh0 c 3 128
  2206.  
  2207.  
  2208. 44..22..33..  BBuuiillddiinngg nneeww ssyysstteemm iimmaaggeess
  2209.  
  2210.      The   kernel  configuration  of  each  UNIX  system  is
  2211. described by a single  configuration  file,  stored  in  the
  2212. _/_s_y_s_/_c_o_n_f directory.  The format of this file is very simple
  2213. consisting of lines starting with an _i_d_e_n_t_i_f_i_e_r followed  by
  2214. a  _v_a_l_u_e.   Blank lines and anything past a ``#'' (including
  2215. the #) are comments.  This file is processed  by  the  shell
  2216. script  _c_o_n_f_i_g  in  the same directory.  The manual pages in
  2217. section 4 of the UNIX manual specify the configuration lines
  2218. necessary for various devices.  A comprehensive list of sys-
  2219. tem options with descriptions of their meanings and  effects
  2220. can be found in appendix A.
  2221.  
  2222.      The  configuration  file  _G_E_N_E_R_I_C in the conf directory
  2223. was used to build the generic distribution kernel.  To build
  2224. a  local configuration file, copy GENERIC to a new file _S_Y_S_-
  2225. _T_E_M, edit _S_Y_S_T_E_M for your local  system  configuration,  and
  2226. then type "./config _S_Y_S_T_E_M".  This will create the directory
  2227. _._._/_S_Y_S_T_E_M and copy specially edited files into based on  the
  2228. definitions in _S_Y_S_T_E_M.  Change directory into the new system
  2229. directory and type "make all".|^,
  2230.  
  2231.  
  2232.  
  2233.  
  2234. -----------
  2235. |^ You must  reboot  your  system  before  you  can
  2236.   remove the /olddev directory.
  2237. |^ note that non-separate systems are not currently
  2238.   supported
  2239.  
  2240.  
  2241.  
  2242.                         17 March 1998
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248. Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 35
  2249.  
  2250.  
  2251.      ## cp GENERIC _S_Y_S_T_E_M
  2252.      ## TERM=_t_e_r_m_i_n_a_l___t_y_p_e; export TERM
  2253.      ## vi _S_Y_S_T_E_M
  2254.      ## ./config _S_Y_S_T_E_M
  2255.      ## cd ../_S_Y_S_T_E_M
  2256.      ## make
  2257.  
  2258.  
  2259.      Note  that  the  overlay  scheme in the Makefile copied
  2260. into the new system directory may fail  because  either  the
  2261. _b_a_s_e  _s_e_g_m_e_n_t is too small, too large or one or more _o_v_e_r_l_a_y
  2262. _s_e_g_m_e_n_t_s are too large.  If this happens the system  objects
  2263. will  have  to  be  re-arranged in the _b_a_s_e and _o_v_e_r_l_a_y seg-
  2264. ments.  The comments in the Makefile should make  it  fairly
  2265. clear  what  the restrictions on object placement are in the
  2266. system.
  2267.  
  2268.      The  configured system image ``unix''|= should be copied
  2269. to the root, and then booted to try it out.  It is  best  to
  2270. save the old kernel to a known name so as not to destroy the
  2271. working system until you're sure the new one does work.   It
  2272. is an bbeetttteerr idea to have a non network kernel (/emergencyu-
  2273. nix) always kept on the system:
  2274.  
  2275.      ## cp /unix /oldunix
  2276.      ## make install
  2277.      ## sync
  2278.  
  2279. To boot the new version of the system you should follow  the
  2280. bootstrap  procedures outlined in section titled ``BBoooottssttrraapp
  2281. aanndd sshhuuttddoowwnn pprroocceedduurreess'' A systematic scheme for  numbering
  2282. and saving old versions of the system may be useful.
  2283.  
  2284. 44..33..  DDiisskk ccoonnffiigguurraattiioonn
  2285.  
  2286.      This  section  describes  how to layout file systems to
  2287. make use of the available space and to balance disk load for
  2288. better system performance.
  2289.  
  2290. 44..33..11..  DDiisskk nnaammiinngg aanndd ddiivviissiioonnss
  2291.  
  2292.      Each  physical  disk  drive can be divided into up to 8
  2293. partitions; UNIX typically uses only 3 or 4 partitions.  For
  2294. instance,  on an RP06 the first partition, xp0a, is used for
  2295. a root file system, a backup thereof, or a small file system
  2296. like, /tmp; the second partition, xp0b, is used for swapping
  2297. or a small file system; and a combination of  the  remaining
  2298. partitions  (xp0d,  xp0e,  xp0f, xp0g, xp0h) would hold user
  2299. file systems.
  2300.  
  2301.  
  2302. -----------
  2303. |= on networked systems there are two images  _u_n_i_x,
  2304.   and _n_e_t_n_i_x.
  2305.  
  2306.  
  2307.  
  2308.                         17 March 1998
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314. setup.2.11 - 36Installing and Operating 2.11BSD on the PDP-11
  2315.  
  2316.  
  2317.           WWaarrnniinngg::  for disks on which DEC standard 144  bad
  2318.      sector  forwarding  is supported, the last track and up
  2319.      to 126 preceding sectors  contain  replacement  sectors
  2320.      and  bad  sector  lists.  Disk-to-disk copies should be
  2321.      careful to avoid  overwriting  this  information.   See
  2322.      _b_a_d_1_4_4(8).  Bad sector forwarding is optional in the hhkk
  2323.      and  xxpp  drivers.   The  partition  sizes   listed   in
  2324.      _/_e_t_c_/_d_i_s_k_t_a_b  that  _n_e_w_f_s(8) uses automatically reserve
  2325.      the maximum amount of room that  may  be  used  by  bad
  2326.      block forwarding on a disk.
  2327.  
  2328.           Note  also  that bad144 style bad block forwarding
  2329.      _c_a_n _n_o_t be used with SI controllers on the xp driver as
  2330.      the  controllers  use their own internal scheme for bad
  2331.      block forwarding, and you can in fact make  your  disks
  2332.      unusable on the SI controllers if you write anything in
  2333.      the  last  five  cylinders.   The  partition  sizes  in
  2334.      _/_e_t_c_/_d_i_s_k_t_a_b also handle this constraint automatically.
  2335.  
  2336.           The generic distribution kernel does  not  do  bad
  2337.      block forwarding.  There is unfortunately no way to run
  2338.      bad144 style bad  block  forwarding  on  some  of  your
  2339.      disks,  but  not others.  As a final bug, the hk and xp
  2340.      drivers do not reread the bad sector forwarding  infor-
  2341.      mation  when  disk  packs are changed and so will erro-
  2342.      neously use bad block forwarding information  from  the
  2343.      wrong packs!
  2344.  
  2345.  
  2346.      The space available on a disk varies, not surprisingly,
  2347. per device.  Disklabels make a table giving  sizes  meaning-
  2348. less  since there are no predefined partition sizes embedded
  2349. in the kernel any longer.  The root filesystem (aa)  must  be
  2350. at  least  4Mb,  preferably  6 to 7Mb if possible.  The swap
  2351. area (almost always the bb partition) should be about 3Mb  or
  2352. so.   If  your  system has a small amount (less than 2Mb) of
  2353. memory you will need more swap space, perhaps 4 or 5Mb.   It
  2354. is  a  rare  case  where more than 5 or 6Mb of swap space is
  2355. required.   The system will run out of  other  resources  by
  2356. the time enough activity is generated to need that much swap
  2357. space.
  2358.  
  2359.      The system (boot) disk has a swapping area and  a  root
  2360. file  system.   Other  drives  may  use those partitions for
  2361. data.  RReemmeemmbbeerr:: the aa partition must start at sector  0  or
  2362. _d_i_s_k_l_a_b_e_l(8)  or  else  the  kernel  will  not  be  able  to
  2363. read/write the label.
  2364.  
  2365.      The  distributed  system  binaries  occupy   about   34
  2366. Megabytes   while   the  major  sources  occupy  another  36
  2367. Megabytes.  Adding  in  the  miscellaneous  sources,  a  few
  2368. locate works of art bring the total for a complete system to
  2369. about 90 Megabytes.  This overflows RK07, RL02 and RM03 sys-
  2370. tems, but fits easily on most other hardware configurations.
  2371.  
  2372.  
  2373.  
  2374.                         17 March 1998
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380. Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 37
  2381.  
  2382.  
  2383. 2.11BSD is quite happy on RD54 or  larger.   Simply  fitting
  2384. the  distribution  isn't  enough,  there must still be space
  2385. left for user files, objects when compiling programs, spool-
  2386. ing directories, usw.
  2387.  
  2388.      Be  aware  that  the disks have their sizes measured in
  2389. disk sectors (512 bytes), while the UNIX file system  blocks
  2390. are  1024  bytes  each.   Thus if a disk partition has 10000
  2391. sectors (disk blocks), it will have only 5000 UNIX file sys-
  2392. tem blocks, and you _m_u_s_t divide by 2 to use 5000 when speci-
  2393. fying the size  to  the  _m_k_f_s  command  for  instance.   The
  2394. _n_e_w_f_s(8)  program  performs  this calculation automatically.
  2395. You should nneevveerr need to run _m_k_f_s manually.  All  user  pro-
  2396. grams report disk space in kilobytes and, where needed, disk
  2397. sizes  are  always  specified  in  units  of  sectors.   The
  2398. /etc/disktab file used in making file systems specifies disk
  2399. partition sizes in sectors; the default sector size  may  be
  2400. overridden  with  the  ``se'' attribute.  NNoottee that the only
  2401. sector size  currently  supported  is  NBPG  as  defined  in
  2402. _/_s_y_s_/_p_d_p_/_m_a_c_h_p_a_r_a_m_._h.   This restriction is enforced in sev-
  2403. eral places in  the  disklabeling  process  as  a  safeguard
  2404. against specifying a sector size other than NBPG (512).  Any
  2405. other sector size would produce strange results  and  almost
  2406. certainly curdled filesystems.
  2407.  
  2408. 44..33..22..  LLaayyoouutt ccoonnssiiddeerraattiioonnss
  2409.  
  2410.      There  are  several  considerations  in deciding how to
  2411. adjust the arrangement of things on your  disks.   The  most
  2412. important  is  making  sure that there is adequate space for
  2413. what is required; secondarily, throughput  should  be  maxi-
  2414. mized.   Swap  space  is  an  important  parameter  since it
  2415. defines the maximum process image load that may be run.  If,
  2416. for instance, your swap area were smaller than the amount of
  2417. main memory available after the kernel took its share,  some
  2418. of your memory would never be used.
  2419.  
  2420.      Many  common system programs (C, the editor, the assem-
  2421. bler etc.)  create intermediate files in the /tmp directory,
  2422. so  the file system where this is stored also should be made
  2423. large enough to accommodate most high-water  marks;  if  you
  2424. have  several  disks,  it  makes  sense  to  mount this in a
  2425. ``root'' (i.e. first partition) file system on another disk.
  2426. All  the  programs  that  create  files in /tmp take care to
  2427. delete them, but are not immune to rare events and can leave
  2428. dregs.   The directory should be examined every so often and
  2429. the old files deleted.
  2430.  
  2431.      The efficiency with which UNIX is able to use  the  CPU
  2432. is often strongly affected by the configuration of disk con-
  2433. trollers.  For general time-sharing applications,  the  best
  2434. strategy  is to try to split the most actively-used sections
  2435. among several disk arms.
  2436.  
  2437.  
  2438.  
  2439.  
  2440.                         17 March 1998
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446. setup.2.11 - 38Installing and Operating 2.11BSD on the PDP-11
  2447.  
  2448.  
  2449.      It is critical for good  performance  to  balance  disk
  2450. load.   There  are at least five components of the disk load
  2451. that you can divide between the available disks:
  2452.  
  2453.      1. The root file system.
  2454.      2. The /tmp file system.
  2455.      3. The /usr file system.
  2456.      4. The user files.
  2457.      5. The swapping activity.
  2458.  
  2459. The following possibilities are ones that have been used  at
  2460. times when 2, 3 and 4 disks were available:
  2461.  
  2462.                 +--------------------------+
  2463.                 +----------+---------------+
  2464.                 |          |   | disk|s     |
  2465.                 |what      | 2 | 3   | 4   |
  2466.                 +----------+---+-----+-----+
  2467.                 |/         | 0 | 0   | 0   |
  2468.                 |tmp       | 1 | 2   | 3   |
  2469.                 |usr       | 1 | 1   | 1   |
  2470.                 |swapping|^ | 0 | 2   | 2   |
  2471.                 |users     | 0 | 0+2 | 0+2 |
  2472.                 |archive   | x | x   | 3   |
  2473.                 +----------+---+-----+-----+
  2474.                 +--------------------------+
  2475.      The most important things to consider are to  even  out
  2476. the  disk load as much as possible, and to do this by decou-
  2477. pling file systems (on separate arms)  between  which  heavy
  2478. copying occurs.  Note that a long term average balanced load
  2479. is not important; it is  much  more  important  to  have  an
  2480. instantaneously balanced load when the system is busy.  When
  2481. placing several busy file systems on the same  disk,  it  is
  2482. helpful  to  group  them  together to minimize arm movement,
  2483. with less active file systems off to the side.
  2484.  
  2485.      Intelligent experimentation  with  a  few  file  system
  2486. arrangements  can  pay off in much improved performance.  It
  2487. is particularly easy to move the root, the /tmp file  system
  2488. and  the  swapping  area.  Note, though, that the disks con-
  2489. taining the root and swapping  area  can  never  be  removed
  2490. while  UNIX  is  running.  Place the user files and the /usr
  2491. directory as space needs dictate  and  experiment  with  the
  2492. other, more easily moved file systems.
  2493.  
  2494.  
  2495.  
  2496. -----------
  2497. |^ Note  also,  that only a single swapping area is
  2498.   supported.  The _s_w_a_p_o_n(2) system call and multi-
  2499.   ple  swapping  areas  have  nnoott been implemented
  2500.   under 2.11BSD (yet.  no real need  since  enough
  2501.   other  resources are exhausted by the time a 4mb
  2502.   11/73 needs additional swap space).
  2503.  
  2504.  
  2505.  
  2506.                         17 March 1998
  2507.  
  2508.  
  2509.  
  2510.  
  2511.  
  2512. Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 39
  2513.  
  2514.  
  2515. 44..33..33..  IImmpplleemmeennttiinngg aa llaayyoouutt
  2516.  
  2517.      To put a chosen disk layout into effect, you should use
  2518. the _n_e_w_f_s(8) command to create each new file  system.   Each
  2519. file  system  must  also  be added to the file /etc/fstab so
  2520. that it will be checked and mounted when the system is boot-
  2521. strapped.
  2522.  
  2523.      As  an  example, consider a system with RA80's.  On the
  2524. first RA80, ra0, we will put the root file system  in  ra0a,
  2525. and  the /usr file system in ra0c, which has enough space to
  2526. hold it and then some.  The /tmp directory will be  part  of
  2527. the  root  file system, as no file system will be mounted on
  2528. /tmp.  If we had only one RA80, we would put user  files  in
  2529. the ra0c partition with the system source and binaries.
  2530.  
  2531.      If  we  had a second RA80, we would place _/_u_s_r in ra1c.
  2532. We would put user files in ra0c,  calling  the  file  system
  2533. /mnt.   We  would  put swap on _r_a_0_b.  We would keep a backup
  2534. copy of the root file system in the rraa11aa disk partition  and
  2535. put /tmp on _r_a_1_b.  _/_e_t_c_/_f_s_t_a_b would then contain
  2536.  
  2537.      /dev/ra0a:/:rw:1:1
  2538.      /dev/ra0b::sw::
  2539.      /dev/ra0c:/mnt:rw:1:2
  2540.      /dev/ra1b:/tmp:rw::
  2541.      /dev/ra1c:/usr:rw:1:2
  2542.  
  2543.  
  2544.      To make the /mnt file system we would do:
  2545.  
  2546.      ## cd /dev
  2547.      ## MAKEDEV ra1
  2548.      ## newfs ra1c ra80
  2549.      (information about file system prints out)
  2550.      (to specify an alternate _m value: newfs -m # ra1c ra80)
  2551.      (where # is between 1 and 31)
  2552.      ## mkdir /mnt
  2553.      ## mount /dev/ra1c /mnt
  2554.  
  2555.  
  2556. 44..44..  CCoonnffiigguurriinngg tteerrmmiinnaallss
  2557.  
  2558.      If   UNIX   is  to  support  simultaneous  access  from
  2559. directly-connected terminals other  than  the  console,  the
  2560. file _/_e_t_c_/_t_t_y_s (_t_t_y_s(5)) must be edited.
  2561.  
  2562.      Terminals connected via DZ11 interfaces are convention-
  2563. ally named ttttyyDDDD where DD is a decimal number,  the  ``minor
  2564. device''  number.   The  lines  on dz0 are named /dev/tty00,
  2565. /dev/tty01, ... /dev/tty07.  By convention, all other termi-
  2566. nal  names  are  of the form ttttyyCX, where C is an alphabetic
  2567. character according to the type of terminal multiplexor  and
  2568. its unit number, and X is a digit for the first ten lines on
  2569.  
  2570.  
  2571.  
  2572.                         17 March 1998
  2573.  
  2574.  
  2575.  
  2576.  
  2577.  
  2578. setup.2.11 - 40Installing and Operating 2.11BSD on the PDP-11
  2579.  
  2580.  
  2581. the interface and an increasing lower case  letter  for  the
  2582. rest  of  the  lines.  C is defined for the number of inter-
  2583. faces of each type listed below.  Since tty  structures  are
  2584. approximately 78 bytes each, it is highly doubtful that more
  2585. than 3 or 4 terminal interface boards will ever be  attached
  2586. to a PDP-11 (especially in a BA23 cabinet).
  2587.  
  2588.  
  2589.      +------------------------------------------------------+
  2590.      |Interface                Number of lines   Number of  |
  2591.      |  Type      Characters      per board      Interfaces |
  2592.      +------------------------------------------------------+
  2593.      |DZ11        see above           8              10     |
  2594.      |DH11           h-o             16               8     |
  2595.      |DHU11          S-Z             16               8     |
  2596.      |pty            p-u             16               6     |
  2597.      +------------------------------------------------------+
  2598.  
  2599.  
  2600.      To  add  a  new  terminal device, be sure the device is
  2601. configured into the system and that the  special  files  for
  2602. the device have been made by /dev/MAKEDEV.  Then, enable the
  2603. appropriate lines of /etc/ttys  by  setting  the  ``status''
  2604. field  to  oonn  (or  add  new  lines).   Note  that  lines in
  2605. _/_e_t_c_/_t_t_y_s are one-for-one with entries in the file  of  cur-
  2606. rent users (_/_v_a_r_/_r_u_n_/_u_t_m_p), and therefore it is best to make
  2607. changes while running in single-user mode and to add all  of
  2608. the entries for a new device at once.
  2609.  
  2610.      The format of the /etc/ttys file is the same in 2.11BSD
  2611. as in 2.10BSD and 4.3BSD.  Each line in the file  is  broken
  2612. into  four tab separated fields (comments are shown by a `#'
  2613. character and extend to the end of the line).  For each ter-
  2614. minal  line the four fields are: the device (without a lead-
  2615. ing /dev), the program /etc/init should startup  to  service
  2616. the line (or nnoonnee if the line is to be left alone), the ter-
  2617. minal type (found  in  /etc/termcap),  and  optional  status
  2618. information describing if the terminal is enabled or not and
  2619. if it is ``secure'' (i.e. the super user should  be  allowed
  2620. to  login  on  the  line).  All fields are character strings
  2621. with entries requiring embedded white space enclosed in dou-
  2622. ble quotes.  Thus a newly added terminal /dev/tty00 could be
  2623. added as
  2624.  
  2625.      tty00     "/usr/libexec/getty std.9600" vt100     on secure # Steve's office
  2626.  
  2627. The std.9600 parameter  provided  to  /usr/libexec/getty  is
  2628. used  in  searching  the  file /etc/gettytab; it specifies a
  2629. terminal's characteristics (such as  baud  rate).   To  make
  2630. custom  terminal types, consult _g_e_t_t_y_t_a_b(5) before modifying
  2631. /etc/gettytab.
  2632.  
  2633.      Dialup terminals should be wired  so  that  carrier  is
  2634. asserted  only  when  the phone line is dialed up.  For non-
  2635.  
  2636.  
  2637.  
  2638.                         17 March 1998
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644. Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 41
  2645.  
  2646.  
  2647. dialup terminals from which modem control is not  available,
  2648. you  must  either  wire back the signals so that the carrier
  2649. appears to always be present, or show in  the  minor  device
  2650. number that carrier is to be assumed to be present by adding
  2651. 128 decimal to the minor device  number  when  creating  the
  2652. device node.  This differs from 4.3BSD where the softcarrier
  2653. state is specified at kernel configuration time.
  2654.  
  2655.      For network terminals (i.e. pseudo terminals), no  pro-
  2656. gram  should  be  started up on the lines.  Thus, the normal
  2657. entry in /etc/ttys would look like
  2658.  
  2659.      ttyp0     none network
  2660.  
  2661. (Note the fourth field is not needed here.)
  2662.  
  2663.      When the system is running  multi-user,  all  terminals
  2664. that  are  listed  in  /etc/ttys  as  oonn have their line are
  2665. enabled.  If, during normal operations,  it  is  desired  to
  2666. disable  a terminal line, you can edit the file /etc/ttys to
  2667. change the terminal's status to ooffff and then send  a  hangup
  2668. signal to the _i_n_i_t process, by doing
  2669.  
  2670.      ## kill -1 1
  2671.  
  2672. Terminals  can  similarly  be enabled by changing the status
  2673. field from ooffff to oonn and sending a hangup signal to _i_n_i_t.
  2674.  
  2675.      Note that if a special file is inaccessible  when  _i_n_i_t
  2676. tries to create a process for it, init will log a message to
  2677. the system error logging process (/usr/sbin/syslogd) and try
  2678. to  reopen the terminal every minute, reprinting the warning
  2679. message every 10 minutes.  Messages of this  sort  are  nor-
  2680. mally printed on the console, though other actions may occur
  2681. depending  on  the  configuration   information   found   in
  2682. /etc/syslog.conf.
  2683.  
  2684.      Finally  note  that  you should change the names of any
  2685. dialup terminals to ttyd?  where ?  is  in  [0-9a-zA-Z],  as
  2686. some programs use this property of the names to determine if
  2687. a terminal is a dialup.  Shell commands to do this should be
  2688. put in the /dev/MAKEDEV.local script.
  2689.  
  2690. 44..55..  AAddddiinngg uusseerrss
  2691.  
  2692.      New  users  can be added to the system by adding a line
  2693. to the password file /etc/passwd.  The procedure for  adding
  2694. a new user is described in _a_d_d_u_s_e_r(8).
  2695.  
  2696.      You should add accounts for the initial user community,
  2697. giving each a directory and a password,  and  putting  users
  2698. who will wish to share software in the same groups.
  2699.  
  2700.  
  2701.  
  2702.  
  2703.  
  2704.                         17 March 1998
  2705.  
  2706.  
  2707.  
  2708.  
  2709.  
  2710. setup.2.11 - 42Installing and Operating 2.11BSD on the PDP-11
  2711.  
  2712.  
  2713.      Several  guest  accounts have been provided on the dis-
  2714. tribution system; these accounts are for people at Berkeley,
  2715. Bell  Laboratories,  and  others who have done major work on
  2716. UNIX in the past.  You can delete these accounts,  or  leave
  2717. them  on  the  system  if you expect that these people would
  2718. have occasion to login as guests on your system.
  2719.  
  2720. 44..66..  SSiittee ttaaiilloorriinngg
  2721.  
  2722.      All programs that require the site's name, or some sim-
  2723. ilar  characteristic,  obtain the information through system
  2724. calls or from files located in /etc.  Aside  from  parts  of
  2725. the  system  related to the network, to tailor the system to
  2726. your site you must simply select a site name, then edit  the
  2727. file
  2728.  
  2729.      /etc/netstart
  2730.  
  2731. At  or about line 25 in /etc/netstart you should find a line
  2732. similar to:
  2733.  
  2734.      /bin/hostname _m_y_n_a_m_e_._m_y_._d_o_m_a_i_n
  2735.  
  2736. defines the value  returned  by  the  _g_e_t_h_o_s_t_n_a_m_e(2)  system
  2737. call.   Your  hostname should be your fully qualified domain
  2738. name.  Programs such as _g_e_t_t_y(8), _m_a_i_l(1), _w_a_l_l(1), _u_u_c_p(1),
  2739. and  _w_h_o(1)  use  this system call so that the binary images
  2740. are site independent.
  2741.  
  2742. 44..77..  SSeettttiinngg uupp tthhee mmaaiill ssyysstteemm
  2743.  
  2744.      The mail system consists of the following commands:
  2745.  
  2746.  
  2747.      /bin/mail             old standard mail program, _b_i_n_m_a_i_l(1)
  2748.      /usr/ucb/mail         UCB mail program, described in _m_a_i_l(1)
  2749.      /usr/sbin/sendmail    mail routing program
  2750.      /usr/spool/mail       mail spooling directory
  2751.      /etc/aliases          mail forwarding information
  2752.      /usr/bin/newaliases   command to rebuild binary forwarding database
  2753.      /usr/ucb/biff         mail notification enabler|^
  2754.      /usr/libexec/comsat   mail notification daemon|^
  2755.  
  2756.  
  2757. Mail is normally sent and received using  the  _m_a_i_l(1)  com-
  2758. mand,  which  provides a front-end to edit the messages sent
  2759. and received, and passes the  messages  to  _s_e_n_d_m_a_i_l(8)  for
  2760. routing.   The  routing algorithm uses knowledge of the net-
  2761. work name syntax, aliasing and forwarding  information,  and
  2762. network  topology,  as  defined  in  the  configuration file
  2763. /etc/sendmail.cf, to process each piece of mail.  Local mail
  2764. is delivered by giving it to the program /bin/mail that adds
  2765. it     to     the     mailboxes     in     the     directory
  2766. /usr/spool/mail/_u_s_e_r_n_a_m_e,  using a locking protocol to avoid
  2767.  
  2768.  
  2769.  
  2770.                         17 March 1998
  2771.  
  2772.  
  2773.  
  2774.  
  2775.  
  2776. Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 43
  2777.  
  2778.  
  2779. problems with  simultaneous  updates.   After  the  mail  is
  2780. delivered,     the     local     mail     delivery    daemon
  2781. /usr/libexec/comsat is  notified,  which  in  turn  notifies
  2782. users  who  have  issued  a ``_b_i_f_f y'' command that mail has
  2783. arrived|^.
  2784.  
  2785.      To  set  up  the  mail  facility  you  should  read the
  2786. instructions  in  the  file   READ_ME   in   the   directory
  2787. /usr/src/usr.lib/sendmail and then adjust the necessary con-
  2788. figuration  files.   You  should  also  set  up   the   file
  2789. /etc/aliases  for your installation, creating mail groups as
  2790. appropriate.  Documents describing _s_e_n_d_m_a_i_l's operation  and
  2791. installation are also included on the distribution tape.
  2792.  
  2793. 44..77..11..  SSeettttiinngg uupp aa UUUUCCPP ccoonnnneeccttiioonn
  2794.  
  2795.      The  version of _u_u_c_p included in 2.11BSD is an enhanced
  2796. version of the one originally distributed with  32/V|^.   The
  2797. enhancements include:
  2798.  
  2799. +o  support  for many auto call units and dialers in addition
  2800.    to the DEC DN11,
  2801.  
  2802. +o  breakup of the spooling area  into  multiple  subdirecto-
  2803.    ries,
  2804.  
  2805. +o  addition of an _L_._c_m_d_s file to control the set of commands
  2806.    that may be executed by a remote site,
  2807.  
  2808. +o  enhanced ``expect-send'' sequence capabilities when  log-
  2809.    ging in to a remote site,
  2810.  
  2811. +o  new  commands  to  be used in polling sites and obtaining
  2812.    snap shots of _u_u_c_p activity,
  2813.  
  2814. +o  additional protocols for different communication media.
  2815.  
  2816. This section gives a brief overview of _u_u_c_p and  points  out
  2817. the most important steps in its installation.
  2818.  
  2819.      To  connect  two UNIX machines with a _u_u_c_p network link
  2820. using modems, one site must have an automatic call unit  and
  2821. the  other  must  have  a dialup port.  It is better if both
  2822. sites have both.
  2823.  
  2824.  
  2825. -----------
  2826. |^ comsat and biff are only available under systems
  2827.   configured for networking support.
  2828. |^ The _u_u_c_p included in this  distribution  is  the
  2829.   result  of  work  by  many people; we gratefully
  2830.   acknowledge  their  contributions,  but  refrain
  2831.   from mentioning names in the interest of keeping
  2832.   this document current.
  2833.  
  2834.  
  2835.  
  2836.                         17 March 1998
  2837.  
  2838.  
  2839.  
  2840.  
  2841.  
  2842. setup.2.11 - 44Installing and Operating 2.11BSD on the PDP-11
  2843.  
  2844.  
  2845.      You should first read the paper in the UNIX System Man-
  2846. ager's  Manual:  ``Uucp  Implementation  Description''.   It
  2847. describes in detail the file formats  and  conventions,  and
  2848. will  give  you a little context.  In addition, the document
  2849. ``setup.tblms'',     located      in      the      directory
  2850. /usr/src/usr.bin/uucp/UUAIDS, may be of use in tailoring the
  2851. software to your needs.
  2852.  
  2853.      The _u_u_c_p support is located in three major directories:
  2854. /usr/bin, /etc/uucp, and /usr/spool/uucp.  User commands are
  2855. kept in /usr/bin, operational  commands  in  /etc/uucp,  and
  2856. /usr/spool/uucp is used as a spooling area.  The commands in
  2857. /usr/bin are:
  2858.  
  2859.  
  2860.      /usr/bin/uucp       file-copy command
  2861.      /usr/bin/uux        remote execution command
  2862.      /usr/bin/uusend     binary file transfer using mail
  2863.      /usr/bin/uuencode   binary file encoder (for _u_u_s_e_n_d)
  2864.      /usr/bin/uudecode   binary file decoder (for _u_u_s_e_n_d)
  2865.      /usr/bin/uulog      scans session log files
  2866.      /usr/bin/uusnap     gives a snap-shot of _u_u_c_p activity
  2867.      /usr/bin/uupoll     polls remote system until an answer is received
  2868.      /usr/bin/uuname     prints a list of known uucp hosts
  2869.      /usr/bin/uuq        gives information about the queue
  2870.  
  2871.  
  2872. The important files and commands in /etc/uucp are:
  2873.  
  2874.  
  2875.      /etc/uucp/L-devices     list of dialers and hard-wired lines
  2876.      /etc/uucp/L-dialcodes   dialcode abbreviations
  2877.      /etc/uucp/L.aliases     hostname aliases
  2878.      /etc/uucp/L.cmds        commands remote sites may execute
  2879.      /etc/uucp/L.sys         systems to communicate with, how to connect, and when
  2880.      /etc/uucp/SEQF          sequence numbering control file
  2881.      /etc/uucp/USERFILE      remote site pathname access specifications
  2882.      /usr/sbin/uucico        _u_u_c_p protocol daemon
  2883.      /etc/uucp/uuclean       cleans up garbage files in spool area
  2884.      /usr/libexec/uuxqt      _u_u_c_p remote execution server
  2885.  
  2886.  
  2887. while the spooling area  contains  the  following  important
  2888. files and directories:
  2889.  
  2890.  
  2891.  
  2892.  
  2893.  
  2894.  
  2895.  
  2896.  
  2897.  
  2898.  
  2899.  
  2900.  
  2901.  
  2902.                         17 March 1998
  2903.  
  2904.  
  2905.  
  2906.  
  2907.  
  2908. Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 45
  2909.  
  2910.  
  2911.      /usr/spool/uucp/C.           directory for command, ``C.'' files
  2912.      /usr/spool/uucp/D.           directory for data, ``D.'', files
  2913.      /usr/spool/uucp/X.           directory for command execution, ``X.'', files
  2914.      /usr/spool/uucp/D._m_a_c_h_i_n_e    directory for local ``D.'' files
  2915.      /usr/spool/uucp/D._m_a_c_h_i_n_eX   directory for local ``X.'' files
  2916.      /usr/spool/uucp/TM.          directory for temporary, ``TM.'', files
  2917.      /usr/spool/uucp/LOGFILE      log file of _u_u_c_p activity
  2918.      /usr/spool/uucp/SYSLOG       log file of _u_u_c_p file transfers
  2919.  
  2920.  
  2921.  
  2922.      To  install  _u_u_c_p  on your system, start by selecting a
  2923. site name.  A _u_u_c_p account must be created in  the  password
  2924. file  and  a  password set up.  Then, create the appropriate
  2925. spooling directories with mode 755 and owned by  user  _u_u_c_p,
  2926. group _d_a_e_m_o_n.
  2927.  
  2928.      If  you have an auto-call unit, the L.sys, L-dialcodes,
  2929. and L-devices files  should  be  created.   The  L.sys  file
  2930. should   contain  the  phone  numbers  and  login  sequences
  2931. required to establish a connection with  a  _u_u_c_p  daemon  on
  2932. another machine.  For example, my L.sys file looks something
  2933. like:
  2934.  
  2935.  
  2936.      elisa Any ACU 1200 7064297  "" \\r\\c ogin-EOT-ogin-\\r\\c-ogin xelisa assword: XXX
  2937.      etn-ra Any ACU 1200 8891237  "" \\r\\c ogin nuucp assword XXX
  2938.      anagld Never ACU 2400 8894517 name:-EOT-name: uucp assword: XXX
  2939.  
  2940.  
  2941. The first field is the name of a site, the second shows when
  2942. the machine may be called, the third field specifies how the
  2943. host is connected (through an ACU, a hard-wired line, etc.),
  2944. then  comes the phone number to use in connecting through an
  2945. auto-call unit, and finally a  login  sequence.   The  phone
  2946. number  may contain common abbreviations that are defined in
  2947. the L-dialcodes file.  The device specification should refer
  2948. to  devices  specified  in the L-devices file.  Listing only
  2949. ACU causes the _u_u_c_p daemon, _u_u_c_i_c_o, to search for any avail-
  2950. able  auto-call  unit in L-devices.  Our L-dialcodes file is
  2951. of the form:
  2952.  
  2953.      ny   1-315-
  2954.      nj   1-201-
  2955.      bostn     1-617-
  2956.  
  2957. while our L-devices file is:
  2958.  
  2959.      ACU cul0 unused 1200 ventel
  2960.  
  2961. Refer to the README file in the _u_u_c_p  source  directory  for
  2962. more information about installation.
  2963.  
  2964.  
  2965.  
  2966.  
  2967.  
  2968.                         17 March 1998
  2969.  
  2970.  
  2971.  
  2972.  
  2973.  
  2974. setup.2.11 - 46Installing and Operating 2.11BSD on the PDP-11
  2975.  
  2976.  
  2977.      As  _u_u_c_p  operates  it creates (and removes) many small
  2978. files in the directories underneath /usr/spool/uucp.   Some-
  2979. times files are left undeleted; these are most easily purged
  2980. with the _u_u_c_l_e_a_n program.  The log files  can  grow  without
  2981. bound  unless  trimmed  back;  _u_u_l_o_g  maintains these files.
  2982. Many useful aids in maintaining your _u_u_c_p  installation  are
  2983. included     in     a     subdirectory     UUAIDS    beneath
  2984. /usr/src/usr.bin/uucp.  Peruse this directory and  read  the
  2985. ``setup'' instructions also located there.
  2986.  
  2987.  
  2988.  
  2989.  
  2990.  
  2991.  
  2992.  
  2993.  
  2994.  
  2995.  
  2996.  
  2997.  
  2998.  
  2999.  
  3000.  
  3001.  
  3002.  
  3003.  
  3004.  
  3005.  
  3006.  
  3007.  
  3008.  
  3009.  
  3010.  
  3011.  
  3012.  
  3013.  
  3014.  
  3015.  
  3016.  
  3017.  
  3018.  
  3019.  
  3020.  
  3021.  
  3022.  
  3023.  
  3024.  
  3025.  
  3026.  
  3027.  
  3028.  
  3029.  
  3030.  
  3031.  
  3032.  
  3033.  
  3034.                         17 March 1998
  3035.  
  3036.  
  3037.  
  3038.  
  3039.  
  3040. Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 47
  3041.  
  3042.  
  3043.                       55.. NNEETTWWOORRKK SSEETTUUPP
  3044.  
  3045.  
  3046.  
  3047.      The following section has been lightly edited to corre-
  3048. spond to the current 2.11BSD networking.  Several  parts  of
  3049. it  do  not  really  apply  to  2.11BSD,  for example, it is
  3050. unlikely that anyone will connect a PDP-11 to an IMP but  it
  3051. is possible as the LH/DH-11 networking interface and the IMP
  3052. modules have been ported and lightly tested, or that  anyone
  3053. will  run  the  nameserver.  The ``correct'' use of the net-
  3054. working in 2.11BSD is probably with a list of the local  net
  3055. addresses  in the _/_e_t_c_/_h_o_s_t_s file and with one default gate-
  3056. way for all network traffic.   In  particular,  do  not  run
  3057. _r_o_u_t_e_d(8)  unless  you're  extremely sure that you know what
  3058. you're doing.  This is doubly true if SL/IP is being used as
  3059. the  primary  connection  to the outside world.  The IMP and
  3060. PRONET drivers are known to work, but long  term  robustness
  3061. is  unknown.  Sites that wish to hook 2.11BSD into more than
  3062. a simple local ethernet may have some work  ahead  of  them.
  3063. If  any additional drivers are ported, I would really like a
  3064. copy.
  3065.  
  3066.      The networking in 2.11BSD,  runs  in  supervisor  mode,
  3067. separate  from the mainstream kernel.  There is room without
  3068. overlaying to hold both a SL/IP and ethernet  driver.   This
  3069. is  a major win, as it allows the networking to maintain its
  3070. mbufs in normal data space, among other  things.   The  net-
  3071. working portion of the kernel resides in ``/netnix'', and is
  3072. loaded after the kernel is running.  Since the  kernel  only
  3073. looks  for  the  file  ``/netnix'', it will not run if it is
  3074. unable to load ``/netnix'' , sites should build and  keep  a
  3075. non-networking  kernel  in  ``/'' at all times, as a backup.
  3076. NNOOTTEE:  The ``/unix'' and ``/netnix'' imagines must have been
  3077. created  at  the same time, do not attempt to use mismatched
  3078. images.   The ability to have bboooott  tell  the  kernel  which
  3079. network image to load is on the wish list (had to have some-
  3080. thing take the place of wishing for disklabels ;-)).
  3081.  
  3082.      2.11BSD provides support for the DARPA standard  Inter-
  3083. net  protocols  IP, ICMP, TCP, and UDP.  These protocols may
  3084. be used on top of a variety of hardware devices ranging from
  3085. the IMP's (PSN's) used in the Internet to local area network
  3086. controllers for the Ethernet.  Network  services  are  split
  3087. between  the  kernel (communication protocols) and user pro-
  3088. grams (user services such as TELNET and FTP).  This  section
  3089. describes  how  to configure your system to use the Internet
  3090. networking support.  2.11BSD also includes code  to  support
  3091. the  Xerox Network Systems (NS) protocols; the basic porting
  3092. work has been done, but it is completely untested.
  3093.  
  3094.  
  3095.  
  3096.  
  3097.  
  3098.  
  3099.  
  3100.                         17 March 1998
  3101.  
  3102.  
  3103.  
  3104.  
  3105.  
  3106. setup.2.11 - 48Installing and Operating 2.11BSD on the PDP-11
  3107.  
  3108.  
  3109. 55..11..  SSyysstteemm ccoonnffiigguurraattiioonn
  3110.  
  3111.      To configure the kernel to include the Internet  commu-
  3112. nication  protocols, define the INET option.  This automati-
  3113. cally defines the NLOOP  option.   TCP_COMPAT_42  is  always
  3114. defined.   Xerox  NS  support is enabled with the NS option.
  3115. In either case, include the pseudo-device  ``pty''  in  your
  3116. machine's  configuration  file, using the NPTY options.  The
  3117. ``pty'' pseudo-device  forces  the  pseudo  terminal  device
  3118. driver  to  be  configured into the system, see _p_t_y(4).  The
  3119. NLOOP option  forces  inclusion  of  the  software  loopback
  3120. interface  driver.  The loop driver is used in network test-
  3121. ing as well as for the system talking to itself rather  than
  3122. transmitting the data over the wire.
  3123.  
  3124.      If you are planning to use the Internet network facili-
  3125. ties on  a  10Mb/s  Ethernet,  the  pseudo-device  ``ether''
  3126. should  also  be  included  in  the  configuration using the
  3127. NETHER option; this forces inclusion of the Address  Resolu-
  3128. tion Protocol module used in mapping between 48-bit Ethernet
  3129. and 32-bit Internet addresses.  Also, if  you  have  an  IMP
  3130. connection,  you  will  need  to  include  the pseudo-device
  3131. ``imp'', using the option NIMP.  The IMP software is  ported
  3132. and is in use at at least one site.
  3133.  
  3134.      Before configuring the appropriate networking hardware,
  3135. you should consult the manual pages in section 4 of the Pro-
  3136. grammer's Manual.  The following table lists the devices for
  3137. which software support exists.  Again, much of this software
  3138. is unported and untested; only the basic networking has been
  3139. stressed at all.  Many  other  devices  are  available,  but
  3140. unported.   Porting  should simply be a matter of making the
  3141. hardware device work.  The  directories  ``/sys/pdpif''  and
  3142. ``/sys/vaxif''  contain many drivers.  The ones in ``pdpif''
  3143. are either the current, working drivers, or drivers that, at
  3144. some  time,  worked  on PDP-11's.  The ones in ``vaxif'' are
  3145. the current VAX drivers, and, as such,  will  have  to  have
  3146. their  memory usage changed, but serve as an excellent exam-
  3147. ple of how the hardware works.
  3148.  
  3149.  
  3150.      Device name   Manufacturer and product
  3151.      ------------------------------------------------------------------
  3152.      de            DEC DEUNA/DELUA 10Mb/s Ethernet
  3153.      qe            DEC DEQNA 10Mb/s Ethernet
  3154.      qt            DEC DELQA-YM 10Mb/s Ethernet
  3155.      ec            3Com 10Mb/s Ethernet
  3156.      il            Interlan 1010 and 10101A 10Mb/s Ethernet interfaces
  3157.      vv            Proteon ProNET - Token Ring Interface
  3158.      acc           LH/DH-11 1822 IMP/PSN Interface
  3159.  
  3160.  
  3161.  
  3162.  
  3163.  
  3164.  
  3165.  
  3166.                         17 March 1998
  3167.  
  3168.  
  3169.  
  3170.  
  3171.  
  3172. Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 49
  3173.  
  3174.  
  3175.      SL/IP is also available.  It is surprisingly efficient.
  3176. Over  a 9600 baud line it is not unusual to see ffttpp rates in
  3177. the 800 bytes per second range (depending how busy the  sys-
  3178. tem is).
  3179.  
  3180.      All  network  interface  drivers including the loopback
  3181. interface, require that their host address(es) be defined at
  3182. boot  time.  This is done with _i_f_c_o_n_f_i_g(8) commands included
  3183. in the _/_e_t_c_/_r_c_._l_o_c_a_l file.   Interfaces  that  are  able  to
  3184. dynamically  deduce  the  host  part of an address may check
  3185. that the host part of the address is  correct.   The  manual
  3186. page for each network interface describes the method used to
  3187. establish a host's address.  _I_f_c_o_n_f_i_g(8) can also be used to
  3188. set options for the interface at boot time.  Options are set
  3189. independently for each interface, and apply to  all  packets
  3190. sent  using that interface.  These options include disabling
  3191. the use of the Address Resolution Protocol; this may be use-
  3192. ful  if a network is shared with hosts running software that
  3193. does not yet provide this function.  Alternatively, transla-
  3194. tions  for such hosts may be set in advance or ``published''
  3195. by a 2.11BSD host by use of the _a_r_p(8) command.   Note  that
  3196. the  use  of  trailer  link-level  is now negotiated between
  3197. 2.11BSD hosts using ARP, and it is thus no longer  necessary
  3198. to  disable  the  use  of  trailers  with  _i_f_c_o_n_f_i_g.   It is
  3199. SSTTRROONNGGLLYY recommended, however, that  2.11BSD  networking  be
  3200. run  without  trailers,  as  the trailer code in most of the
  3201. drivers has either been removed, commented out, is  untested
  3202. or  is  kknnoowwnn  not  to work.  This is a problem with certain
  3203. releases of _U_l_t_r_i_x, which has to  be  explicitly  configured
  3204. not to send trailers if it and 2.11BSD are to coexist.
  3205.  
  3206.      To  use  the  pseudo  terminals just configured, device
  3207. entries must be created in the ``/dev'' directory.  To  cre-
  3208. ate  32  pseudo  terminals  (plenty, you can probably get by
  3209. with many less) execute the following commands.
  3210.  
  3211.      ## cd /dev
  3212.      ## MAKEDEV pty0 pty1
  3213.  
  3214. More pseudo terminals may be made by specifying _p_t_y_2,  _p_t_y_3,
  3215. etc.   The  kernel  normally  includes support for 16 pseudo
  3216. terminals unless the configuration file specifies a  differ-
  3217. ent  number.   Each  pseudo  terminal really consists of two
  3218. files in /dev: a master and a slave.  The master pseudo ter-
  3219. minal  file  is  named  /dev/ptyp?,  while the slave side is
  3220. /dev/ttyp?.  Pseudo terminals are also used by several  pro-
  3221. grams not related to the network.  NNOOTTEE: the terminal struc-
  3222. tures are 78 bytes each, declaring more than 16 pseudo  ter-
  3223. minals  is  potentially wasteful of kernel D space.  See the
  3224. comment in the kernel config files.  In addition to creating
  3225. the  pseudo  terminals,  be  sure  to  install  them  in the
  3226. _/_e_t_c_/_t_t_y_s file (with a `none' in the  second  column  so  no
  3227. _g_e_t_t_y is started).
  3228.  
  3229.  
  3230.  
  3231.  
  3232.                         17 March 1998
  3233.  
  3234.  
  3235.  
  3236.  
  3237.  
  3238. setup.2.11 - 50Installing and Operating 2.11BSD on the PDP-11
  3239.  
  3240.  
  3241. 55..22..  LLooccaall ssuubbnneettwwoorrkkss
  3242.  
  3243.      In  2.11BSD  the  DARPA  Internet  support includes the
  3244. notion of ``subnetworks''.  This is  a  mechanism  by  which
  3245. multiple  local  networks  may  appears as a single Internet
  3246. network to off-site hosts.  Subnetworks are  useful  because
  3247. they  allow  a  site to hide their local topology, requiring
  3248. only a single route in external gateways; it also means that
  3249. local  network  numbers  may  be  locally administered.  The
  3250. standard describing this change in  Internet  addressing  is
  3251. RFC-950.
  3252.  
  3253.      To  set  up local subnetworks one must first decide how
  3254. the available address space (the Internet ``host  part''  of
  3255. the  32-bit  address)  is  to  be partitioned.  Sites with a
  3256. class A network number have  a  24-bit  address  space  with
  3257. which  to  work,  sites with a class B network number have a
  3258. 16-bit address space, while sites with  a  class  C  network
  3259. number have an 8-bit address space|^.  To define  local  sub-
  3260. nets  you  must  steal some bits from the local host address
  3261. space for use in extending the network portion of the Inter-
  3262. net address.  This reinterpretation of Internet addresses is
  3263. done only for local networks; i.e.  it  is  not  visible  to
  3264. hosts  off-site.   For  example,  if your site has a class B
  3265. network number, hosts  on  this  network  have  an  Internet
  3266. address  that  contains the network number, 16 bits, and the
  3267. host number, another 16 bits.  To define 254 local  subnets,
  3268. each  possessing at most 255 hosts, 8 bits may be taken from
  3269. the local part.  (The use of subnets 0 and all-1's,  255  in
  3270. this example, is discouraged to avoid confusion about broad-
  3271. cast addresses.)  These new network numbers  are  then  con-
  3272. structed by concatenating the original 16-bit network number
  3273. with the extra 8 bits containing the local  subnetwork  num-
  3274. ber.
  3275.  
  3276.      The  existence  of local subnetworks is communicated to
  3277. the system at the time a  network  interface  is  configured
  3278. with  the  _n_e_t_m_a_s_k option to the _i_f_c_o_n_f_i_g program.  A ``net-
  3279. work mask'' is specified to define the portion of the Inter-
  3280. net  address  that  is to be considered the network part for
  3281. that network.  This mask normally contains the  bits  corre-
  3282. sponding to the standard network part as well as the portion
  3283. of the local part that has been assigned to subnets.  If  no
  3284. mask  is  specified  when the address is set, it will be set
  3285. according to the class of  the  network.   For  example,  at
  3286. Berkeley  (class  B network 128.32) 8 bits of the local part
  3287. have been reserved for  defining  subnetworks;  consequently
  3288. the /etc/rc.local file contains lines of the form
  3289.  
  3290. -----------
  3291. |^ If you are unfamiliar with the Internet address-
  3292.   ing  structure,  consult  ``Address  Mappings'',
  3293.   Internet  RFC-796, J. Postel; available from the
  3294.   Internet Network Information Center at SRI.
  3295.  
  3296.  
  3297.  
  3298.                         17 March 1998
  3299.  
  3300.  
  3301.  
  3302.  
  3303.  
  3304. Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 51
  3305.  
  3306.  
  3307.      ifconfig en0 netmask 0xffffff00 128.32.1.7
  3308.  
  3309. This specifies that for interface ``en0'', the upper 24 bits
  3310. of the Internet address should be used in  calculating  net-
  3311. work  numbers  (netmask  0xffffff00),  and  the  interface's
  3312. Internet  address  is  ``128.32.1.7''  (host  7  on  network
  3313. 128.32.1).   Hosts  _m on sub-network _n of this network would
  3314. then have addresses of the form ``128.32._n._m'';   for  exam-
  3315. ple,   host   99  on  network  129  would  have  an  address
  3316. ``128.32.129.99''.  For hosts with multiple interfaces,  the
  3317. network  mask  should be set for each interface, although in
  3318. practice only the mask of the first interface on  each  net-
  3319. work is actually used.
  3320.  
  3321. 55..33..  IInntteerrnneett bbrrooaaddccaasstt aaddddrreesssseess
  3322.  
  3323.      The address defined as the broadcast address for Inter-
  3324. net networks according to RFC-919 is the address with a host
  3325. part of all 1's.  The address used by 4.2BSD was the address
  3326. with a host part of 0.  2.11BSD uses the standard  broadcast
  3327. address  (all  1's)  by  default,  but  allows the broadcast
  3328. address to be set (with _i_f_c_o_n_f_i_g) for each interface.   This
  3329. allows  networks consisting of both 4.2BSD and 2.11BSD hosts
  3330. to coexist.  In  the  presence  of  subnets,  the  broadcast
  3331. address  uses the subnet field as for normal host addresses,
  3332. with the remaining host part set to 1's (or 0's, on  a  net-
  3333. work that has not yet been converted).  2.11BSD hosts recog-
  3334. nize and accept packets sent to the  logical-network  broad-
  3335. cast  address  as well as those sent to the subnet broadcast
  3336. address, and when using an all-1's broadcast, also recognize
  3337. and receive packets sent to host 0 as a broadcast.
  3338.  
  3339. 55..44..  RRoouuttiinngg
  3340.  
  3341.      If  your  environment  allows  access  to  networks not
  3342. directly attached to your host you will need to set up rout-
  3343. ing information to allow packets to be properly routed.  Two
  3344. schemes are supported  by  the  system.   The  first  scheme
  3345. employs  the routing table management daemon _r_o_u_t_e_d to main-
  3346. tain the system routing tables.  The routing daemon  uses  a
  3347. variant  of  the Xerox Routing Information Protocol to main-
  3348. tain up to date routing tables in a cluster  of  local  area
  3349. networks.   By  using  the  _/_e_t_c_/_g_a_t_e_w_a_y_s  file  created  by
  3350. _h_t_a_b_l_e(8), the routing daemon can also be used to initialize
  3351. static  routes to distant networks (see the next section for
  3352. further discussion).  When the routing daemon is started  up
  3353. (usually  from  _/_e_t_c_/_r_c_._l_o_c_a_l)  it reads _/_e_t_c_/_g_a_t_e_w_a_y_s if it
  3354. exists and installs those routes defined there, then  broad-
  3355. casts on each local network to which the host is attached to
  3356. find  other  instances  of  the  routing  daemon.   If   any
  3357. responses  are  received,  the  routing daemons cooperate in
  3358. maintaining a globally consistent view  of  routing  in  the
  3359. local  environment.   This  view  can be extended to include
  3360. remote sites also running the routing daemon by  setting  up
  3361.  
  3362.  
  3363.  
  3364.                         17 March 1998
  3365.  
  3366.  
  3367.  
  3368.  
  3369.  
  3370. setup.2.11 - 52Installing and Operating 2.11BSD on the PDP-11
  3371.  
  3372.  
  3373. suitable  entries  in _/_e_t_c_/_g_a_t_e_w_a_y_s; consult _r_o_u_t_e_d(8) for a
  3374. more thorough discussion.
  3375.  
  3376.      The second approach is to define a default or  wildcard
  3377. route  to  a smart gateway and depend on the gateway to pro-
  3378. vide ICMP routing redirect information to dynamically create
  3379. a routing data base.  This is done by adding an entry of the
  3380. form
  3381.  
  3382.      route add default _s_m_a_r_t_-_g_a_t_e_w_a_y 1
  3383.  
  3384. to _/_e_t_c_/_r_c_._l_o_c_a_l; see _r_o_u_t_e(8) for  more  information.   The
  3385. default  route  will  be  used  by  the  system  as a ``last
  3386. resort'' in routing packets to their destination.   Assuming
  3387. the  gateway to which packets are directed is able to gener-
  3388. ate the proper routing redirect messages,  the  system  will
  3389. then add routing table entries based on the information sup-
  3390. plied.  This approach has certain advantages over the  rout-
  3391. ing  daemon, but is unsuitable in an environment where there
  3392. are only bridges (i.e.  pseudo gateways that, for  instance,
  3393. do not generate routing redirect messages).  Further, if the
  3394. smart gateway goes down there is no alternative, save manual
  3395. alteration  of  the routing table entry, to maintaining ser-
  3396. vice.
  3397.  
  3398.      The system always listens, and processes, routing redi-
  3399. rect  information,  so it is possible to combine both of the
  3400. above facilities.  For example, the routing table management
  3401. process  might  be  used  to maintain up to date information
  3402. about routes to geographically local networks, while employ-
  3403. ing  the  wildcard  routing  techniques for ``distant'' net-
  3404. works.  The _n_e_t_s_t_a_t(1) program may be used to display  rout-
  3405. ing  table  contents  as  well  as  various routing oriented
  3406. statistics.  For example,
  3407.  
  3408.      ##netstat -r
  3409.  
  3410. will display the contents of the routing tables, while
  3411.  
  3412.      ##netstat -r -s
  3413.  
  3414. will show the number of routing  table  entries  dynamically
  3415. created as a result of routing redirect messages, etc.
  3416.  
  3417. 55..55..  UUssee ooff 22..1111BBSSDD mmaacchhiinneess aass ggaatteewwaayyss
  3418.  
  3419.      Only  sheer  insanity  could  prompt the use of 2.11BSD
  3420. machines as gateways.  If you rreeaallllyy want to  do  this  then
  3421. the  best  recourse is to prowl the sources and see what has
  3422. to be done.  The code is all there, and  the  "ipforwarding"
  3423. variable is present.
  3424.  
  3425.      Local  area  routing  within  a group of interconnected
  3426. Ethernets  and  other  such  networks  may  be  handled   by
  3427.  
  3428.  
  3429.  
  3430.                         17 March 1998
  3431.  
  3432.  
  3433.  
  3434.  
  3435.  
  3436. Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 53
  3437.  
  3438.  
  3439. _r_o_u_t_e_d(8).   Gateways  between  the Internet and one or more
  3440. local networks require an additional routing  protocol,  the
  3441. Exterior Gateway Protocol (EGP), to inform the core gateways
  3442. of their presence and to acquire  routing  information  from
  3443. the core.
  3444.  
  3445. 55..66..  NNeettwwoorrkk sseerrvveerrss
  3446.  
  3447.      In  2.11BSD  most of the server programs are started up
  3448. by a ``super server'', the Internet  daemon.   The  Internet
  3449. daemon,  _i_n_e_t_d,  acts as a master server for programs speci-
  3450. fied in its configuration file,  _/_e_t_c_/_i_n_e_t_d_._c_o_n_f,  listening
  3451. for  service requests for these servers, and starting up the
  3452. appropriate program whenever a  request  is  received.   The
  3453. configuration  file contains lines containing a service name
  3454. (as found in _/_e_t_c_/_s_e_r_v_i_c_e_s), the type of socket  the  server
  3455. expects (e.g. stream or dgram), the protocol to be used with
  3456. the socket (as found in _/_e_t_c_/_p_r_o_t_o_c_o_l_s), whether to wait for
  3457. each server to complete before starting up another, the user
  3458. name as which the server should run,  the  server  program's
  3459. name,  and at most five arguments to pass to the server pro-
  3460. gram.  Some trivial services are implemented  internally  in
  3461. _i_n_e_t_d,  and  their  servers are listed as ``internal.''  For
  3462. example, an entry for  the  file  transfer  protocol  server
  3463. would appear as
  3464.  
  3465.      ftp  stream    tcp  nowait    root /usr/libexec/ftpd   ftpd -l
  3466.  
  3467. or if you are using the _t_c_p___w_r_a_p_p_e_r program as
  3468.  
  3469.      ftp  stream    tcp  nowait    root /usr/libexec/tcpd   ftpd -l
  3470.  
  3471. Consult  _i_n_e_t_d(8)  for more detail on the format of the con-
  3472. figuration file and the operation of the Internet daemon.
  3473.  
  3474. 55..77..  NNeettwwoorrkk ddaattaa bbaasseess
  3475.  
  3476.      Several data files are used by the network library rou-
  3477. tines  and  server  programs.   Most of these files are host
  3478. independent and updated only rarely.
  3479.  
  3480.  
  3481.  
  3482.  
  3483.  
  3484.  
  3485.  
  3486.  
  3487.  
  3488.  
  3489.  
  3490.  
  3491.  
  3492.  
  3493.  
  3494.  
  3495.  
  3496.                         17 March 1998
  3497.  
  3498.  
  3499.  
  3500.  
  3501.  
  3502. setup.2.11 - 54Installing and Operating 2.11BSD on the PDP-11
  3503.  
  3504.  
  3505.      File               Manual reference   Use
  3506.      -------------------------------------------------------------------------------
  3507.      /etc/hosts         _h_o_s_t_s(5)           host names
  3508.      /etc/networks      _n_e_t_w_o_r_k_s(5)        network names
  3509.      /etc/services      _s_e_r_v_i_c_e_s(5)        list of known services
  3510.      /etc/protocols     _p_r_o_t_o_c_o_l_s(5)       protocol names
  3511.      /etc/hosts.equiv   _r_s_h_d(8)            list of ``trusted'' hosts
  3512.      /etc/rc.local      _r_c(8)              command script for starting servers
  3513.      /etc/ftpusers      _f_t_p_d(8)            list of ``unwelcome'' ftp users
  3514.      /etc/hosts.lpd     _l_p_d(8)             list of hosts allowed to access printers
  3515.      /etc/inetd.conf    _i_n_e_t_d(8)           list of servers started by _i_n_e_t_d
  3516.  
  3517.  
  3518. The files distributed are set up for Internet hosts.   Local
  3519. networks  and  hosts  should  be added to describe the local
  3520. configuration.  Network numbers will have to be  chosen  for
  3521. each  Ethernet.   For  sites  not connected to the Internet,
  3522. these can be chosen more or less arbitrarily, otherwise  the
  3523. normal  channels  should  be  used for allocation of network
  3524. numbers.
  3525.  
  3526. 55..77..11..  RReeggeenneerraattiinngg //eettcc//hhoossttss aanndd //eettcc//nneettwwoorrkkss
  3527.  
  3528.      When using the  host  address  routines  that  use  the
  3529. Internet  name  server, the file _/_e_t_c_/_h_o_s_t_s is only used for
  3530. setting interface addresses and  at  other  times  that  the
  3531. server  is  not  running, and therefore it need only contain
  3532. addresses for local hosts.  There is no  equivalent  service
  3533. for  network  names yet.  The days of retrieving a host file
  3534. containing all systems on the Internet are  over.   Besides,
  3535. you  would  grow  very  old  and run out of disk space while
  3536. waiting for _m_k_h_o_s_t_s(8) to process a  hosts  file  containing
  3537. the  several  million  entries.   Therefore  the  details of
  3538. retrieving  a  master  hosts  file   using   _h_t_a_b_l_e(8)   and
  3539. _g_e_t_t_a_b_l_e(8)  have  been removed from this document.  However
  3540. if you do use local hosts files you will still need  to  run
  3541. _m_k_h_o_s_t_s(8) and this is described below.
  3542.  
  3543.      If  you  are  using  the  host  table for host name and
  3544. address mapping, you should run _m_k_h_o_s_t_s(8) after  installing
  3545. _/_e_t_c_/_h_o_s_t_s.   The  _m_k_h_o_s_t_s(8)  program has been enhanced for
  3546. 2.11BSD to allow multiple addresses per host.  The order  in
  3547. which the addresses are given in _/_e_t_c_/_h_o_s_t_s is preserved, so
  3548. the entries for a given host should be in  order  of  impor-
  3549. tance.   If  you are using the name server for the host name
  3550. and address mapping, you only need to install _n_e_t_w_o_r_k_s and a
  3551. small  copy  of  _h_o_s_t_s  describing your local machines.  The
  3552. full host table in this case might be placed somewhere  else
  3553. for  reference by users.  The gateways file may be installed
  3554. in _/_e_t_c_/_g_a_t_e_w_a_y_s if you use _r_o_u_t_e_d(8) for local routing  and
  3555. wish to have static external routes installed when _r_o_u_t_e_d is
  3556. started.  This procedure is essentially  obsolete,  however,
  3557. except  for  individual  hosts that are on the Milnet and do
  3558. not forward packets from a local network.  Other  situations
  3559.  
  3560.  
  3561.  
  3562.                         17 March 1998
  3563.  
  3564.  
  3565.  
  3566.  
  3567.  
  3568. Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 55
  3569.  
  3570.  
  3571. require the use of ggaatteedd.  That program can never be made to
  3572. run on a PDP-11 due to address space considerations.   Also,
  3573. the  networking code could not even begin to handle the num-
  3574. ber of routes which would be received.
  3575.  
  3576.      If you are connected to the Internet, it is highly rec-
  3577. ommended  that you use the name server resolver routines for
  3578. your host name and address mapping, as this provides  access
  3579. to  a much larger set of hosts than are provided in the host
  3580. table.  Many large organization on  the  network,  currently
  3581. have  only  a  small percentage of their hosts listed in the
  3582. host table retrieved from NIC.
  3583.  
  3584. 55..77..22..  //eettcc//hhoossttss..eeqquuiivv
  3585.  
  3586.      The remote login and shell servers use  an  authentica-
  3587. tion  scheme  based  on trusted hosts.  The _h_o_s_t_s_._e_q_u_i_v file
  3588. contains a list of hosts that are  considered  trusted  and,
  3589. under a single administrative control.  When a user contacts
  3590. a remote login  or  shell  server  requesting  service,  the
  3591. client  process passes the user's name and the official name
  3592. of the host on which the client is located.  In  the  simple
  3593. case,  if  the host's name is located in _h_o_s_t_s_._e_q_u_i_v and the
  3594. user has an account on the server's machine, then service is
  3595. rendered (i.e. the user is allowed to log in, or the command
  3596. is executed).  Users  may  expand  this  ``equivalence''  of
  3597. machines  by installing a _._r_h_o_s_t_s file in their login direc-
  3598. tory.  The root login is handled  specially,  bypassing  the
  3599. _h_o_s_t_s_._e_q_u_i_v file, and using only the _/_._r_h_o_s_t_s file.
  3600.  
  3601.      Thus,  to  create  a  class of equivalent machines, the
  3602. _h_o_s_t_s_._e_q_u_i_v file should contain the _o_f_f_i_c_i_a_l names for those
  3603. machines.   If you are running the name server, you may omit
  3604. the domain part of the host name for machines in your  local
  3605. domain.   For  example, several machines on my local network
  3606. are considered trusted, so the _h_o_s_t_s_._e_q_u_i_v file  is  of  the
  3607. form:
  3608.  
  3609.      wlv
  3610.      wlonex
  3611.      wlonex0
  3612.      wlbr
  3613.  
  3614.  
  3615. 55..77..33..  //eettcc//rrcc..llooccaall
  3616.  
  3617.      Most  network  servers  are automatically started up at
  3618. boot time by the command file /etc/rc (if they are installed
  3619. in  their presumed locations) or by the Internet daemon (see
  3620. above).  These include the following:
  3621.  
  3622.  
  3623.  
  3624.  
  3625.  
  3626.  
  3627.  
  3628.                         17 March 1998
  3629.  
  3630.  
  3631.  
  3632.  
  3633.  
  3634. setup.2.11 - 56Installing and Operating 2.11BSD on the PDP-11
  3635.  
  3636.  
  3637.      Program    Server                            Started by
  3638.      --------------------------------------------------------
  3639.      rshd       shell server                      inetd
  3640.      rexecd     exec server                       inetd
  3641.      rlogind    login server                      inetd
  3642.      telnetd    TELNET server                     inetd
  3643.      ftpd       FTP server                        inetd
  3644.      fingerd    Finger server                     inetd
  3645.      tftpd      TFTP server                       inetd
  3646.      rwhod      system status daemon              /etc/rc
  3647.      syslogd    error logging server              /etc/rc
  3648.      sendmail   SMTP server                       /etc/rc
  3649.      routed     routing table management daemon   /etc/rc
  3650.  
  3651.  
  3652. Consult the  manual  pages  and  accompanying  documentation
  3653. (particularly  for  sendmail) for details about their opera-
  3654. tion.
  3655.  
  3656.      To have other network servers started up as  well,  the
  3657. appropriate  line  should  be added to the Internet daemon's
  3658. configuration file _/_e_t_c_/_i_n_e_t_d_._c_o_n_f, or commands  similar  to
  3659. the  following  should  be placed in the site dependent file
  3660. _/_e_t_c_/_r_c_._l_o_c_a_l.
  3661.  
  3662.      if [ -f /usr/sbin/rwhod ]; then
  3663.           rwhod & echo -n ' rwhod'           >/dev/console
  3664.      fi
  3665.  
  3666.  
  3667. 55..77..44..  //eettcc//ffttppuusseerrss
  3668.  
  3669.      The FTP server included in the system provides  support
  3670. for an anonymous FTP account.  Because of the inherent secu-
  3671. rity problems with such a facility you should read this sec-
  3672. tion carefully if you consider providing such a service.
  3673.  
  3674.      An anonymous account is enabled by creating a user _f_t_p.
  3675. When a client uses the anonymous account a _c_h_r_o_o_t(2)  system
  3676. call  is performed by the server to restrict the client from
  3677. moving outside that part of the file system where  the  user
  3678. ftp  home  directory  is  located.  Because a _c_h_r_o_o_t call is
  3679. used, certain programs and files used by the server  process
  3680. must be placed in the ftp home directory.  Further, one must
  3681. be sure that  all  directories  and  executable  images  are
  3682. unwritable.  The following directory setup is recommended.
  3683.  
  3684.  
  3685.  
  3686.  
  3687.  
  3688.  
  3689.  
  3690.  
  3691.  
  3692.  
  3693.  
  3694.                         17 March 1998
  3695.  
  3696.  
  3697.  
  3698.  
  3699.  
  3700. Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 57
  3701.  
  3702.  
  3703.      ## cd ~ftp
  3704.      ## chmod 555 .; chown ftp .; chgrp ftp .
  3705.      ## mkdir bin etc pub
  3706.      ## chown root bin etc
  3707.      ## chmod 555 bin etc
  3708.      ## chown ftp pub
  3709.      ## chmod 777 pub
  3710.      ## cd bin
  3711.      ## cp /bin/sh /bin/ls .
  3712.      ## chmod 111 sh ls
  3713.      ## cd ../etc
  3714.      ## cp /etc/passwd /etc/group .
  3715.      ## chmod 444 passwd group
  3716.  
  3717. When  local users wish to place files in the anonymous area,
  3718. they must be placed in a subdirectory.  In the  setup  here,
  3719. the directory _~_f_t_p_/_p_u_b is used.
  3720.  
  3721.      NOTE:  Mode 777 on the 'pub' directory can and has been
  3722. abused!  Changing the mode to 555 is a good choice but would
  3723. require  administrative  assistance for placing files in the
  3724. 'pub' directory.  Probably not a bad idea though.
  3725.  
  3726.      Another issue to consider is the  copy  of  _/_e_t_c_/_p_a_s_s_w_d
  3727. placed  here.   It may be copied by users who use the anony-
  3728. mous account.  They may then try to break the  passwords  of
  3729. users  on your machine for further access.  A good choice of
  3730. users to include in this copy might be root,  daemon,  uucp,
  3731. and the ftp user.
  3732.  
  3733.      Aside  from  the  problems of directory modes and such,
  3734. the ftp server may provide a  loophole  for  interlopers  if
  3735. certain  user  accounts are allowed.  The file _/_e_t_c_/_f_t_p_u_s_e_r_s
  3736. is checked on each connection.  If the requested  user  name
  3737. is  located  in the file, the request for service is denied.
  3738. This file normally has the following names on our systems.
  3739.  
  3740.      uucp
  3741.      root
  3742.  
  3743. Accounts with nonstandard shells should be  listed  in  this
  3744. file.  Accounts without passwords need not be listed in this
  3745. file, the ftp server will not service these users.
  3746.  
  3747.  
  3748.  
  3749.  
  3750.  
  3751.  
  3752.  
  3753.  
  3754.  
  3755.  
  3756.  
  3757.  
  3758.  
  3759.  
  3760.                         17 March 1998
  3761.  
  3762.  
  3763.  
  3764.  
  3765.  
  3766. setup.2.11 - 58Installing and Operating 2.11BSD on the PDP-11
  3767.  
  3768.  
  3769.                     66.. SSYYSSTTEEMM OOPPEERRAATTIIOONN
  3770.  
  3771.  
  3772.  
  3773.      This section describes procedures  used  to  operate  a
  3774. PDP-11  UNIX  system.   Procedures  described  here are used
  3775. periodically, to reboot the system, analyze  error  messages
  3776. from  devices,  do disk backups, monitor system performance,
  3777. recompile system software and control local changes.
  3778.  
  3779. 66..11..  BBoooottssttrraapp aanndd sshhuuttddoowwnn pprroocceedduurreess
  3780.  
  3781.      In a normal reboot, the system  checks  the  disks  and
  3782. comes  up  multi-user  without  intervention at the console.
  3783. Such a reboot can be stopped (after it prints the date) with
  3784. a ^C (interrupt).  This will leave the system in single-user
  3785. mode, with only the console terminal  active.   It  is  also
  3786. possible to allow the filesystem checks to complete and then
  3787. to return to single-user mode by signaling _f_s_c_k with a  QUIT
  3788. signal (^\).
  3789.  
  3790.      If  booting  from  the console command level is needed,
  3791. then the command
  3792.  
  3793.      >>>>>> B
  3794.  
  3795. will boot from the default device and ask for  the  name  of
  3796. the  system  to  be booted.  Other systems such as the 11/44
  3797. require a device name to be given:
  3798.  
  3799.      >>>>>> B DU
  3800.  
  3801. to boot from a MSCP/UDA device.  Typing  a  carriage  return
  3802. will  cause  the  default  system (as compiled in in section
  3803. 4.1), to be booted.  In any case, the system  selected  will
  3804. come up in single-user mode.
  3805.  
  3806.      To  bring  the  system up to a multi-user configuration
  3807. from the single-user all you have to do is  hit  ^D  on  the
  3808. console.  The system will then execute /etc/rc, a multi-user
  3809. restart script (and /etc/rc.local), and come up on the  ter-
  3810. minals  listed as active in the file /etc/ttys.  See _i_n_i_t(8)
  3811. and _t_t_y_s(5).  Note, however, that this does not cause a file
  3812. system  check  to be performed.  Unless the system was taken
  3813. down cleanly, you should run ``fsck'' or force a reboot with
  3814. _r_e_b_o_o_t(8) to have the disks checked.
  3815.  
  3816.      To  take the system down to a single user state you can
  3817. use
  3818.  
  3819.      ## kill 1
  3820.  
  3821. or use the _s_h_u_t_d_o_w_n(8) command (which is much  more  polite,
  3822. if there are other users logged in.)  when you are up multi-
  3823.  
  3824.  
  3825.  
  3826.                         17 March 1998
  3827.  
  3828.  
  3829.  
  3830.  
  3831.  
  3832. Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 59
  3833.  
  3834.  
  3835. user.  Either command will kill all processes and give you a
  3836. shell  on the console, as if you had just booted.  File sys-
  3837. tems remain mounted after the system is  taken  single-user.
  3838. If  you wish to come up multi-user again, you should do this
  3839. by:
  3840.  
  3841.      ## cd /
  3842.      ## umount -a
  3843.      ## ^D
  3844.  
  3845.  
  3846.      Each system shutdown, crash, processor halt and  reboot
  3847. is recorded in the file /usr/adm/shutdownlog with the cause.
  3848.  
  3849. 66..22..  DDeevviiccee eerrrroorrss aanndd ddiiaaggnnoossttiiccss
  3850.  
  3851.      When serious errors occur on peripherals or in the sys-
  3852. tem,  the system prints a warning diagnostic on the console.
  3853. These messages are written to the kernel logger  where  they
  3854. are  retrieved by _s_y_s_l_o_g_d(8) via _/_d_e_v_/_k_l_o_g - _d_m_e_s_g(8) is now
  3855. obsolete.  _d_m_e_s_g(8) is present in the  distribution  but  no
  3856. longer  used.   The  message  buffer  is now 4kb in size and
  3857. external to the kernel.
  3858.  
  3859.      Error messages printed by the devices in the system are
  3860. described  with  the drivers for the devices in section 4 of
  3861. the programmer's manual.  Some drivers have been modified to
  3862. use  the kernel logger, others still simply do printf state-
  3863. ments.  If errors occur suggesting  hardware  problems,  you
  3864. should contact your hardware support group or field service.
  3865. It is a good idea to examine the error log  files  regularly
  3866. (e.g. with ``tail -r _/_u_s_r_/_a_d_m_/_m_e_s_s_a_g_e_s'').
  3867.  
  3868. 66..33..  FFiillee ssyysstteemm cchheecckkss,, bbaacckkuuppss aanndd ddiissaasstteerr rreeccoovveerryy
  3869.  
  3870.      Periodically  (say  every  week or so in the absence of
  3871. any problems) and always  (usually  automatically)  after  a
  3872. crash,  all  the  file systems should be checked for consis-
  3873. tency by _f_s_c_k(8).  The procedures  of  _r_e_b_o_o_t(8)  should  be
  3874. used  to get the system to a state where a file system check
  3875. can be performed manually or automatically.
  3876.  
  3877.      Dumping of the file systems should be done on a regular
  3878. schedule,  since  once  the  system  is  going it is easy to
  3879. become complacent.  Complete and incremental dumps are  eas-
  3880. ily  done  with _d_u_m_p(8).  You should arrange to do a towers-
  3881. of-hanoi dump sequence; we tune  ours  so  that  almost  all
  3882. files  are  dumped on two tapes and kept for at least a week
  3883. in most every case.  We take full  dumps  every  month  (and
  3884. keep these indefinitely).
  3885.  
  3886.      More  precisely,  we  have three sets of dump tapes: 10
  3887. daily tapes, 5 weekly sets of 2 tapes,  and  fresh  sets  of
  3888. three  tapes  monthly.   We do daily dumps circularly on the
  3889.  
  3890.  
  3891.  
  3892.                         17 March 1998
  3893.  
  3894.  
  3895.  
  3896.  
  3897.  
  3898. setup.2.11 - 60Installing and Operating 2.11BSD on the PDP-11
  3899.  
  3900.  
  3901. daily tapes with sequence `3 2 5 4 7 6 9 8 9 9 9 ...'.  Each
  3902. weekly  is  a  level  1  and  the  daily dump sequence level
  3903. restarts after each weekly dump.  Full dumps are level 0 and
  3904. the daily sequence restarts after each full dump also.
  3905.  
  3906.      Thus a typical dump sequence would be:
  3907.  
  3908.    tape name   level number       date       opr   size
  3909.    ------------------------------------------------------
  3910.      FULL           0         Nov 24, 1979   jkf   137MB
  3911.        D1           3         Nov 28, 1979   jkf   29MB
  3912.        D2           2         Nov 29, 1979   rrh   34MB
  3913.        D3           5         Nov 30, 1979   rrh   19MB
  3914.        D4           4          Dec 1, 1979   rrh   22MB
  3915.        W1           1          Dec 2, 1979   etc   40MB
  3916.        D5           3          Dec 4, 1979   rrh   15MB
  3917.        D6           2          Dec 5, 1979   jkf   25MB
  3918.        D7           5          Dec 6, 1979   jkf   15MB
  3919.        D8           4          Dec 7, 1979   rrh   19MB
  3920.        W2           1          Dec 9, 1979   etc   118MB
  3921.        D9           3         Dec 11, 1979   rrh   15MB
  3922.       D10           2         Dec 12, 1979   rrh   26MB
  3923.        D1           5         Dec 15, 1979   rrh   14MB
  3924.        W3           1         Dec 17, 1979   etc   71MB
  3925.        D2           3         Dec 18, 1979   etc   13MB
  3926.      FULL           0         Dec 22, 1979   etc   135MB
  3927.  
  3928. Weekly  dumps  are done often enough that daily dumps always
  3929. fit on one tape.
  3930.  
  3931.      Dumping of files by name is best done by _t_a_r(1) but the
  3932. amount of data that can be moved in this way is limited to a
  3933. single tape.  Finally if  there  are  enough  drives  entire
  3934. disks  can  be copied with _d_d(1) using the raw special files
  3935. and an appropriate blocking factor; the  number  of  sectors
  3936. per   track   is  usually  a  good  value  to  use,  consult
  3937. _/_e_t_c_/_d_i_s_k_t_a_b.
  3938.  
  3939.      It is desirable that full dumps of the root file system
  3940. be   made   regularly.    These  dumps  should  be  made  in
  3941. ``bootable`` format, including the standalone programs  men-
  3942. tioned  back  in  chapter 2 (boot, mkfs, restor and icheck).
  3943. This can easily be done by going to /sys/pdpstand and doing:
  3944.  
  3945.      make all
  3946.       ./maketape /dev/nrmtXX maketape.data
  3947.      dump 0u /
  3948.  
  3949. This  is  especially  true  when only one disk is available.
  3950. Then, if the root file system is damaged by  a  hardware  or
  3951. software  failure,  you  can rebuild a workable disk doing a
  3952. restore in the same way that the initial  root  file  system
  3953. was created.
  3954.  
  3955.  
  3956.  
  3957.  
  3958.                         17 March 1998
  3959.  
  3960.  
  3961.  
  3962.  
  3963.  
  3964. Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 61
  3965.  
  3966.  
  3967.      Exhaustion  of  user-file space is certain to occur now
  3968. and then and may be managed with a combination of disc  quo-
  3969. tas  (the  4.3BSD disc quota system is available as a kernel
  3970. configuration option), threatening messages of the day,  and
  3971. personal letters.
  3972.  
  3973. 66..44..  MMoovviinngg ffiillee ssyysstteemm ddaattaa
  3974.  
  3975.      If  you have the equipment, the best way to move a file
  3976. system is to dump it to magtape using _d_u_m_p(8), use  _n_e_w_f_s(8)
  3977. to  create  the new file system, and restore the tape, using
  3978. _r_e_s_t_o_r(8).  If for some reason you don't want  to  use  mag-
  3979. tape,  dump  accepts  an  argument  telling where to put the
  3980. dump; you might use another disk.  Filesystems may  also  be
  3981. moved  by piping the output of a _t_a_r(1) to another _t_a_r.  The
  3982. _r_e_s_t_o_r program accesses the raw device, laying  down  inodes
  3983. and  blocks  in the same place they came from as recorded by
  3984. dump.  Care must therefore be taken when  restoring  a  dump
  3985. into a file system smaller than the original file system.
  3986.  
  3987.      If  you  have  to  shrink a file system or merge a file
  3988. system into another, existing one, the best bet  is  to  use
  3989. _t_a_r(1).   If  you  are playing with the root file system and
  3990. only have one drive, the procedure is more complicated.   If
  3991. the  only drive is a Winchester disk, this procedure may not
  3992. be used without overwriting the  existing  root  or  another
  3993. partition.  What you do is the following:
  3994.  
  3995. 1.   GET A SECOND PACK!!!!
  3996.  
  3997. 2.   Dump the root file system to tape using _d_u_m_p(8).
  3998.  
  3999. 3.   Bring the system down and mount the new pack.
  4000.  
  4001. 4.   Load  the  distribution  tape  and install the new root
  4002.      file system as you did when first installing  the  sys-
  4003.      tem.
  4004.  
  4005. 5.   Boot normally using the newly created disk file system.
  4006.  
  4007.      Note that if you add new disk drivers they should  also
  4008. be  added to the standalone system in _/_s_y_s_/_p_d_p_s_t_a_n_d.  If you
  4009. change the disk partition tables the default disk  partition
  4010. tables in _/_e_t_c_/_d_i_s_k_t_a_b should be modified.
  4011.  
  4012. 66..55..  RReeccoommppiilliinngg aanndd rreeiinnssttaalllliinngg ssyysstteemm ssooffttwwaarree
  4013.  
  4014.      It  is  easy to regenerate the system, and it is a good
  4015. idea to try rebuilding pieces of the system to build  confi-
  4016. dence  in  the procedures.  The system consists of two major
  4017. parts: the  kernel  itself  (/sys)  and  the  user  programs
  4018. (/usr/src  and  subdirectories).   The major part of this is
  4019. /usr/src.
  4020.  
  4021.  
  4022.  
  4023.  
  4024.                         17 March 1998
  4025.  
  4026.  
  4027.  
  4028.  
  4029.  
  4030. setup.2.11 - 62Installing and Operating 2.11BSD on the PDP-11
  4031.  
  4032.  
  4033.      The  three  major  libraries  are  the  C  library   in
  4034. /usr/src/lib/libc      and     the     FORTRAN     libraries
  4035. /usr/src/usr.lib/libI77  and  /usr/src/usr.lib/libF77.    In
  4036. each  case the library is remade by changing into the corre-
  4037. sponding directory and doing
  4038.  
  4039.      ## make
  4040.  
  4041. and then installed by
  4042.  
  4043.      ## make install
  4044.  
  4045. Similar to the system,
  4046.  
  4047.      ## make clean
  4048.  
  4049. cleans up.
  4050.  
  4051.      The source for all other libraries is kept in subdirec-
  4052. tories  of  /usr/src/usr.lib; each has a makefile and can be
  4053. recompiled by the above recipe.
  4054.  
  4055.      If you look at /usr/src/Makefile, you will see that you
  4056. can recompile the entire system source with one command.  To
  4057. recompile a specific program,  find  out  where  the  source
  4058. resides  with  the  _w_h_e_r_e_i_s(1)  command, then change to that
  4059. directory and remake it with the  makefile  present  in  the
  4060. directory.  For instance, to recompile ``date'', all one has
  4061. to do is
  4062.  
  4063.      ## whereis date
  4064.      ddaattee:: //uussrr//ssrrcc//bbiinn//ddaattee..cc //bbiinn//ddaattee //uussrr//mmaann//mmaann11//ddaattee..11
  4065.      ## cd /usr/src/bin
  4066.      ## make date
  4067.  
  4068. this will create an  unstriped  version  of  the  binary  of
  4069. ``date''  in  the  current directory.  To install the binary
  4070. image, use the install command as in
  4071.  
  4072.      ## install -s date /bin/date
  4073.  
  4074. The -s option will insure the installed version of date  has
  4075. its  symbol  table  stripped.  The install command should be
  4076. used instead of mv or cp as it understands  how  to  install
  4077. programs even when the program is currently in use.
  4078.  
  4079.      If  you wish to recompile and install all programs in a
  4080. particular target area you can override the  default  target
  4081. by doing:
  4082.  
  4083.      ## make
  4084.      ## make DESTDIR=_p_a_t_h_n_a_m_e install
  4085.  
  4086.  
  4087.  
  4088.  
  4089.  
  4090.                         17 March 1998
  4091.  
  4092.  
  4093.  
  4094.  
  4095.  
  4096. Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 63
  4097.  
  4098.  
  4099.      To regenerate all the system source you can do
  4100.  
  4101.      ## cd /usr/src
  4102.      ## make
  4103.  
  4104.  
  4105.      If  you  modify  the  C library, say to change a system
  4106. call, and  want  to  rebuild  and  install  everything  from
  4107. scratch  you  have  to be a little careful.  You must insure
  4108. that the libraries are installed before the remainder of the
  4109. source, otherwise the loaded images will not contain the new
  4110. routine from  the  library.   The  following  sequence  will
  4111. accomplish this.
  4112.  
  4113.      ## cd /usr/src
  4114.      ## make clean
  4115.      ## make build
  4116.      ## make installsrc
  4117.  
  4118. The  first  _m_a_k_e removes any existing binaries in the source
  4119. trees to insure that everything is reloaded.  The next  _m_a_k_e
  4120. compiles and installs the libraries and compilers, then com-
  4121. piles the remainder of the sources.  The final line installs
  4122. all  of the commands not installed in the first phase.  This
  4123. will take about 12 hours on a reasonably configured 11/44.
  4124.  
  4125. 66..66..  MMaakkiinngg llooccaall mmooddiiffiiccaattiioonnss
  4126.  
  4127.      /usr/new is used by default for the programs that  con-
  4128. stitute the contributed software portion of the distribution
  4129. but which may not have man pages installed.  Locally written
  4130. commands that aren't distributed (or whose man pages are not
  4131. up to date) are kept in /usr/src/local  and  their  binaries
  4132. are kept in /usr/local.  This allows /usr/bin, /usr/ucb, and
  4133. /bin to correspond to the  distribution  tape  People  using
  4134. /usr/local commands are made aware that the programs may not
  4135. be in the base system yet.
  4136.  
  4137. 66..77..  AAccccoouunnttiinngg
  4138.  
  4139.      UNIX optionally records two kinds of accounting  infor-
  4140. mation:   connect   time  accounting  and  process  resource
  4141. accounting.  The  connect  time  accounting  information  is
  4142. stored in the file _/_u_s_r_/_a_d_m_/_w_t_m_p, which is summarized by the
  4143. program _a_c(8).  The process time accounting  information  is
  4144. stored  in  the  file  _/_u_s_r_/_a_d_m_/_a_c_c_t  after it is enabled by
  4145. _a_c_c_t_o_n(8), and is analyzed and  summarized  by  the  program
  4146. _s_a(8).
  4147.  
  4148.      If  you  need  to  recharge for computing time, you can
  4149. develop procedures based  on  the  information  provided  by
  4150. these commands.  A convenient way to do this is to give com-
  4151. mands to the clock daemon _c_r_o_n to be executed every day at a
  4152. specified   time.    This   is   done  by  adding  lines  to
  4153.  
  4154.  
  4155.  
  4156.                         17 March 1998
  4157.  
  4158.  
  4159.  
  4160.  
  4161.  
  4162. setup.2.11 - 64Installing and Operating 2.11BSD on the PDP-11
  4163.  
  4164.  
  4165. _/_u_s_r_/_a_d_m_/_c_r_o_n_t_a_b; see _c_r_o_n(8) for details.
  4166.  
  4167. 66..88..  RReessoouurrccee ccoonnttrrooll
  4168.  
  4169.      Resource control in 2.11BSD is more elaborate  than  in
  4170. previous PDP-11 UNIX systems.  The resources consumed by any
  4171. single  process  can  be  limited  by  the   mechanisms   of
  4172. _s_e_t_r_l_i_m_i_t(2).   As  distributed, the mechanism is voluntary,
  4173. though sites may choose to modify  the  login  mechanism  to
  4174. impose  limits.   Csh  now  has  the  _l_i_m_i_t_s builtin command
  4175. enabled.  Another available option is the 4.3BSD disc  quota
  4176. system.
  4177.  
  4178. 66..99..  FFiilleess tthhaatt nneeeedd ppeerriiooddiicc aatttteennttiioonn
  4179.  
  4180.      The  discussion  of  system  operations is concluded by
  4181. listing the files that require  periodic  attention  or  are
  4182. system specific
  4183.  
  4184. //eettcc//ffssttaabb              how disk partitions are used
  4185. //eettcc//ddiisskkttaabb            disk partition sizes
  4186. //eettcc//pprriinnttccaapp           printer data base
  4187. //eettcc//ggeettttyyttaabb           terminal type definitions
  4188. //eettcc//rreemmoottee             names and phone numbers of remote machines for _t_i_p(1)
  4189. //eettcc//ggrroouupp              group memberships
  4190. //eettcc//mmoottdd               message of the day
  4191. //eettcc//mmaasstteerr..ppaasssswwdd      password file; each account has a line
  4192. //eettcc//rrcc..llooccaall           local system restart script; runs reboot; starts daemons
  4193. //eettcc//iinneettdd..ccoonnff         local internet servers
  4194. //eettcc//hhoossttss              host name data base
  4195. //eettcc//nneettwwoorrkkss           network name data base
  4196. //eettcc//nneettssttaarrtt           Startup file to configure network
  4197. //eettcc//sseerrvviicceess           network services data base
  4198. //eettcc//hhoossttss..eeqquuiivv        hosts under same administrative control
  4199. //eettcc//ssyysslloogg..ccoonnff        error log configuration for _s_y_s_l_o_g_d(8)
  4200. //eettcc//ttttyyss               enables/disables ports
  4201. //eettcc//ccrroonnttaabb            commands that are run periodically
  4202. //eettcc//aalliiaasseess            mail forwarding and distribution groups
  4203. //uussrr//aaddmm//aacccctt           raw process account data
  4204. //uussrr//aaddmm//mmeessssaaggeess       system error log
  4205. //uussrr//aaddmm//sshhuuttddoowwnnlloogg    log of system reboots
  4206. //uussrr//aaddmm//wwttmmpp           login session accounting
  4207.  
  4208.  
  4209.  
  4210.  
  4211.  
  4212.  
  4213.  
  4214.  
  4215.  
  4216.  
  4217.  
  4218.  
  4219.  
  4220.  
  4221.  
  4222.                         17 March 1998
  4223.  
  4224.  
  4225.  
  4226.  
  4227.  
  4228. Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 65
  4229.  
  4230.  
  4231.          AAPPPPEENNDDIIXX AA -- KKEERRNNEELL CCOONNFFIIGGUURRAATTIIOONN OOPPTTIIOONNSS
  4232.  
  4233.  
  4234.  
  4235. 77..11..  KKeerrnneell ccoonnffiigguurraattiioonn ooppttiioonnss
  4236.  
  4237.      The  2.11BSD  kernel  has  a  number  of parameters and
  4238. options that can be used to tailor the kernel to  site  spe-
  4239. cific needs.  This appendix lists the parameters and options
  4240. used in the kernel.  The  parameters  have  numeric  values,
  4241. usually  table  sizes.  The options flags are either defined
  4242. or undefined (via the values YES or NO respectively.)
  4243.  
  4244.      Prototypes for all the following options can  be  found
  4245. in  the generic kernel configuration file _/_s_y_s_/_c_o_n_f_/_G_E_N_E_R_I_C.
  4246. The process of configuring a new kernel consists  simply  of
  4247. copying the generic configuration file to a new file, _S_Y_S_T_E_M
  4248. and then editing the  options  in  _S_Y_S_T_E_M  to  reflect  your
  4249. needs.   You  can  treat  the items copied from GENERIC as a
  4250. ``grocery list'',  checking  off  those  options  you  want,
  4251. crossing  out those you don't and setting numeric parameters
  4252. to reasonable values.
  4253.  
  4254. 77..22..  CCoonnffiigguurriinngg  tthhee  nnuummbbeerr  ooff  mmoouunnttaabbllee  ffiillee  ssyysstteemmss
  4255. ((NNMMOOUUNNTT))
  4256.  
  4257.      Because of time constraints the NNMMOOUUNNTT constant was not
  4258. moved into the kernel configuration file where  it  belongs.
  4259. NNMMOOUUNNTT  is  used  to  configure the number of mountable file
  4260. systems in 2.11BSD.  Since each slot  in  the  kernel  mount
  4261. table  takes  up  close to a half Kb of valuable kernel data
  4262. space, the distribution kernel comes configured with  NNMMOOUUNNTT
  4263. set to 5.  This is almost certainly too small for most sites
  4264. and should be increased to the number of  file  systems  you
  4265. expect to mount.
  4266.  
  4267.      NNMMOOUUNNTT is defined in _/_s_y_s_/_h_/_p_a_r_a_m_._h.  If you change its
  4268. value, you must recompile the  kernel  (obviously)  and  the
  4269. following applications: _m_o_u_n_t, _q_u_o_t_a_o_n, _e_d_q_u_o_t_a, _u_m_o_u_n_t, and
  4270. _d_f.
  4271.  
  4272. 77..33..  GGEENNEERRIICC kkeerrnneell ccoonnffiigguurraattiioonn
  4273.  
  4274.      All  of  the  generic  kernels  support  the  following
  4275. devices:
  4276.  
  4277. Device                              Number
  4278. -
  4279. RK06/07                               2
  4280. MSCP (RA) Controllers                 2
  4281. MSCP (RA) Disks                       3
  4282. RL01/02 Drives                        2
  4283. SMD (XP) Controllers                  1
  4284.  
  4285.  
  4286.  
  4287.  
  4288.                         17 March 1998
  4289.  
  4290.  
  4291.  
  4292.  
  4293.  
  4294. setup.2.11 - 66Installing and Operating 2.11BSD on the PDP-11
  4295.  
  4296.  
  4297. SMD (XP) Disks                        2
  4298. TE16, TU45, TU77 (HT) Tape drives     2
  4299. TM11 (TM) Tape drives                 2
  4300. TS11 (TS) Tape drives                 2
  4301. TK50 (TMSCP) Tape drives              2
  4302.  
  4303.  
  4304.      The  generic  kernel adapts automatically to the booted
  4305. device.  The 'a' partition on the booted device is automati-
  4306. cally  made  the  root  filesystem and the 'b' partition the
  4307. swap area (except for the RL02 which uses the second drive).
  4308. The  size  of  the swap partition is determined at run time,
  4309. the kernel queries the driver for the number of block in the
  4310. 'b'  partition.   NNOOTTEE:: If the swap partition is not labeled
  4311. as being of type _s_w_a_p the kernel will panic.
  4312.  
  4313. 77..33..11..  GGEENNEERRIICC kkeerrnneell ccoonnffiigguurraattiioonn ffiillee
  4314.  
  4315.      # Machine configuration file for 2.11BSD distributed kernel.
  4316. #
  4317. # Format:
  4318. #       name    value           comments
  4319. # An item's value may be either numerical, boolean or a string; if it's
  4320. # boolean, use "YES" or "NO" to set it or unset it, respectively.  Use
  4321. # the default value and the comments field as indicators of the type of
  4322. # field it is.
  4323.  
  4324. #########################################
  4325. # MACHINE DEPENDENT PARAMETERS          #
  4326. #########################################
  4327.  
  4328. # Machine type
  4329. # Split I/D and hardware floating point are required.
  4330. #
  4331. # Including UNIBUS map support for machines without a UNIBUS will not cause
  4332. # a kernel to die.  It simply includes code to support UNIBUS mapping if
  4333. # present.
  4334. #
  4335. # The define UNIBUS_MAP implements kernel support for UNIBUS mapped
  4336. # machines.  However, a kernel compiled with UNIBUS_MAP does *not* have to
  4337. # be run on a UNIBUS machine.  The define simply includes support for UNIBUS
  4338. # mapping if the kernel finds itself on a machine with UNIBUS mapping.
  4339. UNIBUS_MAP      YES                     # include support for UNIBUS mapping
  4340.  
  4341. # The define Q22 has been removed.  The references to it were incorrect
  4342. # (i.e. using it to distinguish between an Emulex CS02 and a DH11) or
  4343. # inappropriate (the if_il.c driver should have been checking if a Unibus
  4344. # Map was present at runtime).
  4345.  
  4346. #LINEHZ         50              # clock frequency European
  4347. LINEHZ          60                      # clock frequency USA
  4348.  
  4349. # PDP-11 machine type; allowable values are GENERIC, 44, 70, 73.  GENERIC
  4350. # should only be used to build a distribution kernel.  The only use of this
  4351.  
  4352.  
  4353.  
  4354.                         17 March 1998
  4355.  
  4356.  
  4357.  
  4358.  
  4359.  
  4360. Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 67
  4361.  
  4362.  
  4363. # option is to select the proper in-line PS instructions (references to the
  4364. # PSW use 'spl', 'mfps/mtps' or 'movb' instructions depending on the cpu type).
  4365. PDP11           GENERIC         # distribution kernel
  4366. #PDP11          44                      # PDP-11/44
  4367. #PDP11          70                      # PDP-11/70,45,50,55
  4368. #PDP11          73                      # PDP-11/73,53,83,93,84,94
  4369.  
  4370. #########################################
  4371. # GENERAL SYSTEM PARAMETERS             #
  4372. #########################################
  4373.  
  4374. IDENT           GENERIC                 # machine name
  4375. MAXUSERS        4                       # maxusers on machine
  4376.  
  4377. # BOOTDEV is the letter combination denoting the autoboot device,
  4378. # or NONE if not using the autoboot feature.
  4379. BOOTDEV         NONE            # don't autoboot
  4380. #BOOTDEV        dvhp                    # DIVA Comp/V boot device
  4381. #BOOTDEV        hk6                     # rk06 boot device
  4382. #BOOTDEV        hk7                     # rk07 boot device
  4383. #BOOTDEV        ra                      # MSCP boot device
  4384. #BOOTDEV        rl                      # rl01/02 boot device
  4385. #BOOTDEV        rm                      # rm02/03/05 boot device
  4386. #BOOTDEV        br                      # Eaton BR1537/BR1711 boot device
  4387. #BOOTDEV        sc11                    # Emulex SC11/B boot device
  4388. #BOOTDEV        sc21                    # Emulex SC21 boot device
  4389. #BOOTDEV        si                      # si 9500 boot device
  4390.  
  4391. # Timezone, in minutes west of GMT
  4392. #TIMEZONE       300                     # EST
  4393. #TIMEZONE       360                     # CST
  4394. #TIMEZONE       420                     # WST
  4395. TIMEZONE        480                     # PST
  4396. DST             1                       # Daylight Savings Time (1 or 0)
  4397.  
  4398. # Filesystem configuration
  4399. # Rootdev, swapdev etc. should be in terms of makedev.  For example,
  4400. # if you have an SMD drive using the xp driver, rootdev would be xp0a,
  4401. # or "makedev(10,0)".  Swapdev would be the b partition, xp0b, or
  4402. # "makedev(10,1)".  The 10 is the major number of the device (the offset
  4403. # in the bdevsw table in conf.c) and the 0 and 1 are the minor numbers
  4404. # which correspond to the partitions as described in the section 4 manual
  4405. # pages.  You can also get the major numbers from the MAKEDEV script in
  4406. # /dev.
  4407. PIPEDEV         makedev(10,0)           # makedev(10,0) xp0a
  4408. ROOTDEV         makedev(10,0)           # makedev(10,0) xp0a
  4409. SWAPDEV         makedev(10,1)           # makedev(10,1) xp0b
  4410.  
  4411. # DUMPROUTINE indicates which dump routine should be used.  DUMPDEV
  4412. # should be in terms of makedev.  If DUMPDEV is NODEV no automatic
  4413. # dumps will be taken, and DUMPROUTINE needs to be set to "nulldev" to
  4414. # resolve the reference.  See param.h and ioconf.c for more information.
  4415. # DUMPLO should leave room for the kernel to start swapping without
  4416. # overwriting the dump.
  4417.  
  4418.  
  4419.  
  4420.                         17 March 1998
  4421.  
  4422.  
  4423.  
  4424.  
  4425.  
  4426. setup.2.11 - 68Installing and Operating 2.11BSD on the PDP-11
  4427.  
  4428.  
  4429. DUMPLO          512                     # dump start address
  4430. DUMPDEV         NODEV                   # makedev(10,1) xp0b
  4431. DUMPROUTINE     nulldev                 # no dump routine.
  4432. #DUMPROUTINE    hkdump                  # hk driver dump routine
  4433. #DUMPROUTINE    hpdump                  # hp driver dump routine
  4434. #DUMPROUTINE    radump                  # ra driver dump routine
  4435. #DUMPROUTINE    rldump                  # rl driver dump routine
  4436. #DUMPROUTINE    rmdump                  # rm driver dump routine
  4437. #DUMPROUTINE    brdump                  # br driver dump routine
  4438. #DUMPROUTINE    sidump                  # si driver dump routine
  4439. #DUMPROUTINE    xpdump                  # xp driver dump routine
  4440. #DUMPROUTINE    tmsdump                 # tms driver dump routine
  4441.  
  4442. #########################################
  4443. # KERNEL CONFIGURATION                  #
  4444. #########################################
  4445.  
  4446. BADSECT         NO              # bad-sector forwarding
  4447. EXTERNALITIMES  YES             # map out inode time values
  4448. UCB_CLIST       NO                      # clists moved from kernel data space
  4449. NOKA5           NO                      # KA5 not used except for buffers
  4450.                                         # and clists (_end < 0120000);
  4451. QUOTA           NO                      # dynamic file system quotas
  4452.                                         # NOTE -- *very* expensive
  4453.  
  4454. # UCB_METER is fairly expensive, but various programs (iostat, vmstat, etc)
  4455. # use it.
  4456. UCB_METER       NO                      # vmstat performance metering
  4457.  
  4458. # NBUF is the size of the buffer cache, and is directly related to the UNIBUS
  4459. # mapping registers.  There are 32 total mapping registers, of which 30 are
  4460. # available.  The 0'th is used for CLISTS, and the 31st is used for the I/O
  4461. # page on some PDP's.  It's suggested that you allow 7 mapping registers
  4462. # per UNIBUS character device so that you can move 56K of data on each device
  4463. # simultaneously.  The rest should be assigned to the block buffer pool.  So,
  4464. # if you have a DR-11 and a TM-11, you would leave 14 unassigned for them and
  4465. # allocate 16 to the buffer pool.  Since each mapping register addresses 8
  4466. # buffers for a 1K file system, NBUF would be 128.  A possible exception would
  4467. # be to reduce the buffers to save on data space, as they were 24 bytes each
  4468. # Should be 'small' for GENERIC, so room for kernel + large program to run.
  4469. NBUF            32                      # buffer cache, *must* be <= 240
  4470.  
  4471. # DIAGNOSTIC does various run-time checks, some of which are pretty
  4472. # expensive and at a high priority.  Suggested use is when the kernel
  4473. # is crashing and you don't know why, otherwise run with it off.
  4474. DIAGNOSTIC      NO                      # misc. diagnostic loops and checks
  4475.  
  4476. #########################################
  4477. # PERIPHERALS: DISK DRIVES              #
  4478. #########################################
  4479.  
  4480. NBR             0               # EATON BR1537/BR1711, BR1538A, B, C, D
  4481.  
  4482. NHK             2               # RK611, RK06/07
  4483.  
  4484.  
  4485.  
  4486.                         17 March 1998
  4487.  
  4488.  
  4489.  
  4490.  
  4491.  
  4492. Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 69
  4493.  
  4494.  
  4495. NRAC            1               # NRAD controllers
  4496. NRAD            2               # RX50, RC25, RD51/52/53, RA60/80/81
  4497.  
  4498. NRK             0               # RK05
  4499.  
  4500. NRL             2               # RL01/02
  4501.  
  4502. NRX             0               # RX02
  4503.  
  4504. NSI             0               # SI 9500 driver for CDC 9766 disks
  4505.  
  4506. # Because the disk drive type registers conflict with other DEC
  4507. # controllers, you cannot use XP_PROBE for the Ampex 9300 and
  4508. # Diva drives.  Read through /sys/pdpuba/hpreg.h and /sys/pdpuba/xp.c
  4509. # for information on how to initialize for these drives.
  4510. NXPC            1               # NXPD controllers (RH70/RH11 style)
  4511. NXPD            2               # RM02/03/05, RP04/05/06, CDC 9766,
  4512.                                 # Ampex 9300, Diva, Fuji 160, SI Eagle.
  4513. XP_PROBE        YES             # check drive types at boot
  4514.  
  4515. NRAM            0               # RAM disk size (512-byte blocks)
  4516.  
  4517. #########################################
  4518. # PERIPHERALS: TAPE DRIVES              #
  4519. #########################################
  4520.  
  4521. NHT             2               # TE16, TU45, TU77
  4522.  
  4523. # Setting AVIVTM configures the TM driver for the AVIV 800/1600/6250
  4524. # controller (the standard DEC TM only supports 800BPI).  For more details,
  4525. # see /sys/pdpuba/tm.c.
  4526. NTM             2               # TM11
  4527. AVIVTM          YES             # AVIV 800/1600/6250 controller
  4528.  
  4529. NTS             2               # TS11
  4530.  
  4531. NTMSCP          2               # TMSCP controllers
  4532. NTMS            2               # TMSCP drives
  4533. TMSCP_DEBUG     NO              # debugging code in TMSCP drive (EXPENSIVE)
  4534.  
  4535. #########################################
  4536. # PERIPHERALS: TERMINALS                #
  4537. #########################################
  4538.  
  4539. # NKL includes both KL11's and DL11's.
  4540. # It should always be at least 1, for the console.
  4541. NKL             1               # KL11, DL11
  4542. NDH             0               # DH11; NDH is in units of boards (16 each)
  4543. CS02            NO              # DH units above are really Emulex CS02
  4544.                                 # boards on a 22bit Qbus.
  4545. NDM             0               # DM11; NDM is in units of boards (16 each)
  4546. NDHU            0               # DHU11
  4547. NDHV            0               # DHV11
  4548. NDZ             0               # DZ11; NDZ is in units of boards (8 each)
  4549.  
  4550.  
  4551.  
  4552.                         17 March 1998
  4553.  
  4554.  
  4555.  
  4556.  
  4557.  
  4558. setup.2.11 - 70Installing and Operating 2.11BSD on the PDP-11
  4559.  
  4560.  
  4561. #########################################
  4562. # PERIPHERALS: OTHER                    #
  4563. #########################################
  4564. NDN             0               # DN11 dialer
  4565. NLP             0               # Line Printer
  4566. LP_MAXCOL       132             # Maximum number of columns on line printers
  4567. NDR             0               # DR11-W
  4568.  
  4569. #########################################
  4570. # PSEUDO DEVICES, PROTOCOLS, NETWORKING #
  4571. #########################################
  4572. # Networking only works with split I/D and SUPERVISOR space, i.e. with the
  4573. # 11/44/45/50/53/55/70/73/83/84.  NETHER should be non-zero for networking
  4574. # systems using any ethernet.  CHECKSTACK makes sure the networking stack
  4575. # pointer and the kernel stack pointer don't collide; it's fairly expensive
  4576. # at 4 extra instructions for EVERY function call AND return, always left
  4577. # NO unless doing serious debugging.
  4578. INET            NO              # TCP/IP
  4579. CHECKSTACK      NO              # Kernel & Supervisor stack pointer checking
  4580. NETHER          0               # ether pseudo-device
  4581.  
  4582. # Note, PTY's and the select(2) system call do not require the kernel to
  4583. # be configured for networking (INET).  Note that you can allocate PTY's
  4584. # in any number (multiples of 8, of 16, even, odd, prime, whatever).  Nothing
  4585. # in the kernel cares.  PTY's cost 78 bytes apiece in kernel data space.  You
  4586. # should probably have at least 8-10 since several applications use them:
  4587. # script, jove, window, rlogin, ...
  4588. NPTY            0               # pseudo-terminals - GENERIC sys needs NONE
  4589.  
  4590. # To make the 3Com Ethernet board work correctly, splimp has to be promoted
  4591. # to spl6; splfix files that do this are in conf/3Com; the config script
  4592. # does the right thing.
  4593. NEC             0               # 3Com Ethernet
  4594. NDE             0               # DEUNA/DELUA
  4595. NIL             0               # Interlan Ethernet
  4596. NSL             0               # Serial Line IP
  4597. NQE             0               # DEQNA
  4598. NQT             0               # DEQTA (DELQA-YM, DELQA-PLUS)
  4599. NVV             0               # V2LNI (Pronet)
  4600. NACC            0               # ACC LH/DH ARPAnet IMP interface
  4601. PLI             NO              # LH/DH is connected to a PLI
  4602. NIMP            0               # ARPAnet IMP 1822 interface
  4603.  
  4604. # The following are untested in 2.11BSD; some are untested since before 2.9BSD
  4605. # Some won't even compile.  Most will require modification.  Good luck.
  4606. ENABLE34        NO              # if have the ENABLE34 board
  4607.  
  4608. NCSS            0               # DEC/CSS IMP11-A ARPAnet IMP interface
  4609. NDMC            0               # DMC11
  4610. NEN             0               # Xerox prototype (3 Mb) Ethernet
  4611. NHY             0               # Hyperchannel
  4612. NS              0               # Xerox NS (XNS)
  4613. NSRI            0               # SRI DR11c ARPAnet IMP
  4614. NTB             0               # RS232 interface for Genisco/Hitachi tablets
  4615.  
  4616.  
  4617.  
  4618.                         17 March 1998
  4619.  
  4620.  
  4621.  
  4622.  
  4623.  
  4624. Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 71
  4625.  
  4626.  
  4627. # Defining FPSIM to YES compiles a floating point simulator into the kernel
  4628. # which will catch floating point instruction traps from user space.  This
  4629. # doesn't work at present.
  4630. FPSIM           NO              # floating point simulator
  4631.  
  4632. # To enable profiling, the :splfix script must be changed to use spl6 instead
  4633. # of spl7 (see conf/:splfix.profile), also, you have to have a machine with a
  4634. # supervisor PAR/PDR pair, i.e. an 11/44/45/50/53/55/70/73/83/84, as well
  4635. # as both a KW11-L and a KW11-P.
  4636. #
  4637. # Note that profiling is not currently working.  We don't have any plans on
  4638. # fixing it, so this is essentially a non-supported feature.
  4639. PROFILE         NO              # system profiling with KW11P clock
  4640.  
  4641. INGRES          NO              # include the Ingres lock driver
  4642.  
  4643.  
  4644.  
  4645.  
  4646.  
  4647.  
  4648.  
  4649.  
  4650.  
  4651.  
  4652.  
  4653.  
  4654.  
  4655.  
  4656.  
  4657.  
  4658.  
  4659.  
  4660.  
  4661.  
  4662.  
  4663.  
  4664.  
  4665.  
  4666.  
  4667.  
  4668.  
  4669.  
  4670.  
  4671.  
  4672.  
  4673.  
  4674.  
  4675.  
  4676.  
  4677.  
  4678.  
  4679.  
  4680.  
  4681.  
  4682.  
  4683.  
  4684.                         17 March 1998
  4685.  
  4686.  
  4687.  
  4688.  
  4689.  
  4690. setup.2.11 - 72Installing and Operating 2.11BSD on the PDP-11
  4691.  
  4692.  
  4693.          AAPPPPEENNDDIIXX BB -- SSTTAANNDDAALLOONNEE DDIISSKKLLAABBEELL PPRROOGGRRAAMM
  4694.  
  4695.  
  4696.  
  4697. 88..11..  SSttaannddaalloonnee ddiisskkllaabbeell eexxaammppllee
  4698.  
  4699.      This is a real example of using the  disklabel  program
  4700. to  place  a  label  on a disk.  User input is in bboolldd type.
  4701. The disklabel program was loaded from a bootable TK50.   The
  4702. disk  being labeled in a RD54.  The BOOT> prompt is from the
  4703. 11/73 console ODT, if you are using an 11/44 the prompt will
  4704. be >>>.
  4705.  
  4706.      The  first  thing  that is done is request disklabel to
  4707. create a default partition  ('a')  which  spans  the  entire
  4708. disk.   Some disk types have fixed sizes and geometries, for
  4709. example RK05 (rk), RK06/7 (hk) and RL02 (rl)  drives.   With
  4710. this type of disk the standalone disklabel program will gen-
  4711. erate a label with the correct geometry  and  'a'  partition
  4712. size.   With MSCP ('ra') disks disklabel will query the con-
  4713. troller for the information it  needs.   The  last  type  of
  4714. disk,  SMD  (xp),  presents  many  problems,  disklabel will
  4715. attempt to determine the drive type  and  geometry  but  you
  4716. will have to verify the information.
  4717.  
  4718.       Indented paragraphs like this one are explanatory com-
  4719.       ments and are not part of the output from the  diskla-
  4720.       bel program.  In the case of MSCP drives the number of
  4721.       cylinders may be 1 too low.  This is discussed in  the
  4722.       example below.
  4723.  
  4724. BOOT> MMUU 00
  4725.  
  4726. 73Boot from tms(0,0,0) at 0174500
  4727. : ttmmss((00,,11))
  4728. Boot: bootdev=06001 bootcsr=0174500
  4729. disklabel
  4730. Disk? rraa((00,,00))
  4731. d(isplay) D(efault) m(odify) w(rite) q(uit)? DD
  4732. d(isplay) D(efault) m(odify) w(rite) q(uit)? dd
  4733.  
  4734. type: MSCP
  4735. disk: RD54
  4736. flags:
  4737. bytes/sector: 512
  4738. sectors/track: 17
  4739. tracks/cylinder: 15
  4740. sectors/cylinder: 255
  4741. cylinders: 1220
  4742. rpm: 3600
  4743. drivedata: 0 0 0 0 0
  4744.  
  4745. 1 partitions:
  4746. #      size   offset   fstype   [fsize bsize]
  4747.  
  4748.  
  4749.  
  4750.                         17 March 1998
  4751.  
  4752.  
  4753.  
  4754.  
  4755.  
  4756. Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 73
  4757.  
  4758.  
  4759.   a: 311200 0 2.11BSD 1024 1024  # (Cyl. 0 - 1220*)
  4760.  
  4761.       The  columns  do not line up nicely under the headings
  4762.       due to limitations of the  sprintf()  routine  in  the
  4763.       standalone  I/O  package.   There  is no capability to
  4764.       justify the output.  It should be obvious which column
  4765.       belongs  under  which  heading.  The '*' says that the
  4766.       partition does not end on a cylinder  boundary.   This
  4767.       is  due  to the peculiar way in which MSCP returns the
  4768.       geometry information:  sectors/track * tracks/cylinder
  4769.       * cylinders != sectors per volume.
  4770.  
  4771. d(isplay) D(efault) m(odify) w(rite) q(uit)? mm
  4772. modify
  4773. d(isplay) g(eometry) m(isc) p(artitions) q(uit)? mm
  4774.  
  4775.       It is normally not necessary to change the geometry of
  4776.       an MSCP disk.  On the other hand it will almost always
  4777.       be  necessary  to specify the geometry of an SMD drive
  4778.       (one which uses the XP driver).  Since the drive being
  4779.       labeled  is  an MSCP drive the next step is to set the
  4780.       pack label to something other than DEFAULT.
  4781.  
  4782. modify misc
  4783. d(isplay) t(ype) n(ame) l(able) f(lags) r(pm) D(rivedata) q(uit)? ll
  4784. label [DEFAULT]: TTEESSTTIINNGG
  4785. modify misc
  4786. d(isplay) t(ype) n(ame) l(able) f(lags) r(pm) D(rivedata) q(uit)? qq
  4787. modify
  4788. d(isplay) g(eometry) m(isc) p(artitions) q(uit)? pp
  4789. modify partitions
  4790. d(isplay) n(umber) s(elect) q(uit)? dd
  4791.  
  4792. type: MSCP
  4793. disk: RD54
  4794. flags:
  4795. bytes/sector: 512
  4796. sectors/track: 17
  4797. tracks/cylinder: 15
  4798. sectors/cylinder: 255
  4799. cylinders: 1220
  4800. rpm: 3600
  4801. drivedata: 0 0 0 0 0
  4802.  
  4803. 1 partitions:
  4804. #      size   offset   fstype   [fsize bsize]
  4805.   a: 311200 0 2.11BSD 1024 1024  # (Cyl. 0 - 1220*)
  4806.  
  4807. modify partitions
  4808. d(isplay) n(umber) s(elect) q(uit)? ss
  4809. a b c d e f g h q(uit)? aa
  4810. sizes and offsets may be given as sectors, cylinders
  4811. or cylinders plus sectors: 6200, 32c, 19c10s respectively
  4812. modify partition 'a'
  4813.  
  4814.  
  4815.  
  4816.                         17 March 1998
  4817.  
  4818.  
  4819.  
  4820.  
  4821.  
  4822. setup.2.11 - 74Installing and Operating 2.11BSD on the PDP-11
  4823.  
  4824.  
  4825. d(isplay) z(ero) t(ype) o(ffset) s(ize) f(rag) F(size) q(uit)? ss
  4826. 'a' size [311200]: 1155888844
  4827. d(isplay) z(ero) t(ype) o(ffset) s(ize) f(rag) F(size) q(uit)? qq
  4828. modify partitions
  4829. d(isplay) n(umber) s(elect) q(uit)? ss
  4830. a b c d e f g h q(uit)? bb
  4831. sizes and offsets may be given as sectors, cylinders
  4832. or cylinders plus sectors: 6200, 32c, 19c10s respectively
  4833. modify partition 'b'
  4834. d(isplay) z(ero) t(ype) o(ffset) s(ize) f(rag) F(size) q(uit)? oo
  4835. 'b' offset [0]: 1155888844
  4836. modify partition 'b'
  4837. d(isplay) z(ero) t(ype) o(ffset) s(ize) f(rag) F(size) q(uit)? ss
  4838. 'b' size [0]: 1166772200
  4839. modify partition 'b'
  4840. d(isplay) z(ero) t(ype) o(ffset) s(ize) f(rag) F(size) q(uit)? tt
  4841. 'b' fstype [unused]: sswwaapp
  4842. modify partition 'b'
  4843. d(isplay) z(ero) t(ype) o(ffset) s(ize) f(rag) F(size) q(uit)? qq
  4844. modify partitions
  4845. d(isplay) n(umber) s(elect) q(uit)? ss
  4846. a b c d e f g h q(uit)? cc
  4847. sizes and offsets may be given as sectors, cylinders
  4848. or cylinders plus sectors: 6200, 32c, 19c10s respectively
  4849. modify partition 'c'
  4850. d(isplay) z(ero) t(ype) o(ffset) s(ize) f(rag) F(size) q(uit)? oo
  4851. 'c' offset [0]: 00
  4852. modify partitions 'c'
  4853. d(isplay) z(ero) t(ype) o(ffset) s(ize) f(rag) F(size) q(uit)? ss
  4854. 'c' size [0]: 331111220000
  4855. modify partitions 'c'
  4856. d(isplay) z(ero) t(ype) o(ffset) s(ize) f(rag) F(size) q(uit)? tt
  4857. 'c' fstype [unused]: uunnuusseedd
  4858. modify partitions 'c'
  4859. d(isplay) z(ero) t(ype) o(ffset) s(ize) f(rag) F(size) q(uit)? qq
  4860. modify partitions
  4861. d(isplay) n(umber) s(elect) q(uit)? ss
  4862. a b c d e f g h q(uit)? gg
  4863. sizes and offsets may be given as sectors, cylinders
  4864. or cylinders plus sectors: 6200, 32c, 19c10s respectively
  4865. modify partition 'g'
  4866. d(isplay) z(ero) t(ype) o(ffset) s(ize) f(rag) F(size) q(uit)? oo
  4867. 'g' offset [0]: 3322660044
  4868. modify partition 'g'
  4869. d(isplay) z(ero) t(ype) o(ffset) s(ize) f(rag) F(size) q(uit)? ss
  4870. 'g' size [0]: 227788559966
  4871. modify partition 'g'
  4872. d(isplay) z(ero) t(ype) o(ffset) s(ize) f(rag) F(size) q(uit)? tt
  4873. 'g' fstype [unused]: 22..1111BBSSDD
  4874. modify partition 'g'
  4875. d(isplay) z(ero) t(ype) o(ffset) s(ize) f(rag) F(size) q(uit)? qq
  4876. modify partitions
  4877. d(isplay) n(umber) s(elect) q(uit)? nn
  4878. Number of partitions (8 max) [7]? 77
  4879.  
  4880.  
  4881.  
  4882.                         17 March 1998
  4883.  
  4884.  
  4885.  
  4886.  
  4887.  
  4888. Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 75
  4889.  
  4890.  
  4891. modify partitions
  4892. d(isplay) n(umber) s(elect) q(uit)? qq
  4893. modify
  4894. d(isplay) g(eometry) m(isc) p(artitions) q(uit)? dd
  4895.  
  4896. type: MSCP
  4897. disk: RD54
  4898. label: TESTING
  4899. flags:
  4900. bytes/sector: 512
  4901. sectors/track: 17
  4902. tracks/cylinder: 15
  4903. sectors/cylinder: 255
  4904. cylinders: 1220
  4905. rpm: 3600
  4906. drivedata: 0 0 0 0 0
  4907.  
  4908. 7 partitions:
  4909. #      size   offset   fstype   [fsize bsize]
  4910.   a: 15884   0  2.11BSD 1024 1024  # (Cyl. 0 - 62*)
  4911.   b: 16720 15884 swap              # (Cyl. 62*- 127*)
  4912.   c: 311200  0   unused 1024 1024  # (Cyl. 0 - 1220*)
  4913.   g: 278596 32604 2.11BSD 1024 1024 # (Cyl. 127- 1220*)
  4914.  
  4915. modify
  4916. d(isplay) g(eometry) m(isc) p(artitions) q(uit)? qq
  4917.  
  4918.       On MSCP disks it is possible you will  see  a  warning
  4919.       error like this:
  4920.  
  4921.       partition c: extends past end of unit 0 311200 311100
  4922.       partition  g:  extends  past  end of unit 32604 278596
  4923.       311100
  4924.  
  4925.       This is not cause for panic.  What this is  saying  is
  4926.       that  the  number  of  cylinders is one too low.  MSCP
  4927.       devices do not necessarily use all of the last  cylin-
  4928.       der.   The  total  number of blocks is precisely known
  4929.       for MSCP devices  (it is returned in the act of bring-
  4930.       ing  the drive online).  However the number of sectors
  4931.       on the volume is not necessarily evenly  divisible  by
  4932.       the  number  of  sectors  per track (311200 divided by
  4933.       17*15 gives 1220.392).  Basically the last cylinder is
  4934.       not fully used.  What must be done is raise the number
  4935.       of cylinders by 1.
  4936.  
  4937.       NNOOTTEE:: For any other disk type it is cause for  concern
  4938.       if  the warning above is issued - it means that incor-
  4939.       rect partition or geometry information was entered  by
  4940.       the user and needs to be corrected.
  4941.  
  4942. d(isplay) D(efault) m(odify) w(rite) q(uit)? mm
  4943. modify
  4944. d(isplay) g(eometry) m(isc) p(artitions) q(uit)? gg
  4945.  
  4946.  
  4947.  
  4948.                         17 March 1998
  4949.  
  4950.  
  4951.  
  4952.  
  4953.  
  4954. setup.2.11 - 76Installing and Operating 2.11BSD on the PDP-11
  4955.  
  4956.  
  4957. modify geometry
  4958. d(isplay) s(ector/trk) t(rk/cyl) c(yl) S(ector/cyl) q(uit)? cc
  4959. cylinders [1220]: 11222211
  4960. modify geometry
  4961. d(isplay) s(ector/trk) t(rk/cyl) c(yl) S(ector/cyl) q(uit)? qq
  4962. modify
  4963. d(isplay) g(eometry) m(isc) p(artitions) q(uit)? qq
  4964. d(isplay) D(efault) m(odify) w(rite) q(uit)? ww
  4965. d(isplay) D(efault) m(odify) w(rite) q(uit)? qq
  4966.  
  4967. 73Boot from tms(0,0,1) at 0174500
  4968. : rraa((11,,00,,00))uunniixx
  4969. ra1 csr[00]: 00117722115544
  4970.  
  4971.       The  last  string  entered  shows  how  I boot from an
  4972.       alternate controller.  In normal use, i.e. with a sin-
  4973.       gle  MSCP  controller,  the  string  would  simply  be
  4974.       rraa((00,,00))uunniixx.
  4975.  
  4976. 88..22..  SSttaannddaalloonnee ddiisskkllaabbeell pprrooggrraamm
  4977.  
  4978.      The standalone disklabel program is the second file  on
  4979. a  boot tape (after the bootblocks and boot program).  It is
  4980. used to place an initial label on a disk describing the disk
  4981. and  its partitions.  The program is also used when the root
  4982. ('a') or swap ('b') partitions of a previously labeled  sys-
  4983. tem  disk  must  be  modified.   The  second use is mandated
  4984. because the root and swap partitions  can  not  be  modified
  4985. while the kernel has them open.
  4986.  
  4987.      _d_i_s_k_l_a_b_e_l  effectively runs in CBREAK mode - you do not
  4988. need to hit the RETURN key except when prompted for a multi-
  4989. character  response  such  as a string (the pack label) or a
  4990. number (partition size).  Defaults are placed inside  square
  4991. brackets ([default]).   Entering RETURN accepts the default.
  4992.  
  4993.      The program is organized into several levels.   _d_i_s_k_l_a_-
  4994. _b_e_l  prints the current level out before prompting.  At each
  4995. level there is always the choice of d(isplaying) the current
  4996. label  and  q(uit)ing the current level and returning to the
  4997. previous level.  If you are at the top level and enter qq the
  4998. program  will exit back to BBoooott unless you have made changes
  4999. to the disklabel.  In that case you will  be  asked  if  you
  5000. wish  to  discard  the  changes, if you answer yy the changes
  5001. will be discarded.  If the answer is nn the qq is ignored  and
  5002. _d_i_s_k_l_a_b_e_l does not exit.
  5003.  
  5004.      In  the  following paragraphs the convention is to bboolldd
  5005. the user input while leaving the output  from  _d_i_s_k_l_a_b_e_l  in
  5006. normal type.  The devices used were a TK50 and an RD54, thus
  5007. the tape device is ttmmss and the disk device is rraa.
  5008.  
  5009.      The TK50 was booted resulting in the usual message from
  5010. BBoooott:
  5011.  
  5012.  
  5013.  
  5014.                         17 March 1998
  5015.  
  5016.  
  5017.  
  5018.  
  5019.  
  5020. Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 77
  5021.  
  5022.  
  5023. 73Boot from tms(0,0,0) at 0174500
  5024. : ttmmss((00,,11))
  5025.  
  5026. 88..33..  DDiisskkllaabbeell -- ttoouurr ooff tthhee lleevveellss..
  5027.  
  5028. Boot: bootdev=06001 bootcsr=0174500
  5029. disklabel
  5030. Disk? rraa((00,,00))
  5031. d(isplay) D(efault) m(odify) w(write) q(uit)? mm
  5032.  
  5033.       The  'D'  option  will  request  _d_i_s_k_l_a_b_e_l to create a
  5034.       default label based on what the program can  determine
  5035.       about  the  drive.  For some devices, such as RL01/02,
  5036.       RK06/07, MSCP (RD54, RA81, usw.), _d_i_s_k_l_a_b_e_l can deter-
  5037.       mine  what  the  drive type is and how many sectors it
  5038.       has.  For other devices, such as SMD drives  supported
  5039.       by  the xxpp driver, the task is complicated by the num-
  5040.       ber of different controllers and emulations supported.
  5041.       Some  3rd party controllers have capabilities that DEC
  5042.       controllers do not and the xxpp has no  way  of  knowing
  5043.       exactly  which type of controller is present.  In this
  5044.       case _d_i_s_k_l_a_b_e_l will gguueessss and then depend  on  you  to
  5045.       enter the correct data.
  5046.  
  5047. modify
  5048. d(isplay) g(eometry) m(isc) p(artitions) q(uit)? gg
  5049. modify geometry
  5050. d(isplay)  s(ector/trk) t(rk/cyl) c(yl) S(ector/cyl) q(uit)?
  5051. qq
  5052.  
  5053.       The Sector/cyl entry is rarely used.   _d_i_s_k_l_a_b_e_l  will
  5054.       calculate  this  quantity  for you from the sector/trk
  5055.       and trk/cyl quantities.
  5056.  
  5057. modify
  5058. d(isplay) g(eometry) m(isc) p(artitions) q(uit)? mm
  5059. d(isplay) t(ype) n(ame) l(abel)  f(lags)  r(pm)  D(rivedata)
  5060. q(quit)? ff
  5061.  
  5062.       Type is one of: SMD, MSCP, old DEC, SCSI, ESDI, ST506,
  5063.       floppy.
  5064.  
  5065.       Name is a string up to 16 characters in length.  It is
  5066.       typically  something  like rrdd5544 or rrmm0033 but may be any
  5067.       meaningful string.
  5068.  
  5069.       Label is an arbitrary string up to  16  characters  in
  5070.       length  -  nothing in the system checks for or depends
  5071.       on the contents of the pack label string.
  5072.  
  5073.       Rpm is the rotational speed of the drive.  Nothing  in
  5074.       the  system  uses  or  depends  on this at the present
  5075.       time.  Default is 3600.
  5076.  
  5077.  
  5078.  
  5079.  
  5080.                         17 March 1998
  5081.  
  5082.  
  5083.  
  5084.  
  5085.  
  5086. setup.2.11 - 78Installing and Operating 2.11BSD on the PDP-11
  5087.  
  5088.  
  5089.       Drivedata consists of 5 longwords of  arbitrary  data.
  5090.       Reserved for future use.
  5091.  
  5092. modify misc flags
  5093. d(isplay) c(lear) e(cc) b(adsect) r(emovable) q(uit)? qq
  5094.  
  5095.       Ecc   says  that  the  controller/driver  can  correct
  5096.       errors.
  5097.  
  5098.       Badsect indicates that the controller/driver  supports
  5099.       bad sector replacement.
  5100.  
  5101.       Removable  indicates  that  the  drive  uses removable
  5102.       media (floppy, RL02, RA60 for example).
  5103.  
  5104. modify misc
  5105. d(isplay) t(type) n(ame) l(abel) f(lags)  r(pm)  D(rivedata)
  5106. q(uit)? qq
  5107. modify
  5108. d(isplay) g(eometry) m(isc) p(artitions) q(uit)? pp
  5109. modify partitions
  5110. d(isplay) n(umber) s(elect) q(uit)? nn
  5111. Number of partitions (8 max) [7]? 77
  5112.  
  5113.       This  is the highest partition number considered to be
  5114.       valid.  _d_i_s_k_l_a_b_e_l will  adjust  this  parameter  semi-
  5115.       automatically  at  the pp level but it may be necessary
  5116.       to use nn in cases where some partitions are not to  be
  5117.       used or contain invalid information.
  5118.  
  5119. modify partitions
  5120. d(isplay) n(umber) s(elect) q(uit)? ss
  5121. a b c d e f g h q(uit)? aa
  5122. sizes and offsets may be given as sectors, cylinders
  5123. or cylinders plus sectors:  6200, 32c, 19c10 respectively
  5124. modify partition 'a'
  5125. d(isplay)  z(ero)  t(ype)  o(ffset)  s(ize)  f(rag)  F(size)
  5126. q(uit)? qq
  5127.  
  5128.       Zero clears the size and offset fields of a  partition
  5129.       entry and sets the filesystem type to uunnuusseedd.
  5130.  
  5131.       Type  is  the  filesystem  type  and  of  the possible
  5132.       choices only 22..1111BBSSDD, sswwaapp and uunnuusseedd make  any  sense
  5133.       to specify.
  5134.  
  5135.       Offset  is the number of sectors from the beginning of
  5136.       the disk at which the partition starts.
  5137.  
  5138.       Size is the number  of  sectors  which  the  partition
  5139.       occupies.
  5140.  
  5141.       Frag is the number of fragments a filesystem block can
  5142.       be broken into.  It is not presently used  and  should
  5143.  
  5144.  
  5145.  
  5146.                         17 March 1998
  5147.  
  5148.  
  5149.  
  5150.  
  5151.  
  5152. Installing and Operating 2.11BSD on the PDP-11Setup.2.11 - 79
  5153.  
  5154.  
  5155.       be left at the default of 1.
  5156.  
  5157.       Fsize  is  the filesystem blocksize and should be left
  5158.       at the default of 1024.
  5159.  
  5160.       modify partitions
  5161.       d(isplay) n(umber) s(elect) q(uit)? qq
  5162.       modify
  5163.       d(isplay) g(eometry) m(isc) p(artitions) q(uit)? qq
  5164.       d(isplay) D(efault) m(odify) w(write) q(uit)? qq
  5165.       Label changed.  Discard changes [y/n]? yy
  5166.  
  5167.  
  5168.       73Boot from tms(0,0,1) at 0174500
  5169.  
  5170. 88..44..  DDiisskkllaabbeell -- hheellppffuull hhiinnttss aanndd ttiippss..
  5171.  
  5172.      Define only those partitions  you  actually  will  use.
  5173. There  is  no  need to set up all 8 partitions.  Drives less
  5174. than 200Mb probably will only  have  3  partitions  defined,
  5175. 'a',  'b' and 'd' for /, swap and /usr respectively.  Remem-
  5176. ber to set the number of partitions.  Disklabel will attempt
  5177. to do this for you by keeping track of the highest partition
  5178. you modify but this is not foolproof.
  5179.  
  5180.      Do not define overlapping  partitions  unless  you  are
  5181. sure  what  you are doing.  _d_i_s_k_l_a_b_e_l will warn you of over-
  5182. lapping partitions but will not prohibit  you  from  writing
  5183. such a label to disk.
  5184.  
  5185.      Remember  that the prompt levels nest in _d_i_s_k_l_a_b_e_l.  It
  5186. will be necessary in several cases to enter multiple qq  com-
  5187. mands to get back to the top level.
  5188.  
  5189.      IIMMPPOORRTTAANNTT::  Keep at least 1, preferably more,  bootable
  5190. tape or floppy with _d_i_s_k_l_a_b_e_l on it present  at  all  times.
  5191. If  the  label  on  a disk ever becomes corrupted the kernel
  5192. will be very unhappy and probably won't boot.  If this  hap-
  5193. pens  you will need to boot the standalone _d_i_s_k_l_a_b_e_l program
  5194. and relabel the disk.  At least  2.11BSD  provides  a  stan-
  5195. dalone  _d_i_s_k_l_a_b_e_l  - previous 4BSD systems which implemented
  5196. disklabels did not and the cold-start of those  systems  was
  5197. painful indeed.
  5198.  
  5199.      IIMMPPOORRTTAANNTT::  Write  down in at least one place, and keep
  5200. with the tape/floppy mentioned above, the geometry and  par-
  5201. tition layout you assign to the disk.  The _d_i_s_k_l_a_b_e_l_(_8_) _p_r_o_-
  5202. _g_r_a_m _s_h_o_u_l_d _b_e _u_s_e_d _t_o _p_r_o_d_u_c_e _a _h_a_r_d_c_o_p_y _o_f _t_h_e  _d_i_s_k_l_a_b_e_l_.
  5203.  
  5204.  
  5205.  
  5206.  
  5207.  
  5208.  
  5209.  
  5210.  
  5211.  
  5212.                         17 March 1998
  5213.  
  5214.  
  5215.