home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / unixen.tar / unixen / Documentation / PUPS / Setup / 2.9bsd_setup.txt < prev    next >
Encoding:
Text File  |  2000-05-25  |  154.6 KB  |  4,225 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.               IInnssttaalllliinngg aanndd OOppeerraattiinngg 22..99BBSSDD
  11.                        1177 MMaarrcchh 11999988
  12.  
  13.                      _M_i_c_h_a_e_l _J_. _K_a_r_e_l_s
  14.                        _C_a_r_l _F_. _S_m_i_t_h
  15.                   University of California
  16.                  Berkeley, California 94720
  17.  
  18.  
  19.                           _A_B_S_T_R_A_C_T
  20.  
  21.  
  22.  
  23.           This  document  contains   instructions   for
  24.      installation  and operation of the Second Berkeley
  25.      Software  Distribution's  2.9BSD  release  of  the
  26.      PDP-11|-  UNIX|=  system.   It  is  adapted from the
  27.      paper _I_n_s_t_a_l_l_i_n_g _a_n_d _O_p_e_r_a_t_i_n_g _4_._1_b_s_d by Bill Joy.
  28.  
  29.           This  document  explains  the  procedures for
  30.      installation of Berkeley UNIX on a  PDP-11  or  to
  31.      upgrade an existing Berkeley PDP-11 UNIX system to
  32.      the new release.  It then explains how to  config-
  33.      ure  the kernel for the available devices and user
  34.      load, lay out file systems on the available disks,
  35.      set  up  terminal  lines and user accounts, and do
  36.      system specific tailoring.  It also explains  sys-
  37.      tem  operations  procedures: shutdown and startup,
  38.      hardware error reporting and diagnosis, file  sys-
  39.      tem  backup  procedures, resource control, perfor-
  40.      mance monitoring, and procedures  for  recompiling
  41.      and   reinstalling   system  software.   Technical
  42.      details on the kernel changes are presented in the
  43.      accompanying  paper,  ``Changes  in  the Kernel in
  44.      2.9BSD.''
  45.  
  46.           The 2.9BSD release, unlike previous  versions
  47.      of the Second Berkeley Software Distribution, is a
  48.      complete Version 7 UNIX system  with  all  of  the
  49.      standard UNIX tools and utilities, with or without
  50.      Berkeley modifications.  Therefore,  it  does  not
  51.      need to be layered onto an existing Version 7 sys-
  52.      tem; because of the  many  changes  and  additions
  53.      throughout the system, it would require a substan-
  54.      tial effort to merge into most earlier systems.
  55.  
  56.  
  57. -----------
  58. |-DEC,  MASSBUS,  PDP, and UNIBUS are trademarks of
  59. Digital Equipment Corporation.
  60. |=UNIX is a trademark of Bell Laboratories.
  61.  
  62.  
  63.  
  64.                         17 March 1998
  65.  
  66.  
  67.  
  68.  
  69.  
  70. Installing/Operating 2.9BSD  -2-                Introduction
  71.  
  72.  
  73.                       11.. IINNTTRROODDUUCCTTIIOONN
  74.  
  75.  
  76.  
  77.      This  document  explains  how  to  install  the  2.9BSD
  78. release  of  the  Berkeley version of UNIX for the PDP-11 on
  79. your system.  If you are running the July  1981  release  of
  80. the  system,  which  was called 2.8BSD, you can avoid a full
  81. bootstrap from the new tape by extracting only the  software
  82. that  has  changed.   Be  warned,  however, that there are a
  83. large number of changes.  Unless you have many local modifi-
  84. cations  it  will  probably  be easier to bring up an intact
  85. 2.9BSD system and merge your local changes into it.  If  you
  86. are  running  any  other version of UNIX on your PDP-11, you
  87. will have to do a full bootstrap.  This  means  dumping  all
  88. file  systems which are to be retained onto tape in a format
  89. that can be read in again later (_t_a_r format is best,  or  V7
  90. _d_u_m_p  if the file system configuration will be the same).  A
  91. new root file system can be made and  read  in  using  stan-
  92. dalone  utilites  on  the  tape.  The system sources and the
  93. rest  of  the  /usr  file  system  can  then  be  extracted.
  94. Finally, old file systems can be reloaded from tape.
  95.  
  96.      To  get  an overview of the process and an idea of some
  97. of the alternative strategies that are available, it is wise
  98. to  look through all of these instructions before beginning.
  99.  
  100. 00..11..  HHaarrddwwaarree ssuuppppoorrtteedd
  101.  
  102.      This distribution can be booted on a PDP-11/23, 24, 34,
  103. 34A,  40, 44, 45, 55, 60, or 70 CPU with at least 192 Kbytes
  104. of memory and any of the following disks|-:
  105.  
  106.  
  107.      DEC MASSBUS:                    RM03, RM05, RP04, RP05, RP06
  108.      DEC UNIBUS:                     RK05, RK06, RK07, RL01, RL02,
  109.                                      RM02, RP03, RP04, RP05, RP06
  110.      AED 8000 UNIBUS:                AMPEX DM980 (emulating RP03)
  111.      AED STORM-II                    AMPEX DM980 (emulating RM02)
  112.      DIVA COMP V MASSBUS:            AMPEX 9300
  113.      EMULEX SC-21 UNIBUS:            AMPEX 9300, CDC 9766 (emulating RM05)
  114.      EMULEX SC-11 or SC-21 UNIBUS:   CDC 9762, AMPEX DM980
  115.  
  116.  
  117. The tape drives|- supported by this distribution are:
  118.  
  119.  
  120.      DEC MASSBUS:           TE16, TU45, TU77
  121.      DEC UNIBUS:            TE10, TE16, TS11, TU45, TU77
  122.      DATUM 15X20 UNIBUS:    KENNEDY 9100 (emulating TE10)
  123.      EMULEX TC-11 UNIBUS:   KENNEDY 9100, 9300 (emulating TE10)
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.                         17 March 1998
  131.  
  132.  
  133.  
  134.  
  135.  
  136. Installing/Operating 2.9BSD  -3-                Introduction
  137.  
  138.  
  139. 00..22..  DDiissttrriibbuuttiioonn ffoorrmmaatt
  140.  
  141.      The distribution format is  two  9-track  800bpi  2400'
  142. magnetic  tapes.   The  tapes are also available at 1600bpi.
  143. The format for 1600bpi tapes is the same.  If you  are  able
  144. to do so, it is a good idea to immediately copy the tapes in
  145. the distribution kit to guard against disaster.   The  first
  146. tape contains some 512-byte records, some 1024-byte records,
  147. followed by many 10240-byte records.  There are interspersed
  148. tape marks; end-of-tape is signaled by a double end-of-file.
  149. The second tape contains only  10240-byte  records  with  no
  150. interspersed tape marks.
  151.  
  152.      The  boot tape contains several standalone utility pro-
  153. grams, a _d_u_m_p image of a root file system, and a  _t_a_r  image
  154. of  part  of  the  /usr file system.  The files on this tape
  155. are:
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187. -----------
  188. |- Other  controllers  and  drives  may  be  easily
  189. usable  with  the  system, but might require minor
  190. modifications to the system  to  allow  bootstrap-
  191. ping.   The  controllers and the drives shown here
  192. are known to work as bootstrap devices.
  193.  
  194.  
  195.  
  196.                         17 March 1998
  197.  
  198.  
  199.  
  200.  
  201.  
  202. Installing/Operating 2.9BSD  -4-                Introduction
  203.  
  204.  
  205.      File   Contents                             Record Size
  206.  
  207.       0     boot block                                512
  208.             (EOR)
  209.             boot block                                512
  210.             (EOR)
  211.             Standalone BBoooott                           512
  212.             (EOF)
  213.       1     Standalone ccaatt                           1024
  214.             (EOF)
  215.       2     This index                               1024
  216.             (use ccaatt to read)
  217.             (EOF)
  218.       3     Standalone mmkkffss                          1024
  219.             (see _m_k_f_s(8)|-)
  220.             (EOF)
  221.       4     Standalone rreessttoorr                        1024
  222.             (see _r_e_s_t_o_r(8))
  223.             (EOF)
  224.       5     Standalone iicchheecckk                        1024
  225.             (see _i_c_h_e_c_k(8))
  226.             (EOF)
  227.       6     Dump of small ``root'' file system      10240
  228.             (213 10K-byte blocks; see _d_u_m_p(8))
  229.             (EOF)
  230.       7     Tar archive of /usr files               10240
  231.             (most of the tape; see _t_a_r(1))
  232.             (EOF)
  233.             (EOF)
  234.  
  235.  
  236. The last file on the tape is a _t_a_r image of most of the /usr
  237. file  system  except  for  sources  (relative  to  /usr; see
  238. _t_a_r(1)).  It contains most of the binaries and  other  mate-
  239. rial  which  is  normally  kept  on-line, with the following
  240. directories: 7700 aaddmm bbiinn ccoonnttrriibb ddiicctt ddoocc ggaammeess  iinncclluuddee  lliibb
  241. llooccaall  mmaann  mmssggss pprreesseerrvvee ppuubblliicc ssppooooll ssyyss ttmmpp uuccbb.  It con-
  242. tains 1594 10K byte blocks.  The second  tape  contains  one
  243. file  in  _t_a_r  format, again relative to /usr, consisting of
  244. 1958 10K byte blocks and containing the source tree with all
  245. command  and  kernel  sources.   It contains the directories
  246. nneett, ssrrcc, and iinnggrreess and  includes  the  Berkeley  additions
  247. (which are in /usr/src/ucb and /usr/ingres).  The nneett direc-
  248. tory contains sources for the TCP/IP system.
  249.  
  250. 00..33..  UUNNIIXX ddeevviiccee nnaammiinngg
  251.  
  252.      UNIX has a set of names for devices that are  different
  253. from the DEC names for the devices.  The disk and tape names
  254. used by the bootstrap and the system are:
  255. -----------
  256. |-References of the form _X(_Y) mean  the  subsection
  257. named  _X  in section _Y of the Berkeley PDP-11 UNIX
  258. Programmer's manual.
  259.  
  260.  
  261.  
  262.                         17 March 1998
  263.  
  264.  
  265.  
  266.  
  267.  
  268. Installing/Operating 2.9BSD  -5-                Introduction
  269.  
  270.  
  271.      RK05 disks                       rrkk
  272.      RK06, RK07 disks                 hhkk
  273.      RL01, RL02 disks                 rrll
  274.      RP02, RP03 disks                 rrpp
  275.      TE16, TU45, TU77/TM02, 3 tapes   hhtt
  276.      TE10/TM11 tapes                  ttmm
  277.      TS11 tapes                       ttss
  278.  
  279.  
  280.  
  281.      There is also a generic disk driver, xxpp, that will han-
  282. dle most types of SMD disks on one or more controllers (even
  283. different types on the same controller).  The xxpp driver han-
  284. dles  RM02,  RM03,  RM05, RP04, RP05 and  RP06 disks on DEC,
  285. Emulex, and Diva UNIBUS or MASSBUS controllers.
  286.  
  287.      The standalone system used to bootstrap the  full  UNIX
  288. system uses device names of the form:
  289.  
  290.      _x_x(_y,_z)
  291.  
  292. where  _x_x  is one of hhkk, hhtt, rrkk, rrll, rrpp, ttmm, ttss, or xxpp.  The
  293. value _y specifies the device or drive unit to  use.   The  _z
  294. value  is  interpreted  differently for tapes and disks: for
  295. disks it is a block offset for a file system and  for  tapes
  296. it is a file number on the tape.
  297.  
  298.      Large UNIX physical disks (hhkk, rrpp, xxpp) are divided into
  299. 8 logical disk partitions, each of which may occupy any con-
  300. secutive  cylinder range on the physical device.  The cylin-
  301. ders occupied by the 8 partitions for each  drive  type  are
  302. specified  in section 4 of the Berkeley PDP-11 UNIX Program-
  303. mer's manual.|- Each partition may be used for either  a  raw
  304. data  area  such  as a swapping area or to store a UNIX file
  305. system.  It is conventional for the  first  partition  on  a
  306. disk to be used to store a root file system, from which UNIX
  307. may be bootstrapped.  The second partition is  traditionally
  308. used as a swapping area, and the rest of the disk is divided
  309. into spaces for additional ``mounted file systems''  by  use
  310. of one or more additional partitions.
  311.  
  312.      The disk partitions have names in the standalone system
  313. of the form ``_x_x(_y,_z)'' as described above.  Thus  partition
  314. 1  of  an RK07 at drive 0 would be ``hk(0,5940)''.  When not
  315. running standalone, this partition would normally be  avail-
  316. able as ``/dev/hk0b''.  Here the prefix ``/dev'' is the name
  317. of the directory where all ``special files'' normally  live,
  318. the  ``hk''  serves an obvious purpose, the ``0'' identifies
  319. this as a partition of hk drive number ``0'' and  the  ``b''
  320. identifies  this as partition 1 (where we number from 0, the
  321. -----------
  322. |-It is possible to change the partitions by chang-
  323. ing  the  values  in  the  disk's  sizes  array in
  324. ioconf.c.
  325.  
  326.  
  327.  
  328.                         17 March 1998
  329.  
  330.  
  331.  
  332.  
  333.  
  334. Installing/Operating 2.9BSD  -6-                Introduction
  335.  
  336.  
  337. 0th partition being ``hk0a'').   Finally,  ``5940''  is  the
  338. sector  offset to partition 1, as determined from the manual
  339. page _h_k(4).
  340.  
  341.      Returning to the discussion of the  standalone  system,
  342. we  recall  that tapes also took two integer parameters.  In
  343. the case of a TE16/TU tape formatter on drive 0,  the  files
  344. on  the tape have names ``ht(0,0)'', ``ht(0,1)'', etc.  Here
  345. ``file'' means a tape file containing a single  data  stream
  346. separated  by  a  single  tape mark.  The distribution tapes
  347. have data structures in the tape files and though the  first
  348. tape  contains  only 8 tape files, it contains several thou-
  349. sand UNIX files.
  350.  
  351. 00..44..  UUNNIIXX ddeevviicceess:: bblloocckk aanndd rraaww
  352.  
  353.      UNIX makes a distinction between ``block'' and  ``char-
  354. acter''  (raw) devices.  Each disk has a block device inter-
  355. face where the system makes the device byte addressable  and
  356. you  can write a single byte in the middle of the disk.  The
  357. system will read out the data from the disk  sector,  insert
  358. the  byte  you  gave it and put the modified data back.  The
  359. disks with the names ``/dev/_x_x0a'', etc. are  block  devices
  360. and thus use the system's normal buffering mechanism.  There
  361. are also raw devices available, which do physical I/O opera-
  362. tions  directly  from  the  program's data area.  These have
  363. names like  ``/dev/r_x_x0a'',  the  ``r''  here  standing  for
  364. ``raw.''   In the bootstrap procedures we will often suggest
  365. using the raw devices, because these tend  to  work  faster.
  366. In  general,  however, the block devices are used.  They are
  367. where file systems are ``mounted.''  The UNIX name space  is
  368. increased  by  logically  associating (_m_o_u_n_ting) a UNIX file
  369. system residing on a given block device with a directory  in
  370. the  current  name  space.  See _m_o_u_n_t(2) and _m_o_u_n_t(8).  This
  371. association is severed by _u_m_o_u_n_t.
  372.  
  373.      You should be aware that it is sometimes  important  to
  374. use the character device (for efficiency) or not (because it
  375. wouldn't work, e.g. to write a single byte in the middle  of
  376. a sector).  Don't change the instructions by using the wrong
  377. type of device indiscriminately.
  378.  
  379. 00..55..  RReeppoorrttiinngg pprroobblleemmss oorr qquueessttiioonnss
  380.  
  381.      Problems with the software  of  this  distribution,  or
  382. errors or omissions in the documentation, should be reported
  383. to the 2BSD group.  Whenever possible, submit  such  reports
  384. by electronic mail; the address is:
  385.  
  386.      2bsd@berkeley       (by ARPAnet)
  387.        or
  388.      ucbvax!2bsd         (by UUCP)
  389.  
  390. There is a mail drop for bug reports and fixes:
  391.  
  392.  
  393.  
  394.                         17 March 1998
  395.  
  396.  
  397.  
  398.  
  399.  
  400. Installing/Operating 2.9BSD  -7-                Introduction
  401.  
  402.  
  403.      2bsd-bugs@berkeley  (by ARPAnet)
  404.        or
  405.      ucbvax!2bsd-bugs    (by UUCP)
  406.  
  407. These reports or fixes are expected to be in the format gen-
  408. erated by the _s_e_n_d_b_u_g(1) program.  A redistribution list  of
  409. users who have indicated that they would like to receive bug
  410. reports is also maintained:
  411.  
  412.      2bsd-people@berkeley(by ARPAnet)
  413.        or
  414.      ucbvax!2bsd-people  (by UUCP)
  415.  
  416. This list may also be used  as  a  general  forum  for  help
  417. requests,  sharing  common experiences, etc.  Requests to be
  418. added to (or deleted from) this list should be made  to  the
  419. 2bsd address above.  If it is not possible to use electronic
  420. mail, then call or write the 2BSD office.  Although there is
  421. seldom  someone there to take your call, there is an answer-
  422. ing machine, and your  request  will  be  forwarded  to  the
  423. appropriate  person.   The  phone number and mailing address
  424. are:
  425.  
  426.      Berkeley PDP-11 Software Distribution - 2BSD
  427.      Computer Science Division, Department of EECS
  428.      573 Evans Hall
  429.      University of California, Berkeley
  430.      Berkeley, California 94720
  431.      (415) 642-6258
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.                         17 March 1998
  461.  
  462.  
  463.  
  464.  
  465.  
  466. Installing/Operating 2.9BSD  -8-               Bootstrapping
  467.  
  468.  
  469.                   22.. BBOOOOTTSSTTRRAAPP PPRROOCCEEDDUURREESS
  470.  
  471.  
  472.  
  473.      This section explains the bootstrap procedures that can
  474. be  used  to  get one of the kernels supplied with this tape
  475. running on your machine.  If you are not yet running UNIX or
  476. are  running  a  version of UNIX other than 2.8BSD, you will
  477. have to do a full bootstrap.
  478.  
  479.      If you are running 2.8BSD you can use the update proce-
  480. dure  described  in section 4.2 instead of a full bootstrap.
  481. This will affect modifications to the local system less than
  482. a full bootstrap.  Note, however, that a full bootstrap will
  483. probably require less effort  unless  you  have  made  major
  484. local  modifications  which  you  must carry over to the new
  485. system.
  486.  
  487.      If you are already running UNIX and need to do  a  full
  488. bootstrap  you should first save your existing files on mag-
  489. netic tape.  The 2.9BSD file system uses 1K-byte  blocks  by
  490. clustering disk blocks (as did the 2.8BSD system); file sys-
  491. tems in other formats cannot be  mounted.   TThhoossee  uuppggrraaddiinngg
  492. ffrroomm  22..88  sshhoouulldd  nnoottee tthhaatt 22..99BBSSDD uusseess ggeenneerraallllyy ddiiffffeerreenntt
  493. ffiillee ssyysstteemm ppaarrttiittiioonn ssiizzeess tthhaann 22..88BBSSDD,, aanndd tthhaatt aa  ffeeww  ooff
  494. tthhee  mmaajjoorr  ddeevviiccee nnuummbbeerrss hhaavvee cchhaannggeedd ((iinn ppaarrttiiccuullaarr,, tthhaatt
  495. ffoorr tthhee hhkk))..  The easiest way to save the current  files  on
  496. tape  is  by doing a full dump and then restoring in the new
  497. system.  This works also in converting  V7,  System-III,  or
  498. System-V 512-byte file systems.  Although the dump format is
  499. different on V7, System-III, and System-V, _5_1_2_r_e_s_t_o_r(8)  can
  500. restore  old format V7 _d_u_m_p image tapes into the file system
  501. format used by 2.9BSD.  _T_a_r(1) can also be used to  exchange
  502. files  from different file system formats, and has the addi-
  503. tional advantage that directory trees can be placed on  dif-
  504. ferent  file  systems  than  on the old configuration.  Note
  505. that 2.9BSD does not support _c_p_i_o tape format.
  506.  
  507.      The tape  bootstrap  procedure  involves  three  steps:
  508. loading  the tape bootstrap monitor, creating and initializ-
  509. ing a UNIX ``root'' file system  system  on  the  disk,  and
  510. booting the system.
  511.  
  512. 22..11..  BBoooottiinngg ffrroomm ttaappee
  513.  
  514.      To  load  the  tape  bootstrap monitor, first mount the
  515. magnetic tape on drive 0 at load point, making sure that the
  516. write  ring  is not inserted.  Then use the normal bootstrap
  517. ROM, console monitor or other bootstrap  to  boot  from  the
  518. tape.   If  no other means are available, the following code
  519. can be keyed in and executed at (say) 0100000 to boot from a
  520. TM tape drive (the magic number 172526 is the address of the
  521. TM-11 current memory address register; an adjustment may  be
  522. necessary if your controller is at a nonstandard address):
  523.  
  524.  
  525.  
  526.                         17 March 1998
  527.  
  528.  
  529.  
  530.  
  531.  
  532. Installing/Operating 2.9BSD  -9-               Bootstrapping
  533.  
  534.  
  535.      012700   (mov $172526, r0)
  536.      172526
  537.      010040   (mov r0, -(r0))
  538.      012740   (mov $60003, -(r0))
  539.      060003
  540.      000777   (br .)
  541.  
  542.  
  543. When  this  is executed, the first block of the tape will be
  544. read into memory.  Halt the CPU and restart at location 0.
  545.  
  546.      The console should type
  547.  
  548.      _n_nBBoooott
  549.      ::
  550.  
  551. where _n_n is the CPU class on which it believes  it  is  run-
  552. ning.   The value will be one of 24, 40, 45 or 70, depending
  553. on whether separate  instruction  and  data  (separate  I/D)
  554. and/or  a  UNIBUS  map are detected.  The CPUs in each class
  555. are:
  556.  
  557.  
  558.      Class   PDP11s                Separate I/D   UNIBUS map
  559.       24     24                         -             +
  560.       40     23, 34, 34A, 40, 60        -             -
  561.       45     45, 55                     +             -
  562.       70     44, 70                     +             +
  563.  
  564.  
  565. The bootstrap can be forced to set up the machine as  for  a
  566. different  class of PDP11 by placing an appropriate value in
  567. the console switch register (if there is one) while  booting
  568. it.   The value to use is the PDP11 class, interpreted as an
  569. _o_c_t_a_l number (use, for example, 070 for an 11/70).  WWaarrnniinngg::
  570. some  old DEC bootstraps use the switch register to indicate
  571. where to boot from.  On such machines, if the value  in  the
  572. switch register indicates an incorrect CPU, be sure to reset
  573. the switches immediately after  initiating  the  tape  boot-
  574. strap.
  575.  
  576.      You  are now talking to the tape bootstrap monitor.  At
  577. any point in the following procedure you can return to  this
  578. section, reload the tape bootstrap, and restart.
  579.  
  580.      To first check that everything is working properly, you
  581. can use the _c_a_t program on the tape to  print  the  list  of
  582. utilities  on  the  tape.  Through the rest of this section,
  583. substitute the correct disk type for _d_k and  the  tape  type
  584. for _t_p.  In response to the prompt of the bootstrap which is
  585. now running, type
  586.  
  587.      _t_p(0,1)   (load file 1 from tape 0)
  588.  
  589.  
  590.  
  591.  
  592.                         17 March 1998
  593.  
  594.  
  595.  
  596.  
  597.  
  598. Installing/Operating 2.9BSD -10-               Bootstrapping
  599.  
  600.  
  601. _C_a_t will respond
  602.  
  603.      CCaatt
  604.      FFiillee??
  605.  
  606. The table of contents is in file 2 on  the  tape,  therefore
  607. answer
  608.  
  609.      _t_p(0,2)
  610.  
  611. The tape will move, then a short list of files will print on
  612. the console, followed by:
  613.  
  614.      eexxiitt ccaalllleedd
  615.      _n_nBBoooott
  616.      ::
  617.  
  618. After _c_a_t is finished, it returns to the bootstrap  for  the
  619. next operation.
  620.  
  621. 22..22..  CCrreeaattiinngg aann eemmppttyy UUNNIIXX ffiillee ssyysstteemm
  622.  
  623.      Now  create  the  root  file system using the following
  624. procedures.  First determine the size of your root file sys-
  625. tem from the following table:
  626.  
  627.  
  628.      Disk    Root File System Size
  629.                (1K-byte blocks)
  630.  
  631.      hk      2970
  632.      rk|-     2000
  633.      rl01|-   4000
  634.      rl02|-   8500
  635.      rp      5200
  636.      xp      4807 (RP04/RP05/RP06)
  637.              2400 (RM02/RM03)
  638.              4560 (RM05)
  639.              4702 (DIVA)
  640.  
  641.  
  642.  
  643.      If the disk on which you are creating a root file  sys-
  644. tem  is an xxpp disk, you should check the drive type register
  645. at this time to make sure it holds a value that will be rec-
  646. ognized  correctly  by the driver.  There are numbering con-
  647. flicts; the following numbers are used internally:
  648.  
  649.  
  650.  
  651.  
  652. -----------
  653. |-These  sizes  are  for full disks less some space
  654. used for swapping.
  655.  
  656.  
  657.  
  658.                         17 March 1998
  659.  
  660.  
  661.  
  662.  
  663.  
  664. Installing/Operating 2.9BSD -11-               Bootstrapping
  665.  
  666.  
  667.              Drive Type Register            Drive Assumed
  668.      Low Byte (standard address: 0776726)
  669.  
  670.                      022                    RP04/05/06
  671.                      025                    RM02/RM03
  672.                      027                    RM05
  673.                      076                    Emulex SC-21/300 Mb RM05 emulation (815 cylinders)
  674.                      077                    Diva Comp-V/300 Mb SMD
  675.  
  676.  
  677. Check the drive type number in your  controller  manual,  or
  678. halt  the  CPU and examine this register.  If the value does
  679. not correspond to the actual drive type, you must place  the
  680. correct  value  in  the switch register after the tape boot-
  681. strap is running and before any attempt is  made  to  access
  682. the  drive.   This  will  override  the drive type register.
  683. This value must be present at the time each program (includ-
  684. ing  the  bootstrap  itself) first tries to access the disk.
  685. On machines without a switch register, the  _x_p_t_y_p_e  variable
  686. can  be  patched in memory.  After starting each utility but
  687. before accessing the disk, halt the CPU, place the new drive
  688. type  number  at the proper memory location with the console
  689. switches or monitor, and then  continue.   The  location  of
  690. _x_p_t_y_p_e  in  each  utility is mkfs:  032700, restor:  031570,
  691. icheck:  030150 and boot:  0427754 (the location for boot is
  692. higher  because  it  relocates itself).  Once UNIX itself is
  693. booted (see below) you must patch it also.
  694.  
  695.      Finally, determine the proper  interleaving  factors  _m
  696. and  _n  for your disk and CPU combination from the following
  697. table.  These numbers determine the layout of the free  list
  698. that  will be constructed; the proper interleaving will help
  699. increase the speed of the file system.  If you have  a  non-
  700. DEC  disk  that emulates one of the disks listed, you may be
  701. able to use these numbers as well, but check that the actual
  702. disk  geometry is the same as the emulated disk (rather than
  703. the controller mapping  onto  a  different  physical  disk).
  704. Also,  the rotational speed must be the same as the DEC disk
  705. for these numbers to apply.
  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. Installing/Operating 2.9BSD -12-               Bootstrapping
  731.  
  732.  
  733.             DDiisskk IInntteerrlleeaavviinngg FFaaccttoorrss ffoorr DDiisskk//CCPPUU CCoommbbiinnaattiioonnss ((_m//_n))
  734.      CPU     RK05   RK06/7   RL01/2   RM02    RM03   RM05    RP03    RP04/5/6
  735.  
  736.      11/23   X/12   X/33     X/10     X/80    -      -       X/100   X/209
  737.      11/24   X/12   7/33     X/10     10/80   -      -       X/100   10/209
  738.      11/34   X/12   6/33     X/10     8/80    -      -       3/100   8/209
  739.      11/40   2/12   6/33     X/10     8/80    -      -       3/100   8/209
  740.      11/44   X/12   4/33     X/10     6/80    -      -       2/100   6/209
  741.      11/45   2/12   5/33     X/10     7/80    -      -       3/100   7/209
  742.      11/55   X/12   5/33     X/10     7/80    -      -       3/100   7/209
  743.      11/60   X/12   5/33     X/10     7/80    -      -       3/100   7/209
  744.      11/70   X/12   3/33     X/10     5/80    7/80   7/304   X/100   5/209
  745.  
  746.  
  747. For example, for an RP06 on an 11/70, _m is 5 and _n  is  209.
  748. See  _m_k_f_s(8)  for more explanation of the values of _m and _n.
  749. An X entry means that we do not know the correct number  for
  750. this  combination of CPU and disk.  If you do, please let us
  751. know.  If _m is unspecified or you have a disk which emulates
  752. a  DEC  disk,  use  the number for the most similar disk/CPU
  753. pair.  IIff _n iiss uunnssppeecciiffiieedd,, uussee tthhee ccyylliinnddeerr ssiizzee ddiivviiddeedd bbyy
  754. 22..
  755.  
  756.      Then  run a standalone version of the _m_k_f_s (8) program.
  757. In the following procedure, substitute the correct types for
  758. _t_p and _d_k and the size determined above for _s_i_z_e:
  759.  
  760.  
  761.      ::_t_p(0,3)
  762.      MMkkffss
  763.      ffiillee ssyysstteemm:: _d_k(0,0)                      (root is the first file system on drive 0)
  764.      ffiillee ssyysstteemm ssiizzee:: _s_i_z_e                    (count of 1024 byte blocks in root)
  765.      iinntteerrlleeaavviinngg ffaaccttoorr ((mm,, 55 ddeeffaauulltt)):: _m     (interleaving, see above)
  766.      iinntteerrlleeaavviinngg mmoodduulluuss ((nn,, 1100 ddeeffaauulltt)):: _n   (interleaving, see above)
  767.      iissiizzee == XXXX                                (count of inodes in root file system)
  768.      mm//nn == _m _n                                 (interleave parameters)
  769.      EExxiitt ccaalllleedd
  770.      _n_nBBoooott
  771.      ::                                         (back at tape boot level)
  772.  
  773.  
  774. You now have an empty UNIX root file system.
  775.  
  776. 22..33..  RReessttoorriinngg tthhee rroooott ffiillee ssyysstteemm
  777.  
  778.      To restore a small root file system onto it, type
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.  
  790.                         17 March 1998
  791.  
  792.  
  793.  
  794.  
  795.  
  796. Installing/Operating 2.9BSD -13-               Bootstrapping
  797.  
  798.  
  799.      ::_t_p(0,4)
  800.      RReessttoorr
  801.      TTaappee?? _t_p(0,6)                                  (unit 0, seventh tape file)
  802.      DDiisskk?? _d_k(0,0)                                  (into root file system)
  803.      LLaasstt cchhaannccee bbeeffoorree ssccrriibbbblliinngg oonn ddiisskk..         (just hit return)
  804.           (30 second pause then tape should move)
  805.           (tape moves for a few minutes)
  806.      eenndd ooff ttaappee
  807.      EExxiitt ccaalllleedd
  808.      _n_nBBoooott
  809.      ::                                              (back at tape boot level)
  810.  
  811.  
  812. If  you  wish,  you  may use the _i_c_h_e_c_k program on the tape,
  813. _t_p(0,5), to check the consistency of  the  file  system  you
  814. have just installed.
  815.  
  816. 22..44..  BBoooottiinngg UUNNIIXX
  817.  
  818.      You  are  now  ready  to boot from disk.  It is best to
  819. read the rest of this section first, since some systems must
  820. be patched while booting.  Then type:
  821.  
  822.  
  823.      ::_d_k(0,0)_d_kunix    (bring in _d_kunix off root system)
  824.  
  825.  
  826. The standalone boot program should then read _d_kunix from the
  827. root file system you just created,  and  the  system  should
  828. boot:
  829.  
  830.      BBeerrkkeelleeyy UUNNIIXX ((RReevv.. 22..99..55)) MMoonn AAuugg 22 1188::4444::3300 PPDDTT 11998833
  831.      mmeemm == xxxxxx
  832.  
  833.      CCOONNFFIIGGUURREE SSYYSSTTEEMM::
  834.      (Information about various devices will print;
  835.      most of them will probably not be found until
  836.      the addresses are set below.)
  837.      eerraassee==^^??,, kkiillll==^^UU,, iinnttrr==^^CC
  838.      ##
  839.  
  840. If  you are booting from an _x_p with a drive type that is not
  841. recognized, it will be necessary to patch the system  before
  842. it  first accesses the root file system.  Halt the processor
  843. after it has begun printing the version string but before it
  844. has  finished  printing the ``mem = xxx'' string.  Place the
  845. drive type number corresponding to your  drive  at  location
  846. 061472;  the  addresses  for  drives  1, 2 and 3 are 061506,
  847. 061522 and 061536 respectively.  If  you  plan  to  use  any
  848. drives  other  than  0  before you recompile the system, you
  849. should patch these locations.  Make the patches and continue
  850. the  CPU.  The value before patching must be zero.  If it is
  851. not, you have halted too late and should try again.
  852.  
  853.  
  854.  
  855.  
  856.                         17 March 1998
  857.  
  858.  
  859.  
  860.  
  861.  
  862. Installing/Operating 2.9BSD -14-               Bootstrapping
  863.  
  864.  
  865.      UNIX begins by printing out a  banner  identifying  the
  866. version  of  the  system  that is in use and the date it was
  867. compiled.  Note that this version is different from the sys-
  868. tem release number, and applies only to the operating system
  869. kernel.
  870.  
  871.      Next the _m_e_m message gives the  amount  of  memory  (in
  872. bytes)  available  to  user  programs.   On an 11/23 with no
  873. clock control register,  a  message  ``No  clock???''   will
  874. print  next;  this is a reminder to turn on the clock switch
  875. if it is not already on, since UNIX cannot enable the  clock
  876. itself.   The  information  about  different  devices  being
  877. attached or not being found is produced by the _a_u_t_o_c_o_n_f_i_g(8)
  878. program.   Most of this is not important for the moment, but
  879. later the device table can be edited to correspond  to  your
  880. hardware.   However,  the  tape  drive  of  the correct type
  881. should have been detected and attached.
  882.  
  883.      The ``erase=...'' message is part of /.profile that was
  884. executed by the root shell when it started.  The file /.pro-
  885. file contained commands to set the UNIX erase, line kill and
  886. interrupt  characters  to be what is standard on DEC systems
  887. so that it is consistent  with  the  DEC  console  interface
  888. characters.   This is not normal for UNIX, but is convenient
  889. when working on a hardcopy console; change it if you like.
  890.  
  891.      UNIX is now running, and the Berkeley PDP-11 UNIX  Pro-
  892. grammer's  manual  applies.   The `#' is the prompt from the
  893. Shell, and lets you know that you are the super-user,  whose
  894. login name is ``root.''
  895.  
  896.      There  are  a number of copies of _u_n_i_x on the root file
  897. system, one for each  possible  type  of  root  file  system
  898. device.   All  but  one  of them (_x_p_u_n_i_x) has had its symbol
  899. table  removed  (i.e.  they  have  been  ``stripped'';   see
  900. _s_t_r_i_p(1)).   The  unstripped  copy  is linked (see _l_n(1)) to
  901. _/_u_n_i_x to provide a system namelist for programs  like  _p_s(1)
  902. and  _a_u_t_o_c_o_n_f_i_g(8).   All  of  the systems were created from
  903. _/_u_n_i_x by the C shell script _/_g_e_n_a_l_l_s_y_s_._s_h.  If  you  had  to
  904. patch  the  _x_p  type  as you booted, you may want to use _a_d_b
  905. (see _a_d_b(1)) to make the same patch in a copy of _x_p_u_n_i_x.  If
  906. you  are  short  of  space,  you  can  patch a copy of _/_u_n_i_x
  907. instead (setting the rootdev, etc.)  and install it as _/_u_n_i_x
  908. after  verifying that it works.  See _/_g_e_n_a_l_l_s_y_s_._s_h for exam-
  909. ples of using _a_d_b to patch  the  system.   The  system  load
  910. images  for  other disk types can be removed.  DDoo nnoott rreemmoovvee
  911. oorr rreeppllaaccee tthhee ccooppyy ooff _/_u_n_i_x,, hhoowweevveerr,, uunnlleessss yyoouu hhaavvee  mmaaddee
  912. aa  wwoorrkkiinngg  ccooppyy  ooff iitt tthhaatt iiss ppaattcchheedd ffoorr yyoouurr ffiillee ssyysstteemm
  913. ccoonnffiigguurraattiioonn aanndd ssttiillll hhaass aa ssyymmbbooll ttaabbllee..   Many  programs
  914. use  the  symbol  table  of  /_u_n_i_x in order to determine the
  915. locations of things in memory, therefore /_u_n_i_x should always
  916. be  an  unstripped file corresponding to the current system.
  917. If at all possible, you should save the original UNIX  bina-
  918. ries  for  your disk configuration (_d_kunix and unix) for use
  919.  
  920.  
  921.  
  922.                         17 March 1998
  923.  
  924.  
  925.  
  926.  
  927.  
  928. Installing/Operating 2.9BSD -15-               Bootstrapping
  929.  
  930.  
  931. in an emergency.
  932.  
  933.      There are a few minor details that should  be  attended
  934. to now.  The system date is initially set from the root file
  935. system, and should be reset.  The root password should  also
  936. be set:
  937.  
  938.  
  939.      ## date _y_y_m_m_d_d_h_h_m_m      (set date, see _d_a_t_e(1))
  940.      ## passwd root          (set password for super-user)
  941.      NNeeww ppaasssswwoorrdd::          (password will not echo)
  942.      RReettyyppee nneeww ppaasssswwoorrdd::
  943.  
  944.  
  945.  
  946. 22..55..  IInnssttaalllliinngg tthhee ddiisskk bboooottssttrraapp
  947.  
  948.      The  disk  with the new root file system on it will not
  949. be bootable directly until the block 0 bootstrap program for
  950. the  disk has been installed.  There are copies of the boot-
  951. straps in /mdec.  This is not the  usual  location  for  the
  952. bootstraps (that is /usr/src/sys/mdec), but it is convenient
  953. to be able to install the boot block now.  Use _d_d(1) to copy
  954. the  right  boot  block onto the disk; the first form of the
  955. command is for small disks (rrkk, rrll) and the second form  for
  956. disks with multiple partitions (hhkk, rrpp, xxpp), substituting as
  957. usual for _d_k:
  958.  
  959.      ## dd if=_d_kuboot of=/dev/r_d_k0 count=1
  960.  
  961.      or
  962.  
  963.      ## dd if=_d_kuboot of=/dev/r_d_k0a count=1
  964.  
  965. will install the bootstrap in block 0.  Once this  is  done,
  966. booting  from  this  disk  will load and execute the block 0
  967. bootstrap, which will in turn load /boot (actually, the boot
  968. program  on the first file system, which is root).  The con-
  969. sole will print
  970.  
  971.  
  972.      >>bboooott             (printed by the block 0 boot)
  973.  
  974.      _n_nBBoooott            (printed by /boot)
  975.      ::
  976.  
  977.  
  978. The '>' is the prompt from the first bootstrap.  It automat-
  979. ically  boots  /_b_o_o_t for you; if /_b_o_o_t is not found, it will
  980. prompt again and allow another name to be tried.   It  is  a
  981. very  small  and  simple program, however, and can only boot
  982. the second-stage boot from  the  first  file  system.   Once
  983. /boot  is running and prints its ``: '' prompt, boot unix as
  984. above, using _d_kunix or unix as appropriate.
  985.  
  986.  
  987.  
  988.                         17 March 1998
  989.  
  990.  
  991.  
  992.  
  993.  
  994. Installing/Operating 2.9BSD -16-               Bootstrapping
  995.  
  996.  
  997. 22..66..  CChheecckkiinngg tthhee rroooott ffiillee ssyysstteemm
  998.  
  999.      Before continuing, check the integrity of the root file
  1000. system by giving the command
  1001.  
  1002.      ## fsck /dev/r_d_k0a
  1003.  
  1004. (omit the aa for an RK05 or RL).  The output from _f_s_c_k should
  1005. look something like:
  1006.  
  1007.      //ddeevv//rr_x_x00aa
  1008.      FFiillee SSyysstteemm::  //
  1009.  
  1010.      **** CChheecckkiinngg //ddeevv//rr_x_x00aa
  1011.      **** PPhhaassee 11 -- CChheecckk BBlloocckkss aanndd SSiizzeess
  1012.      **** PPhhaassee 22 -- CChheecckk PPaatthhnnaammeess
  1013.      **** PPhhaassee 33 -- CChheecckk CCoonnnneeccttiivviittyy
  1014.      **** PPhhaassee 44 -- CChheecckk RReeffeerreennccee CCoouunnttss
  1015.      **** PPhhaassee 55 -- CChheecckk FFrreeee LLiisstt
  1016.      223366 ffiilleess 11888811 bblloocckkss xxxxxxxxxx ffrreeee
  1017.  
  1018.  
  1019.      If there are inconsistencies in the  file  system,  you
  1020. may be prompted to apply corrective action; see the document
  1021. describing _f_s_c_k for information.  The number of free  blocks
  1022. will  vary depending on the disk you are using for your root
  1023. file system.
  1024.  
  1025.  
  1026.  
  1027.  
  1028.  
  1029.  
  1030.  
  1031.  
  1032.  
  1033.  
  1034.  
  1035.  
  1036.  
  1037.  
  1038.  
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.                         17 March 1998
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060. Installing/Operating 2.9BDSeDvi-c1e7-and file system configuration
  1061.  
  1062.  
  1063.           33.. DDEEVVIICCEE AANNDD FFIILLEE SSYYSSTTEEMM CCOONNFFIIGGUURRAATTIIOONN
  1064.  
  1065.  
  1066.  
  1067.      This section will describe ways in which the file  sys-
  1068. tems  can  be  set up for the disks available.  It will then
  1069. describe the files and directories that will be set  up  for
  1070. the local configuration.  These are the _/_d_e_v directory, with
  1071. special files for each peripheral device, and the tables  in
  1072. _/_e_t_c  that  contain  configuration-dependent  data.  Some of
  1073. these files should be edited after reading this section, and
  1074. others can wait until later if you choose.  The disk config-
  1075. uration should be chosen before the rest of the distribution
  1076. tape  is read onto disk to minimize the work of reconfigura-
  1077. tion.
  1078.  
  1079. 33..11..  DDiisskk ccoonnffiigguurraattiioonn
  1080.  
  1081.      This section describes how to lay out file  systems  to
  1082. make use of the available space and to balance disk load for
  1083. better system performance.  The steps described in this sec-
  1084. tion (3.1) are optional.
  1085.  
  1086. 33..11..11..  DDiisskk nnaammiinngg aanndd ddiivviissiioonnss
  1087.  
  1088.      Each  large  physical disk drive can be divided into up
  1089. to 8 partitions; UNIX typically uses only 3 to 5 partitions.
  1090. For  instance, on an RM03 the first partition, rm0a, is used
  1091. for a root file system, a backup thereof, or  a  small  file
  1092. system  like  /tmp;  the second partition, rm0b, is used for
  1093. swapping or a small file system; and  the  third  partition,
  1094. rm0c,  holds  a user file system.  Many disks can be divided
  1095. in different ways; for example, the third section (cc) of the
  1096. RM03  could  instead be divided into two file systems, using
  1097. the rm0d and rm0e partitions instead, perhaps  holding  /usr
  1098. and  the user's files.  The disk partition tables are speci-
  1099. fied in the _i_o_c_o_n_f_._c  file  for  each  system,  and  may  be
  1100. changed   if  necessary.   The  last  partition  (hh)  always
  1101. describes the entire disk, and can be used for  disk-to-disk
  1102. copies.
  1103.  
  1104.      WWaarrnniinngg::   for disks on which DEC standard 144 bad sec-
  1105. tor forwarding is supported, the last track and  up  to  126
  1106. preceeding  sectors contain replacement sectors and bad sec-
  1107. tor lists.  Disk-to-disk copies should be careful  to  avoid
  1108. overwriting  this  information.   See _b_a_d_1_4_4(8).  Bad sector
  1109. forwarding is optional in the hhkk, hhpp, rrmm,  and  xxpp  drivers.
  1110. It has been only lightly tested in the latter three cases.
  1111.  
  1112. 33..11..22..  SSppaaccee aavvaaiillaabbllee
  1113.  
  1114.      The  space  available on a disk varies per device.  The
  1115. amount of space available on the common disk partitions  for
  1116. /usr  is  listed  in  the following table.  Not shown in the
  1117.  
  1118.  
  1119.  
  1120.                         17 March 1998
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126. Installing/Operating 2.9BDSeDvi-c1e8-and file system configuration
  1127.  
  1128.  
  1129. table are the partitions of each drive devoted to  the  root
  1130. file system and the swapping area.
  1131.  
  1132.  
  1133.                Type               Name     Size
  1134.                -----------------------------------
  1135.                RK06               hk?d     9.2 Mb
  1136.                RK07               hk?c    22.4 Mb
  1137.                RM02, RM03         rm?c    60.2 Mb
  1138.                RM02, RM03         rm?d    30.9 Mb
  1139.                RP03               rp?c    33.3 Mb
  1140.                RP04, RP05, RP06   hp?c    74.9 Mb
  1141.                RP06               hp?d   158.9 Mb
  1142.                RM05               xp?c   115.4 Mb
  1143.                RM05               xp?e    80.9 Mb
  1144.  
  1145.  
  1146.  
  1147.      Each disk also has a swapping area and a root file sys-
  1148. tem.  The distributed system  binaries  and  sources  occupy
  1149. about 38 megabytes.
  1150.  
  1151.      The sizes and offsets of all of the disk partitions are
  1152. in the manual pages for the disks;  see  section  4  of  the
  1153. Berkeley PDP-11 UNIX Programmer's manual.  Be aware that the
  1154. disks have their sizes measured in ``sectors'' of 512  bytes
  1155. each, while the UNIX file system blocks are 1024 bytes each.
  1156. Thus if a disk partition has 10000 sectors (disk blocks), it
  1157. will  have  only  5000 UNIX file system blocks, and you mmuusstt
  1158. divide by 2 to use 5000 when specifying the size to the _m_k_f_s
  1159. command.  The sizes and offsets in the kernel (ioconf.c) and
  1160. the manual pages are in 512-byte blocks.  If bad sector for-
  1161. warding  is supported for your disk, be sure to leave suffi-
  1162. cient room to contain the bad sector information when making
  1163. new file systems.
  1164.  
  1165. 33..11..33..  LLaayyoouutt ccoonnssiiddeerraattiioonnss
  1166.  
  1167.      There  are  several  considerations  in deciding how to
  1168. adjust the arrangement of things on  your  disks:  the  most
  1169. important is making sure there is adequate space for what is
  1170. required;  secondarily,  throughput  should  be   maximized.
  1171. Swapping space is an important parameter.  Since running out
  1172. of swap space often causes the system to panic, it  must  be
  1173. large enough that this does not happen.
  1174.  
  1175.      Many  common  system programs (the C compiler, the edi-
  1176. tor, the assembler etc.)  create intermediate files  in  the
  1177. /tmp directory, so the file system where this is stored also
  1178. should be made large enough to accommodate  most  high-water
  1179. marks;  if  you  have several disks, it makes sense to mount
  1180. this in a ``root'' or ``swap'' (i.e. first or second  parti-
  1181. tion)  file  system  on another disk.  On RK06 and RK07 sys-
  1182. tems, where there is little space in the hk?c or  hk?d  file
  1183.  
  1184.  
  1185.  
  1186.                         17 March 1998
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192. Installing/Operating 2.9BDSeDvi-c1e9-and file system configuration
  1193.  
  1194.  
  1195. systems  to  store  the system source, it is normal to mount
  1196. /tmp on /dev/hk1a.
  1197.  
  1198.      The efficiency with which UNIX is able to use  the  CPU
  1199. is  often  strongly  affected by the configuration of disks.
  1200. For general time-sharing applications, the best strategy  is
  1201. to  try  to split the most actively-used sections among sev-
  1202. eral disk arms.  There are at least five components  of  the
  1203. disk load that you can divide between the available disks:
  1204.  
  1205.      1. The root file system.
  1206.      2. The swap area.
  1207.      3. The /tmp file system.
  1208.      4. The /usr file system.
  1209.      5. The user files.
  1210.  
  1211. Here  are  several  possibilities  for  utilizing 2, 3 and 4
  1212. disks:
  1213.  
  1214.                  +---------+---------------+
  1215.                  |         |     disks     |
  1216.                  |         +---+-----+-----+
  1217.                  |what     | 2 |  3  |  4  |
  1218.                  +---------+---+-----+-----+
  1219.                  |root     | 1 |  1  |  1  |
  1220.                  |tmp      | 1 |  3  |  4  |
  1221.                  |usr      | 1 |  2  |  2  |
  1222.                  |swapping | 2 |  3  |  4  |
  1223.                  |users    | 2 | 1+3 | 1+3 |
  1224.                  |archive  | x |  x  |  4  |
  1225.                  +---------+---+-----+-----+
  1226.  
  1227.      The most important consideration is  to  even  out  the
  1228. disk  load as much as possible, and to do this by decoupling
  1229. file systems (on separate arms) between which heavy  copying
  1230. occurs.   Note that a long term average balanced load is not
  1231. important; it is much more important to have instantaneously
  1232. balanced load when the system is busy.  When placing several
  1233. busy file systems on the same disk, it is helpful  to  group
  1234. them  together  to  minimize  arm movement, with less active
  1235. file systems off to the side.
  1236.  
  1237.      Intelligent experimentation  with  a  few  file  system
  1238. arrangements  can  pay off in much improved performance.  It
  1239. is particularly easy to move the root, the /tmp file  system
  1240. and  the  swapping areas.  Note, though, that the disks con-
  1241. taining the root and swapping  area  can  never  be  removed
  1242. while  UNIX  is  running.  Place the user files and the /usr
  1243. directory as space needs dictate  and  experiment  with  the
  1244. other, more easily moved file systems.
  1245.  
  1246.      As  an  example,  consider a system with RM03s.  On the
  1247. first RM03, rrmm00, we will put the root file system  in  rrmm00aa,
  1248. and  the //uussrr file system in rrmm00cc, which has enough space to
  1249.  
  1250.  
  1251.  
  1252.                         17 March 1998
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258. Installing/Operating 2.9BDSeDvi-c2e0-and file system configuration
  1259.  
  1260.  
  1261. hold it and then some.  If we had only one  RM03,  we  would
  1262. put  user files in the rrmm00cc partition with the system source
  1263. and binaries, or split them between rrmm00dd and rrmm00ee.  The /tmp
  1264. directory  will  be part of the root file system, as no file
  1265. system will be mounted on /tmp.
  1266.  
  1267.      If we had a second RM03, we would create a file  system
  1268. in  rrmm11cc  and  put user files there, calling the file system
  1269. /mnt.  We would keep a backup copy of the root  file  system
  1270. in  the rrmm11aa disk partition, a file system for /tmp on rrmm00bb,
  1271. and swap on rrmm11bb.
  1272.  
  1273. 33..11..44..  IImmpplleemmeennttiinngg aa llaayyoouutt
  1274.  
  1275.      Once a disk layout has  been  chosen,  the  appropriate
  1276. special  files  for the disk partitions must be created (see
  1277. Setting up the /dev directory, below).  Empty  file  systems
  1278. will  then  be  created  in  the appropriate partitions with
  1279. _m_k_f_s(8), and the files belonging in the file system can then
  1280. be  restored  from tape.  The section on setting up the /usr
  1281. file system contains detailed information on  this  process.
  1282. The  swap device is specified when the kernel is configured,
  1283. which is also discussed later.  At that time, you  may  also
  1284. want  to  consider whether to use the root device or another
  1285. file system (e.g. /tmp) for the pipe device (the pipe device
  1286. is  a  file  system  where  the kernel keeps temporary files
  1287. related to pipe I/O; it should be  _m_o_u_n_ted  before  any  I/O
  1288. through pipes is attempted).
  1289.  
  1290. 33..22..  SSeettttiinngg uupp tthhee //ddeevv ddiirreeccttoorryy
  1291.  
  1292.      Devices  are accessed through special files in the file
  1293. system, made by the _m_k_n_o_d(8) program and  normally  kept  in
  1294. the  /dev  directory.   Devices  to be supported by UNIX are
  1295. implemented in the kernel by drivers; the proper  driver  is
  1296. selected  by  the  major device number and type specified to
  1297. _m_k_n_o_d.  All devices supported  by  the  distribution  system
  1298. already  have  nodes  in  /dev.   They  were  created by the
  1299. /dev/MAKE shell script.   It  is  easiest  to  rebuild  this
  1300. directory  from  the  beginning with the correct devices for
  1301. your configuration.  First, determine the UNIX names of  the
  1302. devices  on your system (e.g. _d_h, _l_p, _x_p).  Some will be the
  1303. same as the names of devices on the generic system.   Others
  1304. need not be.  See section 4 of the UNIX Programmer's Manual.
  1305. Next create a new directory /newdev, copy /dev/MAKE into it,
  1306. edit MAKE to provide an entry for local needs, replacing the
  1307. case LOCAL, and run it to generate the  desired  devices  in
  1308. the  /newdev directory.  The LOCAL entry can be used for any
  1309. unusual devices, and to rename standard devices as  desired.
  1310. It  should  also  move the node for the disk partition being
  1311. used as the swap area to _s_w_a_p (or, if swap is after  a  file
  1312. system as on RK05 or RL disks, link the other node to _s_w_a_p).
  1313. Different devices are specified to  MAKE  in  various  ways.
  1314. Terminal  multiplexors  (DZ and DH) are specified by boards,
  1315.  
  1316.  
  1317.  
  1318.                         17 March 1998
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324. Installing/Operating 2.9BDSeDvi-c2e1-and file system configuration
  1325.  
  1326.  
  1327. and 8 or 16 nodes will be made, as appropriate.   Disks  are
  1328. made  by  partition,  for example xp0c, so that you may make
  1329. the nodes corresponding to the file systems that you  intend
  1330. to  use.  Note that _h_p, _r_m and _x_p are actually synonyms, but
  1331. you should use the name corresponding to the driver you plan
  1332. to  use.   The  kernel configuration section (section 5.4.1)
  1333. has more information.  For tape drives, there are  different
  1334. invocations for different types of controllers, although the
  1335. nodes produced will have  the  same  names.   The  different
  1336. types  are  _h_t,  _t_m  and _t_s, as above, and also _u_t, which is
  1337. used for the Emulex TC-11 and other  TM-11  emulations  that
  1338. are also capable of selecting 1600 or 800 bpi under software
  1339. control.  Making _h_t_0 or _u_t_0 will result in nodes _m_t_0 and _m_t_1
  1340. (800  and  1600  bpi,  respectively)  and parallel nodes for
  1341. other options; _h_t_1 uses the names _m_t_2 and  _m_t_3.   See  _h_t(4)
  1342. and  _t_m(4).  In contrast, the MAKE script makes only one set
  1343. of nodes for _t_m or _t_s,  without  changing  the  unit  number
  1344. specified.  Different sites use different naming conventions
  1345. for tapes; you could use the LOCAL entry in MAKE to move the
  1346. tape files to your favorite names.
  1347.  
  1348.      As  an example, if your machine had a single DZ-11, two
  1349. DH-11s, an RP03 disk, two RP06 disks, and a TM03  tape  for-
  1350. matter you would do:
  1351.  
  1352.      ## cd /
  1353.      ## mkdir newdev
  1354.      ## cp /dev/MAKE /newdev/MAKE
  1355.      ## cd newdev
  1356.      ## ./MAKE dz0 dh1 ht0 std LOCAL
  1357.      ## ./MAKE rp0a rp0b rp0c hp0a hp0b hp0c hp1a hp1b hp1d hp1e
  1358.  
  1359. Note  the ``std'' argument here that causes standard devices
  1360. such as _c_o_n_s_o_l_e, the console terminal, to be created.
  1361.  
  1362.      You can then do
  1363.  
  1364.      ## cd /
  1365.      ## mv dev genericdev ; mv newdev dev
  1366.      ## sync
  1367.  
  1368. to install the new device directory.  Once you are confident
  1369. that  the  new  directory is set up properly, you can remove
  1370. /genericdev.
  1371.  
  1372. 33..33..  EEddiittiinngg ssyysstteemm--ddeeppeennddeenntt ccoonnffiigguurraattiioonn ffiilleess
  1373.  
  1374.      There are a number of small files in /_e_t_c that are used
  1375. by various programs to determine things about the local con-
  1376. figuration.  At this  point,  several  of  these  should  be
  1377. edited  to  describe  the local configuration.  You may have
  1378. old versions of some of them which you may want to  use,  or
  1379. you  may edit the files that are provided as examples.  Some
  1380. of this may be  done  later  at  your  convenience,  but  is
  1381.  
  1382.  
  1383.  
  1384.                         17 March 1998
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390. Installing/Operating 2.9BDSeDvi-c2e2-and file system configuration
  1391.  
  1392.  
  1393. presented   here   for  organization.   Both  //eettcc//ddttaabb  and
  1394. //eettcc//ffssttaabb should be edited now.
  1395.  
  1396. 33..33..11..  //eettcc//ddttaabb
  1397.  
  1398.      This file contains the list of devices  which  will  be
  1399. checked at boot time by _a_u_t_o_c_o_n_f_i_g(8).  The devices that are
  1400. listed are tested to see whether they  exist  and  have  the
  1401. correct  register  addresses and interrupt vectors.  If they
  1402. do, and the kernel has a corresponding driver routine, _a_u_t_o_-
  1403. _c_o_n_f_i_g  notifies  the  driver that the device exists at that
  1404. address.  In this way, the addresses  and  vectors  of  most
  1405. devices  do  not need to be compiled into the operating sys-
  1406. tem.  The exception is that disks must be  preconfigured  if
  1407. they are to be used as root file systems.
  1408.  
  1409.      This  file  should  be  edited  to  include  all of the
  1410. devices on the system with the exception of  the  clock  and
  1411. console device.  Other device entries can be deleted or com-
  1412. mented out with a '#' at the beginning  of  the  line.   The
  1413. format  of the entries is defined in _d_t_a_b(5).  _A_u_t_o_c_o_n_f_i_g(8)
  1414. describes the autoconfiguration process.  One word  of  cau-
  1415. tion:   if  a  device fails to interrupt as expected, and if
  1416. its unit number is specified (not a '?' wildcard),  _a_u_t_o_c_o_n_-
  1417. _f_i_g  will  notify the driver that the device is nnoott present,
  1418. and preconfigured devices (like root disks) could be discon-
  1419. nected.   Thus, it is probably best to use a '?'  instead of
  1420. a unit number for your root disks until  you  are  confident
  1421. that  the  probe  always finds that disk, especially if your
  1422. disk controller is an emulation of another disk type.  Disks
  1423. that  are  not used as boot devices for UNIX can be properly
  1424. listed with unit numbers.
  1425.  
  1426. 33..33..22..  //eettcc//ffssttaabb
  1427.  
  1428.      This file contains the list of  file  systems  normally
  1429. mounted  on  the system.  Its format is defined in _f_s_t_a_b(5).
  1430. Programs like _d_f(1) and _f_s_c_k(8) use  this  list  to  control
  1431. their actions.  Each disk partition that has been assigned a
  1432. function should be listed here.  See the  manual  pages  for
  1433. specifics on how to configure this file.
  1434.  
  1435. 33..33..33..  //eettcc//iiddeenntt
  1436.  
  1437.      The banner printed by _g_e_t_t_y(8) is read from /etc/ident.
  1438. Edit this file to the banner you wish to use.  It  may  con-
  1439. tain special characters to clear terminal screens, etc., but
  1440. note that the same file is used for all terminals.
  1441.  
  1442. 33..33..44..  //eettcc//mmoottdd
  1443.  
  1444.      The contents of /etc/motd, the ``message of the  day,''
  1445. is  displayed  at  the  terminal when a user is logged in by
  1446. _l_o_g_i_n(1).
  1447.  
  1448.  
  1449.  
  1450.                         17 March 1998
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456. Installing/Operating 2.9BDSeDvi-c2e3-and file system configuration
  1457.  
  1458.  
  1459. 33..33..55..  //eettcc//ppaasssswwdd,, //eettcc//ggrroouupp
  1460.  
  1461.      These files obviously need  local  modifications.   See
  1462. the  section  on adding new users.  Entries for pseudo-users
  1463. (user IDs that are not used for logins) have password fields
  1464. containing ``***'', since encrypted passwords never not con-
  1465. tain asterisks.
  1466.  
  1467. 33..33..66..  //eettcc//rrcc
  1468.  
  1469.      As the system begins multiuser operations, it  executes
  1470. the commands in /etc/rc (see _i_n_i_t(8)).  Most of the commands
  1471. in this file are standard and should not be changed, includ-
  1472. ing  the  section  for checking file systems after a reboot.
  1473. These commands will be ignored if autoreboot is not enabled.
  1474. You  should  edit  /etc/rc to set your machine's name.  Look
  1475. for the line
  1476.  
  1477.           /etc/hostname hostnameunknown
  1478.  
  1479. and change _h_o_s_t_n_a_m_e_u_n_k_n_o_w_n to  the  name  of  your  machine.
  1480. This name will be used by _M_a_i_l(1) and _u_u_c_p(1) (among others)
  1481. and should correspond to the name by which your  machine  is
  1482. known  to  external networks (if any).  At this time you may
  1483. wish to add additional commands to this file if you need  to
  1484. start  additional daemons, remove old lock files, or perform
  1485. any other cleanup as the system comes up.
  1486.  
  1487. 33..33..77..  CCoonnffiigguurriinngg tteerrmmiinnaallss
  1488.  
  1489.      If UNIX is to support  simultaneous  access  from  more
  1490. than just the console terminal, the file /etc/ttys (_t_t_y_s(5))
  1491. has to be edited.
  1492.  
  1493.      Terminals connected via DZ interfaces  are  convention-
  1494. ally  named  ttttyy_d_d where _d_d is a decimal number, the ``minor
  1495. device'' number.  The lines on  dz0  are  named  /dev/tty00,
  1496. /dev/tty01, ... /dev/tty07.  Lines on DH interfaces are con-
  1497. ventionally named ttttyyhh_x, where _x is a hexadecimal digit.  If
  1498. more  than  one  DH interface is present in a configuration,
  1499. successive terminals would be named ttttyyii_x, ttttyyjj_x, etc.
  1500.  
  1501.      To add a new terminal be sure the device is  configured
  1502. into  the  system,  that the special file for the device has
  1503. been made by /dev/MAKE, and the special  file  exists.  Then
  1504. set the first character of the appropriate line of /etc/ttys
  1505. to 1 (or add a new line).  The first character may also be 3
  1506. if  the  line  is  also  to be used in maintenance mode (see
  1507. _i_n_i_t(8)).
  1508.  
  1509.      The second character of each line in the /etc/ttys file
  1510. lists  the speed and initial parameter settings for the ter-
  1511. minal.  The most common choices, from _g_e_t_t_y(8), are:
  1512.  
  1513.  
  1514.  
  1515.  
  1516.                         17 March 1998
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522. Installing/Operating 2.9BDSeDvi-c2e4-and file system configuration
  1523.  
  1524.  
  1525.      0    300-1200-150-110
  1526.      3    1200-300
  1527.      4    300 (e.g. console)
  1528.      5    300-1200
  1529.      6    1200
  1530.      7    2400
  1531.      8    4800
  1532.      9    9600
  1533.      B    autobaud
  1534.  
  1535. Here the first speed is the speed a terminal starts at,  and
  1536. ``break''  switches  speeds.   Thus  a  newly added terminal
  1537. /dev/tty00 could be added as
  1538.  
  1539.      19tty00
  1540.  
  1541. if it was wired to run at 9600 baud.   The  ``B''  indicates
  1542. that  _g_e_t_t_y  should attempt to guess a line's speed when the
  1543. user types a carriage return or control-C.  Note  that  this
  1544. requires kernel support.  See section 5.3.6 below.
  1545.  
  1546.      Dialup terminals should be wired so that the carrier is
  1547. asserted only when the phone line is dialed  up.   For  non-
  1548. dialup  terminals from which modem control is not available,
  1549. you must either wire back the signals so  that  the  carrier
  1550. always  appears  to  be present, or (for lines on a DH-11 or
  1551. DZ-11) add 0200 to the minor device number to indicate  that
  1552. carrier  is to be ignored.  See _d_h(4) and _d_z(4) for details.
  1553.  
  1554.      You should also edit the file /etc/ttytype placing  the
  1555. type of each terminal there (see _t_t_y_t_y_p_e(5)).
  1556.  
  1557.      When  the  system starts running multi-user, all termi-
  1558. nals that are listed in /etc/ttys having a 1  or  3  as  the
  1559. first  character of their line are enabled.  If, during nor-
  1560. mal operations, it is desired to disable  a  terminal  line,
  1561. the super-user can edit the file /etc/ttys, change the first
  1562. character of the corresponding line to 0  and  then  send  a
  1563. hangup signal to the _i_n_i_t process, by typing (see _k_i_l_l(1))
  1564.  
  1565.      ## kill -1 1
  1566.         or
  1567.      ## kill -HUP 1
  1568.  
  1569. Terminals  can  similarly  be  enabled by changing the first
  1570. character of a line from a 0 to a 1 and sending a hangup  to
  1571. _i_n_i_t.
  1572.  
  1573.      Note  that  if a special file is inaccessible when _i_n_i_t
  1574. tries to create a process for it, init will print a  message
  1575. on  the console and try to reopen the terminal every minute,
  1576. reprinting the warning message every 10 minutes.
  1577.  
  1578.  
  1579.  
  1580.  
  1581.  
  1582.                         17 March 1998
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588. Installing/Operating 2.9BDSeDvi-c2e5-and file system configuration
  1589.  
  1590.  
  1591.      Finally note that you should change the  names  of  any
  1592. dialup terminals to ttyd?  where ? is in [0-9a-f] since some
  1593. programs use this property of the names to decide whether  a
  1594. terminal  is  a dialup.  Shell commands to do this should be
  1595. put in the /dev/MAKE script under case LOCAL.
  1596.  
  1597.  
  1598.  
  1599.  
  1600.  
  1601.  
  1602.  
  1603.  
  1604.  
  1605.  
  1606.  
  1607.  
  1608.  
  1609.  
  1610.  
  1611.  
  1612.  
  1613.  
  1614.  
  1615.  
  1616.  
  1617.  
  1618.  
  1619.  
  1620.  
  1621.  
  1622.  
  1623.  
  1624.  
  1625.  
  1626.  
  1627.  
  1628.  
  1629.  
  1630.  
  1631.  
  1632.  
  1633.  
  1634.  
  1635.  
  1636.  
  1637.  
  1638.  
  1639.  
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.  
  1646.  
  1647.  
  1648.                         17 March 1998
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654. Installing/Operating 2.9BSD -26-                  /usr setup
  1655.  
  1656.  
  1657.              44.. SSEETTTTIINNGG UUPP TTHHEE //uussrr FFIILLEE SSYYSSTTEEMM
  1658.  
  1659.  
  1660.  
  1661.      The next step in bringing up the 2.9BSD distribution is
  1662. to read in the binaries and sources on the /usr file system.
  1663. This will also demonstrate how to add new  file  systems  in
  1664. general, and the overall procedure can be repeated to set up
  1665. additional file systems.  There are two portions of the /usr
  1666. file  system, one on each tape.  The first tape contains the
  1667. binary directories, manual pages and documentation, as  well
  1668. as skeletal directories such as spool and msgs.  If you have
  1669. room, it is easiest to extract everything.  The size of  the
  1670. entire  /usr  file system image on the distribution tapes is
  1671. 38 megabytes.  It will not fit on a single RK05,  RK06/7  or
  1672. RL01/2.   In  these cases, the /usr file system will have to
  1673. be extracted in sections or  split  across  multiple  disks.
  1674. The _b_i_n, _i_n_c_l_u_d_e, _l_i_b, and _u_c_b subdirectories are essential.
  1675. The system sources will also be needed  to  reconfigure  the
  1676. kernel; they are in /usr/src/sys.  The _a_d_m, _d_i_c_t, _m_s_g_s, _p_r_e_-
  1677. _s_e_r_v_e, _s_p_o_o_l, _s_y_s and _t_m_p directories may also be  extracted
  1678. to  provide  a skeletal system.  The first part of this sec-
  1679. tion describes how to extract /usr as part of a  full  boot-
  1680. strap;  the second part explains how to install 2.9BSD as an
  1681. upgrade to a 2.8BSD system if you decide not  to  perform  a
  1682. full bootstrap.
  1683.  
  1684. 44..11..  FFuullll bboooottssttrraapp pprroocceedduurree
  1685.  
  1686.      This  procedure  will  create  a  new  file  system and
  1687. extract the /usr directory into  it.   First  determine  the
  1688. name  of  the  disk  on which you plan to place the new file
  1689. system,  for  example  rm0c,  and  substitute  it  for  _d_i_s_k
  1690. throughout  this  section.   You  may want to create a small
  1691. ``prototype'' file to describe the file system (see _m_k_f_s(8))
  1692. in  order to change the size of the inode list.  This is the
  1693. same as the maximum number of files that can be  created  on
  1694. the file system.  The default is to allow 16 inodes (occupy-
  1695. ing one block) per 24 file system blocks, allowing the  file
  1696. system  to  be  completely  filled  with  small  files  (1-2
  1697. blocks).  This is more than required for /usr and other file
  1698. systems  which have larger average file size.  If you decide
  1699. to set up a prototype file for _m_k_f_s, use its name for  _p_r_o_t_o
  1700. below.  The prototype file needs to contain only the name of
  1701. the bootstrap, the sizes, and the line for the  root  direc-
  1702. tory  (don't forget the '$' to terminate).  Look up the cor-
  1703. rect size for this file system in the manual section for the
  1704. disk.   Note  that  the size given to _m_k_f_s is in file system
  1705. blocks of 1024 bytes, and thus the sizes in the manual  page
  1706. will  have  to  be  divided  by 2.  If not using a prototype
  1707. file, substitute the size for  _p_r_o_t_o  in  the  mkfs  command
  1708. below.   Finally, recall the interleaving parameters _m and _n
  1709. that you used in making the root file system.  They  are  in
  1710. the  table  in  section  2.2.  Comments are enclosed in ( );
  1711.  
  1712.  
  1713.  
  1714.                         17 March 1998
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720. Installing/Operating 2.9BSD -27-                  /usr setup
  1721.  
  1722.  
  1723. don't type these.  Then execute the following commands (sub-
  1724. stituting  _r_m_t_1 and _n_r_m_t_1 for _r_m_t_0 and _n_r_m_t_0 respectively if
  1725. you have a 1600 bpi tape on an ht or tm controller):
  1726.  
  1727.  
  1728.      ## /etc/mkfs /dev/r_d_i_s_k _p_r_o_t_o _m _n   (create empty user file system)
  1729.      iissiizzee == _n_n_n_n_n                      (the count of available inodes)
  1730.      mm//nn == _m _n                          (free list interleave parameters)
  1731.                                         (this takes a few minutes)
  1732.      ## /etc/mount /dev/_d_i_s_k /usr        (mount the usr file system)
  1733.      ## cd /usr                          (make /usr the current directory)
  1734.                                         (make sure that the first tape is mounted)
  1735.      ## mt -t /dev/nrmt0 fsf 7           (skip first seven tape files)
  1736.      ## tar xpf /dev/rmt0                (extract the /usr file system binaries)
  1737.                                         (this takes about 20 minutes)
  1738.                                         (now mount the second tape)
  1739.      ## tar xpf /dev/rmt0                (extract the /usr file system sources)
  1740.                                         (this takes another 20 minutes)
  1741.  
  1742.  
  1743.      You can now check the consistency of the /usr file sys-
  1744. tem by doing
  1745.  
  1746.  
  1747.      ## cd /                      (back to root)
  1748.      ## /etc/umount /dev/_d_i_s_k     (unmount /usr)
  1749.      ## fsck /dev/r_d_i_s_k
  1750.  
  1751.  
  1752. To  use  the  /usr file system, you should now remount it by
  1753. saying
  1754.  
  1755.      ## /etc/mount /dev/_d_i_s_k /usr
  1756.  
  1757.  
  1758.      If you are installing the distribution on  a  PDP11/44,
  1759. 11/45, or 11/70 (machines with separate instruction and data
  1760. space) you should test and install the separate I/D versions
  1761. of  csh,  ex,  etc.  in  /usr/70.  Note, however, that these
  1762. binaries assume the existence  of  hardware  floating  point
  1763. support.
  1764.  
  1765. 44..22..  BBoooottssttrraapp ppaatthh 22:: uuppggrraaddiinngg 22..88BBSSDD
  1766.  
  1767.      Begin  by  reading  the other parts of this document to
  1768. see what has changed since the last  time  you  bootstrapped
  1769. the  system.   Also look at the new manual sections provided
  1770. to you.  If you have local system modifications to the  ker-
  1771. nel to install, look at the document ``Changes in the Kernel
  1772. in 2.9BSD'' to get an idea of how the  system  changes  will
  1773. affect your local mods.  Disclaimer:  there are a very large
  1774. number of changes from 2.8BSD to 2.9.  This section may  not
  1775. be  complete, and if a new program fails to work after being
  1776. recompiled, you may find that additional libraries or  other
  1777.  
  1778.  
  1779.  
  1780.                         17 March 1998
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786. Installing/Operating 2.9BSD -28-                  /usr setup
  1787.  
  1788.  
  1789. components may also need to be updated.
  1790.  
  1791.      There  are  6 major areas of changes that you will need
  1792. to incorporate to convert to the new system:
  1793.  
  1794. 1.   The new kernel and the associated programs that  imple-
  1795.      ment  job  control  or  read kernel memory: autoconfig,
  1796.      csh, the jobs library, login, ps, pstat, w, etc.
  1797.  
  1798. 2.   The programs related to system reboots and shutdowns.
  1799.  
  1800. 3.   The programs directly related to  user  text  overlays:
  1801.      adb and ld.
  1802.  
  1803. 4    The C compiler driver, C preprocessor, and assembler.
  1804.  
  1805. 5    The new version of the standard I/O library.
  1806.  
  1807. 6.   Other  programs with significant bug fixes, significant
  1808.      improvements,  or  which  were  previously  unavailable
  1809.      because they had not been overlaid.
  1810.  
  1811.      Here is a step-by-step guide to converting.  Before you
  1812. begin you should do a full backup of your root and /usr file
  1813. systems as a precaution against irreversible mistakes.
  1814.  
  1815. 1.   Set the shell variable ``nbsd'' to the name of a direc-
  1816.      tory where an empty file system can be  mounted  and  a
  1817.      quantity  of  material  from the tape (you should allow
  1818.      for about 38 megabytes) can  be  extracted.   Choose  a
  1819.      disk  of sufficient size to hold this quantity of mate-
  1820.      rial, make a file system, and mount $nbsd on this disk.
  1821.      Next, restore (see _r_e_s_t_o_r(8)) the root file system dump
  1822.      image to  this  disk.   Finally,  change  directory  to
  1823.      ``$nbsd/usr'',  and  extract  the  eighth file from the
  1824.      first distribution tape and  all  of  the  second  tape
  1825.      using _t_a_r (see _t_a_r(1)).
  1826.  
  1827. 2.   Install    the    new    include   files   by   copying
  1828.      $nbsd/usr/include/*.h     to      /usr/include      and
  1829.      $nbsd/usr/include/sys/*.h to /usr/include/sys.  Install
  1830.      the C compiler driver from the new  system  by  copying
  1831.      $nbsd/bin/cc  to  /bin/cc.   Install the assembler from
  1832.      the new system by copying $nbsd/bin/as to  /bin/as  and
  1833.      $nbsd/lib/as2  to  /lib/as2.  Install the new C prepro-
  1834.      cessor by copying $nbsd/lib/cpp to  /lib/cpp.   Install
  1835.      the new versions of adb and ld by copying $nbsd/bin/adb
  1836.      and $nbsd/bin/ld to /bin.
  1837.  
  1838. 3.   Reconfigure the system in $nbsd/usr/src/sys  to  corre-
  1839.      spond  to  your configuration according to the instruc-
  1840.      tions in section 5.
  1841.  
  1842.  
  1843.  
  1844.  
  1845.  
  1846.                         17 March 1998
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852. Installing/Operating 2.9BSD -29-                  /usr setup
  1853.  
  1854.  
  1855. 4.   Put in the new versions of the following programs:
  1856.  
  1857.           /bin: csh, kill, login, iostat, ps, pstat, vmstat
  1858.  
  1859.           /etc:  autoconfig,  fsck,  init,  mount,   reboot,
  1860.           savecore, shutdown, umount
  1861.  
  1862.           /usr/ucb: ex, w
  1863.  
  1864.      Merge  any  local changes to /etc/rc into $nbsd/etc/rc.
  1865.      Put the resulting file in /etc/rc.  Create  the  direc-
  1866.      tory  /usr/sys and perhaps some files in this directory
  1867.      (read _s_a_v_e_c_o_r_e(8)).  Make a device description file for
  1868.      _a_u_t_o_c_o_n_f_i_g.  See _d_t_a_b(5) and _a_u_t_o_c_o_n_f_i_g(8).
  1869.  
  1870. 5.   Try  bootstrapping  the new system; it should now work.
  1871.      Make sure to write new instructions to your  operators.
  1872.  
  1873. 6.   Incorporate  some other important bug fixes or enhance-
  1874.      ments:
  1875.  
  1876.      a)   Replace  the  file  tmac.an   in   the   directory
  1877.           /usr/lib/tmac     with     the     version    from
  1878.           $nbsd/usr/lib/tmac.      Replace     the      file
  1879.           /usr/lib/me/local.me   with   the   version   from
  1880.           $nbsd/usr/lib/me; copy $nbsd/usr/lib/me/refs.me to
  1881.           /usr/lib/me.
  1882.  
  1883.      b)   Install  the new C library source, /usr/src/lib/c,
  1884.           rebuild    and    reinstall    /lib/libc.a     and
  1885.           /usr/lib/libovc.a.
  1886.  
  1887.      c)   Install  the  jobs  library, /usr/src/lib/jobs and
  1888.           build   and   install    /usr/lib/libjobs.a    and
  1889.           /usr/lib/libovjobs.a.
  1890.  
  1891.      d)   Replace  the  directory  /usr/src/cmd/refer.  Then
  1892.           rebuild and reinstall the programs.
  1893.  
  1894.      e)   Install the new Mail source, /usr/src/ucb/Mail and
  1895.           reinstall /usr/ucb/Mail.
  1896.  
  1897.      f)   If  the  target  machine is a nonseparate I/D CPU,
  1898.           install the new _l_e_x and _y_a_c_c directories,  compile
  1899.           and install the programs.
  1900.  
  1901.      g)   Install    the    new    version   of   _t_a_r   from
  1902.           $nbsd/usr/src/cmd/tar.c and also  the  program  _m_t
  1903.           from $nbsd/usr/src/ucb/mt.c.
  1904.  
  1905.      h)   Merge your changes to /usr/src/ucb/termcap/reorder
  1906.           and   reinstall   the    terminal    data    base,
  1907.           /etc/termcap.   Install  the new terminal library,
  1908.           /usr/src/ucb/termlib,   remake    and    reinstall
  1909.  
  1910.  
  1911.  
  1912.                         17 March 1998
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918. Installing/Operating 2.9BSD -30-                  /usr setup
  1919.  
  1920.  
  1921.           /usr/lib/libtermcap.a and /usr/lib/libovtermcap.a.
  1922.           Then make and install the new version of _e_x_.
  1923.  
  1924.      i)   If you want the new version of the  Pascal  system
  1925.           incorporating overlays (for nonseparate I/D CPUs),
  1926.           remake   the   directories   _p_i    and    _p_x    in
  1927.           $nbsd/usr/src/cmd and install the programs.
  1928.  
  1929.      j)   Install  the  new  F77 compiler, /usr/src/cmd/f77,
  1930.           and the new libraries, /usr/src/lib/lib*77.   Then
  1931.           remake and reinstall them.
  1932.  
  1933.      k)   Install      the      new     library     sources,
  1934.           /usr/src/lib/{ape,curses,m,mp,plot} and remake and
  1935.           reinstall the new libraries.
  1936.  
  1937.      l)   Install  new  versions of as many of the following
  1938.           programs as  you  choose:  512dumpdir,  512restor,
  1939.           atrun,   cat,  catman,  ccat,  compact,  checkobj,
  1940.           ctags, df, diff, du, egrep, error, expand,  fgrep,
  1941.           find,  from,  grep, hostname, jove, l11, lint, ln,
  1942.           lock, login, lpr, ls, m11, make, man, mkfs,  more,
  1943.           msgs,  mv, ncheck, printenv, pq, ranm, rewind, rm,
  1944.           rmdir,  sed,  setquota,  size,  sort,  split,  sq,
  1945.           strings,  strip,  stty,  sysline, tail, tbl, tset,
  1946.           ul, uncompact, unexpand, vsh, wc.
  1947.  
  1948.      m)   Install the modified or  new  administrative  pro-
  1949.           grams: ac, getty, last.
  1950.  
  1951.      n)   Install some security fixes in the mail systems by
  1952.           installing     new     sources     for     berknet
  1953.           (/usr/src/ucb/berknet),                delivermail
  1954.           (/usr/src/ucb/delivermail),                   mail
  1955.           (/usr/src/cmd/mail.c),     and     secret     mail
  1956.           (/usr/src/cmd/xsend),  and  remaking   and   rein-
  1957.           stalling the new binaries.
  1958.  
  1959.      o)   Install     the     new     version     of    uucp
  1960.           (/usr/src/cmd/uucp).
  1961.  
  1962.      p)   Install  the  news  (/usr/contrib/news)  or  notes
  1963.           (/usr/contrib/notes)  bulletin board system if you
  1964.           wish.
  1965.  
  1966.      q)   Install   the   new    _e_q_n(1)    symbol    macros,
  1967.           /usr/public/eqnSyms.
  1968.  
  1969.      r)   Install  manual pages corresponding to the new and
  1970.           changed programs.
  1971.  
  1972.      s)   Remove  the  old  programs  /bin/ovas,  /bin/ovld,
  1973.           /lib/ovas2, and /bin/ovadb.  Remove the libucbpath
  1974.           library.  Remove the old version of reset and link
  1975.  
  1976.  
  1977.  
  1978.                         17 March 1998
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984. Installing/Operating 2.9BSD -31-                  /usr setup
  1985.  
  1986.  
  1987.           the new version of tset to reset.
  1988.  
  1989.  
  1990.  
  1991.  
  1992.  
  1993.  
  1994.  
  1995.  
  1996.  
  1997.  
  1998.  
  1999.  
  2000.  
  2001.  
  2002.  
  2003.  
  2004.  
  2005.  
  2006.  
  2007.  
  2008.  
  2009.  
  2010.  
  2011.  
  2012.  
  2013.  
  2014.  
  2015.  
  2016.  
  2017.  
  2018.  
  2019.  
  2020.  
  2021.  
  2022.  
  2023.  
  2024.  
  2025.  
  2026.  
  2027.  
  2028.  
  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. Installing/Operating 2.9BSD -32-        Kernel configuration
  2051.  
  2052.  
  2053.              55.. CCOONNFFIIGGUURRIINNGG AANNDD CCOOMMPPIILLIINNGG TTHHEE KKEERRNNEELL
  2054.  
  2055.  
  2056.  
  2057.      This  section  describes  procedures  used  to set up a
  2058. PDP-11 UNIX kernel (operating system).  It explains the lay-
  2059. out  of the kernel code, compile time options, how files for
  2060. devices are made and drivers for the devices are  configured
  2061. into the system and how the kernel is rebuilt to include the
  2062. needed drivers.  Procedures described here are used  when  a
  2063. system  is  first installed or when the system configuration
  2064. changes.   Procedures  for  normal  system   operation   are
  2065. described  in  the  next  section.   We also suggest ways to
  2066. organize local changes to the kernel.
  2067.  
  2068. 55..11..  KKeerrnneell oorrggaanniizzaattiioonn
  2069.  
  2070.      The kernel source is  kept  in  the  subdirectories  of
  2071. /usr/src/sys.   The  directory /usr/src/sys/sys contains the
  2072. mainline kernel code, implementing system  calls,  the  file
  2073. system,    memory    management,    etc.     The   directory
  2074. /usr/src/sys/dev contains device drivers and other low-level
  2075. routines.   The header files and scripts used to compile the
  2076. kernel are kept in /usr/src/sys/conf, and  are  copied  from
  2077. there  into a separate directory for each machine configura-
  2078. tion.  It is in this directory,  /usr/src/sys/_m_a_c_h_i_n_e,  that
  2079. the kernel is compiled.
  2080.  
  2081. 55..22..  CCoonnffiigguurriinngg aa SSyysstteemm
  2082.  
  2083.      The  kernel configuration of each PDP-11 UNIX system is
  2084. described by a set of header  files  (one  for  each  device
  2085. driver) and one file of magic numbers (ioconf.c) stored in a
  2086. subdirectory of /usr/src/sys for each configuration.  Pick a
  2087. name  for  your  machine  (call  it  PICKLE).   Then  in the
  2088. /usr/src/sys/conf directory,  create  a  configuration  file
  2089. PICKLE  describing  the  system you wish to build, using the
  2090. format in _c_o_n_f_i_g(8).  This is most easily done by  making  a
  2091. copy  of  the  GENERIC  file  used  for the distributed UNIX
  2092. binary.  Many of the fields in the configuration file corre-
  2093. spond to parameters listed in the remainder of this section,
  2094. which should be scanned before proceeding.   See  especially
  2095. section  5.4.3 on how to set up automatic reboots and dumps.
  2096. Then use _c_o_n_f_i_g to create a system directory ../PICKLE  with
  2097. ``config  PICKLE.''   Note the difference between _c_o_n_f_i_g and
  2098. _a_u_t_o_c_o_n_f_i_g.  _C_o_n_f_i_g sets up a directory in which the  kernel
  2099. will be compiled, with all of the system-specific files used
  2100. in compilation, and specifies what devices will  potentially
  2101. be  supported.   _A_u_t_o_c_o_n_f_i_g adapts the running kernel to the
  2102. hardware actually present, by testing and setting the regis-
  2103. ter addresses and interrupt vectors.
  2104.  
  2105.      _C_o_n_f_i_g  does  most  of  the  work of configuration, but
  2106. local needs will dictate some changes  in  the  options  and
  2107.  
  2108.  
  2109.  
  2110.                         17 March 1998
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116. Installing/Operating 2.9BSD -33-        Kernel configuration
  2117.  
  2118.  
  2119. parameters  in  the  header  files.   All of the options are
  2120. listed in the next section.  Examine whoami.h,  localopts.h,
  2121. param.h, and param.c and make any changes required; it might
  2122. also be wise to  look  through  the  header  files  for  the
  2123. devices  that you have configured, to check any options spe-
  2124. cific to the device drivers that are  listed  there.   After
  2125. you  have  finished  configuring a kernel and tested it, you
  2126. should  install   whoami.h   in   /usr/include,   and   copy
  2127. localopts.h  and  param.h  into /usr/include/sys.  This will
  2128. allow user-level programs to stay in sync with  the  running
  2129. kernel.
  2130.  
  2131.      If  you  wish  to  change  any disk partition tables or
  2132. device control status register addresses (other  than  those
  2133. configured at boot time by _a_u_t_o_c_o_n_f_i_g(8)), edit ioconf.c and
  2134. change the appropriate line(s).  The file l.s  contains  the
  2135. interrupt  vectors and interface code and may also be edited
  2136. if necessary, but usually will require no change.  Both  c.c
  2137. and  l.s include support for all normal devices according to
  2138. the header files per device, and with autoconfiguration, the
  2139. actual  vectors  need not be specified in advance.  Finally,
  2140. examine the Makefile, especially the options  near  the  top
  2141. and the load rules.  If you have placed the include files in
  2142. the standard directories, you shouldn't  have  to  make  any
  2143. changes to the options there.
  2144.  
  2145.      The  following  sections give short descriptions of the
  2146. various compile-time options for the kernel, and more exten-
  2147. sive  information  on  the  autoreboot  and  disk monitoring
  2148. setup.  After verifying that those features  are  configured
  2149. correctly  for your system, you can proceed to kernel compi-
  2150. lation.
  2151.  
  2152. 55..33..  CCoommppiillee TTiimmee OOppttiioonnss
  2153.  
  2154.      The 2.9BSD kernel  is  highly  tunable.   This  section
  2155. gives  a  brief description of the many compile-time options
  2156. available, and references to sections of the Berkeley PDP-11
  2157. UNIX  Programmer's  manual  where  more  information  can be
  2158. found.  Options fall into four categories; the letters  fol-
  2159. lowing  each will be used to mark the options throughout the
  2160. rest of this section.
  2161.  
  2162. Standard (S)                   These include  options  which
  2163.                                we   consider  necessary  for
  2164.                                reasonable system performance
  2165.                                or resiliency.
  2166.  
  2167. Desirable (D)                  These include many other fea-
  2168.                                tures that are convenient but
  2169.                                which  may  be  turned off if
  2170.                                system size is critical.  The
  2171.                                user  programs  and libraries
  2172.                                distributed    with    2.9BSD
  2173.  
  2174.  
  2175.  
  2176.                         17 March 1998
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182. Installing/Operating 2.9BSD -34-        Kernel configuration
  2183.  
  2184.  
  2185.                                generally  assume  that these
  2186.                                are  turned  on,  so  turning
  2187.                                them   off   may  necessitate
  2188.                                recompiling libraries or pro-
  2189.                                grams.   These options, along
  2190.                                with those designated ``stan-
  2191.                                dard'',   have  received  the
  2192.                                most thorough testing.
  2193.  
  2194. Configuration Dependent (C)    Options that depend  on  such
  2195.                                things  as  the physical con-
  2196.                                figuration  or  speed  issues
  2197.                                fall into this category.
  2198.  
  2199. Experimental (X)               New  features  that  have not
  2200.                                been  well  tested,   options
  2201.                                that  have known problems, or
  2202.                                ones that we do not  normally
  2203.                                use  are listed as experimen-
  2204.                                tal.  You should not use such
  2205.                                options  unless  the problems
  2206.                                listed are not considerations
  2207.                                for  your  system, or you are
  2208.                                willing   to   watch   things
  2209.                                closely  and possibly do some
  2210.                                debugging.
  2211.  
  2212.      The following sections list the parameters and  options
  2213. used  in  the  kernel.   The parameters (section 5.3.2) have
  2214. numeric values, usually table sizes, and most of them are in
  2215. param.h or param.c.  Those that are in param.h are typically
  2216. not changed, with the possible exception of MMAAXXMMEEMM, as their
  2217. values  are  set by convention.  The option flags are either
  2218. defined or undefined to enable or disable the  corresponding
  2219. feature, with the exception of UUCCBB__NNKKBB, which is unlikely to
  2220. change.  Each option is marked with  a  letter  to  indicate
  2221. into which of the four categories above it falls.
  2222.  
  2223. 55..33..11..  HHaarrddwwaarree
  2224.  
  2225.  
  2226. EENNAABBLLEE3344        XX   Automatically  detect  and  support Able
  2227.                     Computer's ENABLE/34|- memory  management
  2228.                     board.   This option implies UUNNIIBBUUSS__MMAAPP.
  2229.  
  2230. NNOONNFFPP           CC   Do not compile in code to  automatically
  2231.                     detect  and  support  an  FP11  floating
  2232.                     point processor.  Also, include  a  fast
  2233.                     illegal-instruction   trap  handler  and
  2234.                     modify the signal routines  to  make  it
  2235.                     possible   to  run  programs  using  the
  2236.                     floating-point interpreter under  trace.
  2237. -----------
  2238. |-ENABLE/34 is a trademark of Able Computer, Inc.
  2239.  
  2240.  
  2241.  
  2242.                         17 March 1998
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248. Installing/Operating 2.9BSD -35-        Kernel configuration
  2249.  
  2250.  
  2251. NNOONNSSEEPPAARRAATTEE     CC   Do  not  attempt to support separate I/D
  2252.                     user programs.
  2253.  
  2254. PPAARRIITTYY          CC   Recognize and deal with cache and memory
  2255.                     parity traps.
  2256.  
  2257. PPDDPP1111           CC   This  should  be  set to the CPU type of
  2258.                     the target machine (23, 24, 34, 40,  44,
  2259.                     45, 60, 70, or GENERIC).  You should use
  2260.                     34 for an 11/34A and 45  for  an  11/55.
  2261.                     GENERIC should be used to build a system
  2262.                     which runs on a variety of CPUs.  It was
  2263.                     used  to  make  the distributed kernels.
  2264.                     MMEENNLLOO__KKOOVV and NNOONNSSEEPPAARRAATTEE are defined if
  2265.                     PPDDPP1111   is   23,  24,  34,  40,  or  60.
  2266.                     MMEENNLLOO__KKOOVV is also defined  if  PPDDPP1111  is
  2267.                     GENERIC.  UUNNIIBBUUSS__MMAAPP is defined if PPDDPP1111
  2268.                     is 44, 70, or GENERIC.
  2269.  
  2270. SSMMAALLLL           CC   Use smaller (by about  a  factor  of  8)
  2271.                     queues and hash tables.
  2272.  
  2273. UUNNIIBBUUSS__MMAAPP      CC   Compile  in  code to detect (and support
  2274.                     if present) a UNIBUS map.
  2275.  
  2276. 55..33..22..  PPaarraammeetteerrss
  2277.  
  2278. 55..33..22..11..  GGlloobbaall ccoonnffiigguurraattiioonn
  2279.  
  2280. MMAAXXUUSSEERRSS            This is the maximum number of users  the
  2281.                     system  should  normally  expect to sup-
  2282.                     port.  _C_o_n_f_i_g sets this from the  corre-
  2283.                     sponding  field in the description file;
  2284.                     the definition is copied into the system
  2285.                     Makefile  rather than a header file.  It
  2286.                     is not intended to be a hard limit.   It
  2287.                     is   used  in  sizing  other  parameters
  2288.                     (CCMMAAPPSSIIZZ, NNFFIILLEE, NNIINNOODDEE,  NNPPRROOCC,  NNTTEEXXTT,
  2289.                     and SSMMAAPPSSIIZZ).  The formulae are found in
  2290.                     _p_a_r_a_m_._c.  Reasonable values for MMAAXXUUSSEERRSS
  2291.                     might  be  3  or  4  on  a  small system
  2292.                     (11/34, 11/40), 15 for an 11/44  with  a
  2293.                     reasonable  amount  of memory, and 15-30
  2294.                     for an 11/70 system.
  2295.  
  2296. TTIIMMEEZZOONNEE            The  number  of  minutes  westward  from
  2297.                     Greenwich.   _C_o_n_f_i_g  sets  this from the
  2298.                     corresponding field in  the  description
  2299.                     file.   Examples:   for Pacific Standard
  2300.                     time, 8 (* 60); for EST, 5.
  2301.  
  2302. DDSSTTFFLLAAGG             Should be 1  if  daylight  savings  time
  2303.                     applies  in  your  locality and 0 other-
  2304.                     wise.  _C_o_n_f_i_g sets this from  the  field
  2305.  
  2306.  
  2307.  
  2308.                         17 March 1998
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314. Installing/Operating 2.9BSD -36-        Kernel configuration
  2315.  
  2316.  
  2317.                     in the description file.
  2318.  
  2319. HHZZ                  This  is  the line clock frequency (e.g.
  2320.                     50 for a 50 Hz. clock).
  2321.  
  2322. 55..33..22..22..  TTuunnaabbllee ppaarraammeetteerrss
  2323.  
  2324. CCMMAAPPSSIIZZ             This is the  number  of  fragments  into
  2325.                     which  memory  can  be  broken.  If this
  2326.                     number is too low, the  kernel's  memory
  2327.                     allocator  may be forced to throw away a
  2328.                     section of memory  being  freed  because
  2329.                     there  is no room in the map to hold it.
  2330.                     In this case, a  diagnostic  message  is
  2331.                     printed on the console.  Normally scaled
  2332.                     automatically according to MMAAXXUUSSEERRSS.
  2333.  
  2334. MMAAXXMMEEMM              This sets an administrative limit on the
  2335.                     amount of memory a process may have.  It
  2336.                     is specified as (_n_n*16), where the first
  2337.                     number is the desired value in kilobytes
  2338.                     (the product is in clicks).  This number
  2339.                     is  usually  considerably lower than the
  2340.                     theoretical maximum (304 Kb for  a  non-
  2341.                     separate  I/D CPU, 464 Kb for a separate
  2342.                     I/D   CPU,   assuming   MMEENNLLOO__OOVVLLYY    is
  2343.                     defined).   Normal  values are 128 Kb if
  2344.                     there is no UNIBUS map (maximum physical
  2345.                     memory 248 Kb), otherwise 200 Kb.
  2346.  
  2347. NNBBUUFF                This  sets the size of the system buffer
  2348.                     cache.  It can be no greater  than  248.
  2349.                     If  UUCCBB__NNKKBB  is  defined, these are 1024
  2350.                     byte buffers.  Otherwise, they  are  512
  2351.                     byte  buffers.   The  buffers are not in
  2352.                     kernel data space, but are allocated  at
  2353.                     boot  time.   Normally  scaled automati-
  2354.                     cally according to MMAAXXUUSSEERRSS, but  should
  2355.                     be  examined  in  the  light of the disk
  2356.                     load and amount of memory.  For a  small
  2357.                     to  medium  system,  around  20  buffers
  2358.                     should be  sufficient;  a  large  system
  2359.                     with  many  disks  might use 40 to 60 or
  2360.                     more.
  2361.  
  2362. NNCCAALLLL               This is the maximum number of simultane-
  2363.                     ous   callouts  (kernel  event  timers).
  2364.                     Callouts are used to time events such as
  2365.                     tab or carriage return delays.  Normally
  2366.                     scaled   automatically   according    to
  2367.                     MMAAXXUUSSEERRSS.
  2368.  
  2369. NNCCLLIISSTT              This is the maximum number of clist seg-
  2370.                     ments.  Clists are small  buffer  areas,
  2371.  
  2372.  
  2373.  
  2374.                         17 March 1998
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380. Installing/Operating 2.9BSD -37-        Kernel configuration
  2381.  
  2382.  
  2383.                     used  to  hold tty characters while they
  2384.                     are being processed.   If  UUCCBB__CCLLIISSTT  is
  2385.                     defined,  they  are  not  in kernel data
  2386.                     space, and this number must be less than
  2387.                     512 if you are using 14 character clists
  2388.                     (the default), or 256 for  30  character
  2389.                     clists.   (The clist size, CCBBSSIIZZEE, is in
  2390.                     param.h.)
  2391.  
  2392. NNDDIISSKK               This is the maximum number of disks  and
  2393.                     controllers for which I/O statistics can
  2394.                     be gathered.  See _i_o_s_t_a_t(8).  Care  must
  2395.                     be  taken  that this is large enough for
  2396.                     the parameters for each disk (_X_X_DKN and
  2397.                     number of disks; see the section on disk
  2398.                     monitoring).
  2399.  
  2400. NNFFIILLEE               This sets the  maximum  number  of  open
  2401.                     files.   An  entry is made in this table
  2402.                     each time  a  file  is  ``opened''  (see
  2403.                     _c_r_e_a_t(2)),  _o_p_e_n(2)).   Processes  share
  2404.                     these table entries  across  forks  (see
  2405.                     _f_o_r_k(2),   _v_f_o_r_k(2)).   Normally  scaled
  2406.                     automatically according to MMAAXXUUSSEERRSS.
  2407.  
  2408. NNIINNOODDEE              This sets the size of the  inode  table.
  2409.                     There  is  one  entry in the inode table
  2410.                     for each open file  or  device,  current
  2411.                     working  or  root  directory, saved text
  2412.                     segment,   active   quota    node    (if
  2413.                     UUCCBB__QQUUOOTTAASS is defined), and mounted file
  2414.                     system.  Normally  scaled  automatically
  2415.                     according to MMAAXXUUSSEERRSS.
  2416.  
  2417. NNMMOOUUNNTT              This  indicates  the  maximum  number of
  2418.                     mountable file systems.   It  should  be
  2419.                     large  enough  that you don't run out at
  2420.                     inconvenient times.
  2421.  
  2422. NNPPRROOCC               This sets the maximum number  of  active
  2423.                     processes.   Normally  scaled  automati-
  2424.                     cally according to MMAAXXUUSSEERRSS.
  2425.  
  2426. NNTTEEXXTT               This sets the maximum number  of  active
  2427.                     shared  text  images (including inactive
  2428.                     saved text segments).   Normally  scaled
  2429.                     automatically according to MMAAXXUUSSEERRSS.
  2430.  
  2431. SSMMAAPPSSIIZZ             This  is the analogy of CCMMAAPPSSIIZZ for sec-
  2432.                     ondary memory  (swap  space).   Normally
  2433.                     scaled    automatically   according   to
  2434.                     MMAAXXUUSSEERRSS.
  2435.  
  2436.  
  2437.  
  2438.  
  2439.  
  2440.                         17 March 1998
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446. Installing/Operating 2.9BSD -38-        Kernel configuration
  2447.  
  2448.  
  2449. 55..33..22..33..  PPaarraammeetteerrss tthhaatt aarree sseett bbyy ccoonnvveennttiioonn
  2450.  
  2451. CCAANNBBSSIIZZ             This sets the maximum size of a terminal
  2452.                     line input buffer.  If using the old tty
  2453.                     line discipline,  exceeding  this  bound
  2454.                     causes _a_l_l characters to be lost. In the
  2455.                     new tty line discipline, no more charac-
  2456.                     ters  are  accepted until there is room.
  2457.                     Normally 256.
  2458.  
  2459. MMAAXXSSLLPP              This is the maximum time a  process  can
  2460.                     sleep  before it is no longer considered
  2461.                     a ``short term sleeper.''   It  is  used
  2462.                     only  if UUCCBB__MMEETTEERR is defined.  Normally
  2463.                     20.
  2464.  
  2465. MMAAXXUUPPRRCC             This sets the  maximum  number  of  pro-
  2466.                     cesses  each  user is allowed.  Normally
  2467.                     20, but can be lower on  heavily  loaded
  2468.                     systems.
  2469.  
  2470. MMSSGGBBUUFFSS             This  is  the number of characters saved
  2471.                     from system error messages.  It is actu-
  2472.                     ally  the  size  of circular buffer into
  2473.                     which messages  are  temporarily  saved.
  2474.                     It is expected that _d_m_e_s_g(8) will be run
  2475.                     by _c_r_o_n(8)  frequently  enough  that  no
  2476.                     message  is overwritten before it can be
  2477.                     saved in the system error log.  Normally
  2478.                     128.
  2479.  
  2480. NNCCAARRGGSS              This  is  the maximum size of an _e_x_e_c(2)
  2481.                     argument  list  (in  bytes).    Normally
  2482.                     5120.
  2483.  
  2484. NNOOFFIILLEE              This  sets  the  maximum  number of open
  2485.                     files each process is allowed.  Normally
  2486.                     20.
  2487.  
  2488. SSIINNCCRR               The  increment  (in  clicks)  by which a
  2489.                     process's stack is expanded when a stack
  2490.                     overflow   segmentation   fault  occurs.
  2491.                     Normally 20.
  2492.  
  2493. SSSSIIZZEE               The initial size (in clicks) of  a  pro-
  2494.                     cess's   stack.   This  should  be  made
  2495.                     larger if commonly  run  processes  have
  2496.                     large  data areas on their stacks.  Nor-
  2497.                     mally 20.
  2498.  
  2499. 55..33..33..  GGeenneerraall OOppttiioonnss
  2500.  
  2501.  
  2502.  
  2503.  
  2504.  
  2505.  
  2506.                         17 March 1998
  2507.  
  2508.  
  2509.  
  2510.  
  2511.  
  2512. Installing/Operating 2.9BSD -39-        Kernel configuration
  2513.  
  2514.  
  2515. AACCCCTT            DD   Enable code which (optionally) writes an
  2516.                     accounting  record  for  each process at
  2517.                     exit.  See _l_a_s_t_c_o_m_m(1), _s_a(1),  _a_c_c_t(2),
  2518.                     _a_c_c_t_o_n(8).
  2519.  
  2520. CCGGLL__RRTTPP         CC   Support a system call which marks a pro-
  2521.                     cess as a ``real time'' process,  giving
  2522.                     it higher priority than all others.  See
  2523.                     _r_t_p(2).
  2524.  
  2525. DDIIAAGGNNOOSSTTIICC      CC   Turn on more stringent  error  checking.
  2526.                     This  enables various kernel consistency
  2527.                     checks which  are  considered  extremely
  2528.                     unlikely to fail.  It is useful when the
  2529.                     system is inexplicably crashing.
  2530.  
  2531. IINNSSEECCUURREE        CC   Do not turn off the set-user-id or  set-
  2532.                     group-id  permissions  on a file when it
  2533.                     is written.
  2534.  
  2535. MMEENNLLOO__JJCCLL       DD   Support  reliable  signal  handling  and
  2536.                     enhanced  process control features.  See
  2537.                     _s_i_g_s_y_s(2j), _j_o_b_s(3j), _s_i_g_s_e_t(3j).   This
  2538.                     option requires UUCCBB__NNTTTTYY.
  2539.  
  2540. MMEENNLLOO__KKOOVV       CC   Support  automatic kernel text overlays.
  2541.                     This is  required  for  nonseparate  I/D
  2542.                     systems  and is defined automatically if
  2543.                     PPDDPP1111 is defined to be 23, 24,  34,  40,
  2544.                     60, or GENERIC.
  2545.  
  2546. MMEENNLLOO__OOVVLLYY      DD   Support  automatic  user  text overlays.
  2547.                     This is required in order to run certain
  2548.                     programs  (e.g.  _e_x  version  3.7 or, on
  2549.                     nonseparate  I/D  systems,  the  process
  2550.                     control C shell).
  2551.  
  2552. OOLLDDTTTTYY          CC   Support  the standard V7 tty line disci-
  2553.                     pline  (see  _t_t_y(4)).   This   must   be
  2554.                     defined if UUCCBB__NNTTTTYY is not defined.
  2555.  
  2556. UUCCBB__AAUUTTOOBBOOOOTT    DD   Allows   the   kernel  to  automatically
  2557.                     reboot itself,  either  on  demand  (see
  2558.                     _r_e_b_o_o_t(2)   and   _r_e_b_o_o_t(8))   or  after
  2559.                     _p_a_n_i_cs.  This option requires  a  little
  2560.                     planning;   see   section  5.4.3.   TThhiiss
  2561.                     ooppttiioonn rreeqquuiirreess UUCCBB__FFSSFFIIXX..
  2562.  
  2563. UUCCBB__CCLLIISSTT       CC   Map clists out of  kernel  virtual  data
  2564.                     space.   If there is sufficient space in
  2565.                     kernel data for an  adequate  number  of
  2566.                     clists,  this  option  should  not used.
  2567.                     Mostly used on large systems, or on sys-
  2568.                     tems where kernel data space is tight.
  2569.  
  2570.  
  2571.  
  2572.                         17 March 1998
  2573.  
  2574.  
  2575.  
  2576.  
  2577.  
  2578. Installing/Operating 2.9BSD -40-        Kernel configuration
  2579.  
  2580.  
  2581. UUCCBB__GGRRPPMMAASSTT     CC   Allow   one  user  to  be  designated  a
  2582.                     ``group super-user,''  able  to  perform
  2583.                     various  functions previously restricted
  2584.                     to root or the file's owner  alone.   In
  2585.                     the  kernel,  users whose group and user
  2586.                     ids are the same are  granted  the  same
  2587.                     permissions with respect to files in the
  2588.                     same group as is the owner.  User  level
  2589.                     software  implements  other permissions,
  2590.                     allowing the group super-user to  change
  2591.                     the  password  of  a  user  in  the same
  2592.                     group.  The most common use for this  is
  2593.                     in allowing teaching assistants to over-
  2594.                     see students.
  2595.  
  2596. UUCCBB__NNEETT         XX   Enable code implementing a  PDP-11  port
  2597.                     of  Berkeley's  version  of TCP/IP.  The
  2598.                     code is experimental and the implementa-
  2599.                     tion is incomplete.
  2600.  
  2601. UUCCBB__NNTTTTYY        SS   Support the Berkeley tty line discipline
  2602.                     (see _t_t_y(4) and _n_e_w_t_t_y(4)).   This  must
  2603.                     be defined if OOLLDDTTTTYY is not defined.
  2604.  
  2605. UUCCBB__PPGGRRPP        CC   Fix  a bug in the way standard V7 counts
  2606.                     a  user's  processes.   This  should  be
  2607.                     enabled  only if MMEENNLLOO__JJCCLL is undefined,
  2608.                     since the notion of  process  groups  is
  2609.                     completely  different  in the two cases.
  2610.                     If  UUCCBB__PPGGRRPP  and  MMEENNLLOO__JJCCLL  are   both
  2611.                     defined, the limit on the number of pro-
  2612.                     cesses allowed  per  user  (MMAAXXUUPPRRCC)  is
  2613.                     effectively eliminated.
  2614.  
  2615. UUCCBB__SSCCRRIIPPTT      XX   Allow   scripts  to  specify  their  own
  2616.                     interpreters.  For example, executing  a
  2617.                     script  beginning  with  ``#!  /bin/sh''
  2618.                     causes /bin/sh to be executed to  inter-
  2619.                     pret  the script.  This is not (yet) the
  2620.                     same as the facility on  4.1BSD  VMUNIX,
  2621.                     and  probably  needs a little work.  The
  2622.                     Bourne shell, /bin/sh, would need  modi-
  2623.                     fication also.
  2624.  
  2625. UUCCBB__UUPPRRIINNTTFF     DD   Write   error  messages  directly  on  a
  2626.                     user's terminal when the user  causes  a
  2627.                     file system to run out of inodes or free
  2628.                     blocks, or on certain mag tape errors.
  2629.  
  2630. UUCCBB__VVHHAANNGGUUPP     DD   Support  a  system  call  which   allows
  2631.                     _i_n_i_t(8)  to  revoke  access  to a user's
  2632.                     terminal when the user has  logged  out.
  2633.                     This is used to give new users ``clean''
  2634.                     terminals on login.
  2635.  
  2636.  
  2637.  
  2638.                         17 March 1998
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644. Installing/Operating 2.9BSD -41-        Kernel configuration
  2645.  
  2646.  
  2647. VVIIRRUUSS__VVFFOORRKK     DD   Implement a much more efficient  version
  2648.                     of  fork in which parent and child share
  2649.                     resources until the  child  _e_x_e_cs.   See
  2650.                     _v_f_o_r_k(2).   Note  that  this changes the
  2651.                     way  processes  appear  in  memory.   It
  2652.                     makes  swap  operations slower, and thus
  2653.                     might not be desirable on systems  which
  2654.                     swap heavily.
  2655.  
  2656. 55..33..44..  FFiillee ssyysstteemm
  2657.  
  2658.  
  2659. IINNTTRRLLVVEE         XX   Allows   interleaving  of  file  systems
  2660.                     across devices.  See _i_n_t_r_l_v_e(4).
  2661.  
  2662. MMPPXX__FFIILLSS        XX   Include code  for  the  V7  multiplexer.
  2663.                     The code is buggy and unsupported.
  2664.  
  2665. UUCCBB__FFSSFFIIXX       SS   Ensure that file system updates are done
  2666.                     in the correct order, thus  making  dam-
  2667.                     aged  file  systems less likely and more
  2668.                     easily  repairable.   TThhiiss   ooppttiioonn   iiss
  2669.                     rreeqquuiirreedd  bbyy  UUCCBB__AAUUTTOOBBOOOOTT ((aaccttuuaallllyy,, bbyy
  2670.                     tthhee --pp ooppttiioonn ooff  _f_s_c_k((88)),,  wwhhiicchh  mmaakkeess
  2671.                     cceerrttaaiinn  aassssuummppttiioonnss  aabboouutt tthhee ssttaattee ooff
  2672.                     tthhee ffiillee ssyysstteemmss))..
  2673.  
  2674. UUCCBB__SSYYMMLLIINNKKSS    CC   Add a new inode type to the file system:
  2675.                     the symbolic link.  Symbolic links cause
  2676.                     string substitution during the  pathname
  2677.                     interpretation   process.    See  _l_n(1),
  2678.                     _r_e_a_d_l_i_n_k(2), and _s_y_m_l_i_n_k(2).
  2679.  
  2680. UUCCBB__NNKKBB         SS   Use file system blocks of _N KB, normally
  2681.                     1.   Changes the fundamental file system
  2682.                     unit from 512 byte blocks to  1024  byte
  2683.                     blocks  (with  a corresponding reduction
  2684.                     in the size of  in-core  inodes).   This
  2685.                     increases file system bandwidth by 100%.
  2686.                     Note that UUCCBB__NNKKBB is not boolean, but is
  2687.                     defined as 1 for 1KB blocks.  Other val-
  2688.                     ues are possible, but require additional
  2689.                     macro  definitions.   All  file  systems
  2690.                     would have to be remade  with  new  ver-
  2691.                     sions  of _m_k_f_s and _r_e_s_t_o_r.  AAllll ssuupppplliieedd
  2692.                     ssooffttwwaarree  eexxppeeccttss  tthhiiss  ooppttiioonn  ttoo   bbee
  2693.                     eennaabblleedd..
  2694.  
  2695. UUCCBB__QQUUOOTTAASS      CC   Support   a   simplistic   (and   easily
  2696.                     defeated)  dynamic  disk  quota  scheme.
  2697.                     See    _l_s(1),   _p_q(1),   _q_u_o_t_a(2),   and
  2698.                     _s_e_t_q_u_o_t_a(8).
  2699.  
  2700.  
  2701.  
  2702.  
  2703.  
  2704.                         17 March 1998
  2705.  
  2706.  
  2707.  
  2708.  
  2709.  
  2710. Installing/Operating 2.9BSD -42-        Kernel configuration
  2711.  
  2712.  
  2713. 55..33..55..  PPeerrffoorrmmaannccee MMoonniittoorriinngg
  2714.  
  2715.  
  2716. DDIISSKKMMOONN         CC   Keep statistics  on  the  buffer  cache.
  2717.                     They  are  printed  by  the -_b option of
  2718.                     _i_o_s_t_a_t(8).
  2719.  
  2720. UUCCBB__LLOOAADD        DD   Enable code that computes a Tenex  style
  2721.                     load   average.   See  _l_a(1),  _g_l_d_a_v(2),
  2722.                     _l_o_a_d_a_v(3).
  2723.  
  2724. UUCCBB__MMEETTEERR       DD   Keep statistics on memory, queue  sizes,
  2725.                     process  states,  interrupts, traps, and
  2726.                     many  other  (possibly  useful)  things.
  2727.                     See  _v_m_s_t_a_t(1)  and  section 7.5 of this
  2728.                     paper.
  2729.  
  2730. 55..33..66..  DDeevviiccee DDrriivveerrss
  2731.  
  2732.      In this section, an XXXX__ prefix refers to the UNIX  name
  2733. of  the  device  for  which  the  option  is  intended to be
  2734. enabled.  For example, TTMM__IIOOCCTTLL refers to mag tape _i_o_c_t_ls in
  2735. tm.c.   Most of these definitions go in the header file _x_x_._h
  2736. for  the  device.   The  exceptions  are  BBAADDSSEECCTT,   MMAAXXBBAADD,
  2737. UUCCBB__DDEEVVEERRRR, and UUCCBB__EECCCC.
  2738.  
  2739. BBAADDSSEECCTT         CC   Enable  bad-sector  forwarding.  Sectors
  2740.                     marked bad by  the  disk  formatter  are
  2741.                     transparently   replaced  when  read  or
  2742.                     written.    Currently,   only   the   hk
  2743.                     driver's   code   has   been  thoroughly
  2744.                     tested.
  2745.  
  2746. DDDDMMTT            CC   Currently used only by  the  tm  driver.
  2747.                     Should  be  defined  if you have a TM-11
  2748.                     emulator  which  supports  800/1600  bpi
  2749.                     dual density drives with software selec-
  2750.                     tion.
  2751.  
  2752. DDZZ__PPDDMMAA         CC   Configure the dz driver  to  do  pseudo-
  2753.                     dma.
  2754.  
  2755. MMAAXXBBAADD          CC   This sets the maximum number of replace-
  2756.                     ment sectors available on  a  disk  sup-
  2757.                     porting DEC standard bad sector forward-
  2758.                     ing.  It can be no larger than  126  but
  2759.                     may  be  smaller  to  reduce the size of
  2760.                     kernel data space.  See the include file
  2761.                     /_u_s_r/_i_n_c_l_u_d_e/_s_y_s/_d_k_b_a_d_._h.
  2762.  
  2763. TTEEXXAASS__AAUUTTOOBBAAUUDD  CC   Support an _i_o_c_t_l which defeats detection
  2764.                     of framing or parity  errors.   This  is
  2765.                     used  by  _g_e_t_t_y(8) to accurately guess a
  2766.                     line's speed when a carriage  return  is
  2767.  
  2768.  
  2769.  
  2770.                         17 March 1998
  2771.  
  2772.  
  2773.  
  2774.  
  2775.  
  2776. Installing/Operating 2.9BSD -43-        Kernel configuration
  2777.  
  2778.  
  2779.                     typed.
  2780.  
  2781. UUCCBB__DDEEVVEERRRR      DD   Print  device  error messages in a human
  2782.                     readable (mnemonic) format.
  2783.  
  2784. UUCCBB__EECCCC         CC   Recognize  and  correct  soft  ecc  disk
  2785.                     transfer errors.
  2786.  
  2787. VVPP__TTWWOOSSCCOOMMPPLL    CC   Used  in  the  Versatec (vp) driver.  If
  2788.                     defined, the byte count register will be
  2789.                     loaded  with  the twos-complement of the
  2790.                     byte count, rather than the  byte  count
  2791.                     itself.  Check your controller manual to
  2792.                     see  whether  your  controller  requires
  2793.                     this.
  2794.  
  2795. XXXX__IIOOCCTTLL        DD   Turn  on  optional _i_o_c_t_ls for the corre-
  2796.                     sponding device.  See section 4  of  the
  2797.                     Berkeley PDP-11 UNIX Programmer's manual
  2798.                     for details.
  2799.  
  2800. XXXX__SSIILLOO         DD   Used in  the  dh  and  dz  drivers.   If
  2801.                     defined,   the  drivers  will  use  silo
  2802.                     interrupts to avoid taking an  interrupt
  2803.                     for each character received.
  2804.  
  2805. XXXX__SSOOFFTTCCAARR      CC   Currently  used  only  by  the dh and dz
  2806.                     drivers.  Should be defined if  not  all
  2807.                     of  the  lines  on  a DH-11 or DZ-11 use
  2808.                     modem control.  It allows one to  select
  2809.                     lines  on  which  modem  control will be
  2810.                     disabled.  See _d_h(4) and _d_z(4).  It  can
  2811.                     also  be  used  with escape-code autodi-
  2812.                     alers  to  allow  modem  control  to  be
  2813.                     ignored while talking to the dialer.
  2814.  
  2815. XXXX__TTIIMMEEOOUUTT      DD   Enable  a  watchdog timer.  This is used
  2816.                     to kick devices prone to  losing  inter-
  2817.                     rupts.   It  is currently available only
  2818.                     for the tm driver.
  2819.  
  2820. 55..33..77..  MMiisscceellllaanneeoouuss SSyysstteemm CCaallllss
  2821.  
  2822.  
  2823. UUCCBB__LLOOGGIINN       CC   Support a system call which can  mark  a
  2824.                     process  as  a ``login process'' and set
  2825.                     its recharge number (for accounting pur-
  2826.                     poses).    This   is   usually  done  by
  2827.                     _l_o_g_i_n(1).  See _l_o_g_i_n(2).
  2828.  
  2829. UUCCBB__RREENNIICCEE      DD   Support a system  call  which  allows  a
  2830.                     user  to  dynamically change a process's
  2831.                     ``nice'' value  over  the  entire  range
  2832.                     (-127  to 127) of values.  See _r_e_n_i_c_e(1)
  2833.  
  2834.  
  2835.  
  2836.                         17 March 1998
  2837.  
  2838.  
  2839.  
  2840.  
  2841.  
  2842. Installing/Operating 2.9BSD -44-        Kernel configuration
  2843.  
  2844.  
  2845.                     and _r_e_n_i_c_e(2).
  2846.  
  2847. UUCCBB__SSUUBBMM        CC   Support a system call to mark a  process
  2848.                     as having been ``submitted,'' permitting
  2849.                     it to run after the user has logged  out
  2850.                     and  enabling special accounting for its
  2851.                     CPU use.  See _s_u_b_m_i_t(1)  and  _s_u_b_m_i_t(2).
  2852.                     If this option is enabled, _i_n_i_t(8) sends
  2853.                     a SIGKILL signal to a user's unsubmitted
  2854.                     processes  when  that user logs out.  It
  2855.                     is ineffective if MMEENNLLOO__JJCCLL is  defined.
  2856.  
  2857. 55..33..88..  PPeerrffoorrmmaannccee TTuunniinngg
  2858.  
  2859.  
  2860. NNOOKKAA55           CC   Simplify  the  code for kernel remapping
  2861.                     by assuming that KDSA5 will not be  used
  2862.                     for  normal  kernel  data.   Kernel data
  2863.                     space must end before  0120000  if  this
  2864.                     option  is  enabled.   It is unfortunate
  2865.                     but unavoidable that one must first make
  2866.                     a   kernel  and  size  it  to  determine
  2867.                     whether  this  option  may   be   safely
  2868.                     defined.   It is usually possible on all
  2869.                     but the largest  separate  I/D  kernels,
  2870.                     and  on the small-to-medium nonseparate,
  2871.                     overlaid kernels.  The _c_h_e_c_k_s_y_s  utility
  2872.                     will print a warning message if the data
  2873.                     limit is exceeded when a new  kernel  is
  2874.                     loaded.
  2875.  
  2876. PPRROOFFIILL          CC   Turn on system profiling.  This requires
  2877.                     a  separate  I/D  cpu  equipped  with  a
  2878.                     KW11-P  clock.   It  cannot  be  used on
  2879.                     machines  with  ENABLE/34  boards  since
  2880.                     they  have  no spare page address regis-
  2881.                     ters.   If  profiling  is  enabled,  you
  2882.                     should  change  the definition of SPLFIX
  2883.                     in the corresponding machine Makefile to
  2884.                     _:_s_p_l_f_i_x_._p_r_o_f_i_l.       The      directory
  2885.                     /_u_s_r/_c_o_n_t_r_i_b/_g_e_t_s_y_s_p_r contains a program
  2886.                     for extracting the profiling information
  2887.                     from the kernel.
  2888.  
  2889. UUCCBB__BBHHAASSHH       DD   Compile in code to hash  buffer  headers
  2890.                     (and cut the time required by the _g_e_t_b_l_k
  2891.                     routine by 50% or  more  on  large  sys-
  2892.                     tems).
  2893.  
  2894. UUCCBB__FFRRCCSSWWAAPP     CC   Force  swaps  on  all  forks and expands
  2895.                     (but  not  vforks).   This  is  used  to
  2896.                     transfer  some  of  the load from a com-
  2897.                     pute-bound CPU  to  an  idle  disk  con-
  2898.                     troller.   This  is  probably not a good
  2899.  
  2900.  
  2901.  
  2902.                         17 March 1998
  2903.  
  2904.  
  2905.  
  2906.  
  2907.  
  2908. Installing/Operating 2.9BSD -45-        Kernel configuration
  2909.  
  2910.  
  2911.                     idea with VVIIRRUUSS__VVFFOORRKK defined, but  then
  2912.                     the  load  is  better  reduced  by using
  2913.                     vfork instead of fork.
  2914.  
  2915. UUCCBB__IIHHAASSHH       DD   Compile in code to hash  in-core  inodes
  2916.                     (and  cut  the time required by the _i_g_e_t
  2917.                     routine by 50% or  more  on  large  sys-
  2918.                     tems).
  2919.  
  2920. UUNNFFAASSTT          CC   Do   not  use  inline  macro  expansions
  2921.                     designed  to  speed   up   file   system
  2922.                     accesses  at  the  cost of a larger text
  2923.                     segment.
  2924.  
  2925. 55..44..  AAddddiittiioonnaall ccoonnffiigguurraattiioonn ddeettaaiillss
  2926.  
  2927.      A few of the parameters and options  require  a  little
  2928. care to set up; those considerations are discussed here.
  2929.  
  2930. 55..44..11..  AAlltteerrnnaattee ddiisskk ddrriivveerrss
  2931.  
  2932.      There  are several disk drivers provided for SMD disks.
  2933. The hhpp driver supports RP04/05/06 disks; rrmm supports RM02/03
  2934. disks,  and  ddvvhhpp  supports  300  Mbyte  drives on Diva con-
  2935. trollers.  In addition, there is an xxpp driver which  handles
  2936. any of the above, plus RM05 disks, multiple controllers, and
  2937. disks which are similar to those listed but  with  different
  2938. geometry  (e.g.  Fujitsu  160 Mbyte drives).  It can be used
  2939. with UNIBUS or MASSBUS controllers or both.  In general,  if
  2940. you  have  only one type of disk and one controller, the hhpp,
  2941. rrmm or ddvvhhpp drivers are the  best  choices,  since  they  are
  2942. smaller  and  simpler.   If you use the xxpp driver, it can be
  2943. set up in one of two ways.  If XXPP__PPRROOBBEE is defined in  xp.h,
  2944. the  driver  will attempt to determine the type of each disk
  2945. and controller by probing and using the drive type register.
  2946. To  save  the  space occupied by this routine, or to specify
  2947. different drive parameters, the drive and controller  struc-
  2948. tures  can  be  initialized  in  ioconf.c if XXPP__PPRROOBBEE is not
  2949. defined.  The controller addresses will have to be  initial-
  2950. ized  in  either  case  (at least the first, if it is a boot
  2951. device).  The  file  /usr/include/sys/hpreg.h  provides  the
  2952. definitions  for the flags and sizes.  Ioconf.c has an exam-
  2953. ple of initialized structures.  _X_p(4) gives more information
  2954. about drive numbering, etc.
  2955.  
  2956. 55..44..22..  DDiisskk mmoonniittoorriinngg ppaarraammeetteerrss
  2957.  
  2958.      The  kernel  is capable of maintaining statistics about
  2959. disk activity for specified disks; this information  can  be
  2960. printed  by  _i_o_s_t_a_t(8).   This involves some setup, however,
  2961. and if parameters are set incorrectly can cause  the  kernel
  2962. monitoring  routines  to overrun their array bounds.  To set
  2963. this up correctly, choose the disks to be monitored.  _I_o_s_t_a_t
  2964. is  configured  for  a maximum of 4 disks, but that could be
  2965.  
  2966.  
  2967.  
  2968.                         17 March 1998
  2969.  
  2970.  
  2971.  
  2972.  
  2973.  
  2974. Installing/Operating 2.9BSD -46-        Kernel configuration
  2975.  
  2976.  
  2977. changed by editing the headers.  The drivers that  do  over-
  2978. lapped  seeks  (hk,  hp,  rm  and xp) use one field for each
  2979. drive (N_X_X) plus one for the controller; the others use only
  2980. one  field,  for  the controller.  When both drives and con-
  2981. trollers are monitored, the drives come first,  starting  at
  2982. _D_K_DKN,  followed  by the controller (or controllers, in the
  2983. case of xp).  Then set NNDDIISSKK in param.c to the desired  num-
  2984. ber.  The number of the first slot to use for each driver is
  2985. defined as _D_K_DKN in the device's header file, or  is  unde-
  2986. fined  if  that driver is not using monitoring.  _I_o_s_t_a_t cur-
  2987. rently expects that if overlapped seeks are  being  metered,
  2988. those  disks  are  first  in  the  array (i.e., DKN for that
  2989. driver is 0).  As an example, for 3 RP06 disks using the  hp
  2990. driver  plus 1 RL02, HP_DKN should be 0, RL_DKN should be 4,
  2991. and NNDDIISSKK should be 5 (3 hp disks + 1 hp controller + 1 rl).
  2992. The complete correspondence for _i_o_s_t_a_t would then be:
  2993.  
  2994.  
  2995.      0 (HP_DKN + 0)     hp0 seeks
  2996.      1 (HP_DKN + 1)     hp1 seeks
  2997.      2 (HP_DKN + 2)     hp2 seeks
  2998.      3 (HP_DKN + NHP)   hp controller transfers
  2999.      4 (RL_DKN + 0)     rl transfers
  3000.  
  3001.  
  3002. IItt  iiss  vveerryy iimmppoorrttaanntt tthhaatt NNDDIISSKK bbee llaarrggee eennoouugghh,, ssiinnccee tthhee
  3003. ddrriivveerrss ddoo nnoott cchheecckk ffoorr oovveerrffllooww..
  3004.  
  3005.      After the kernel disk  monitoring  is  set  up,  _i_o_s_t_a_t
  3006. itself  needs  to be edited to reflect the numbers and types
  3007. of the disks.  The source is in /usr/src/cmd.
  3008.  
  3009. 55..44..33..  AAuuttoommaattiicc rreebboooott
  3010.  
  3011.      The automatic reboot facility (UUCCBB__AAUUTTOOBBOOOOTT) includes a
  3012. number  of components, several of which must know details of
  3013. the boot configuration.  The kernel  has  an  integral  boot
  3014. routine,  found in boot.s in the configuration directory for
  3015. the machine, which reads in a block  0  bootstrap  from  the
  3016. normal  boot  device and executes it.  The block 0 bootstrap
  3017. normally loads bboooott from the first file system on drive 0 of
  3018. the  disk;  this  can  be changed if necessary.  The second-
  3019. stage bootstrap, /boot, needs to know where to find unix.
  3020.  
  3021.      The first step is to determine  which  kernel  boot  to
  3022. use.   Currently,  there  are  boot modules supplied for the
  3023. following disk types: hk, rl, rm, rp, dvhp,  sc11  and  sc21
  3024. (the  last  two  are  for  Emulex SC11 and SC21 controllers,
  3025. using the boot command).  If one of  these  will  work  with
  3026. your boot disk, place that entry in the bboooottddeevv field in the
  3027. device configuration file before running _c_o_n_f_i_g,  or  simply
  3028. copy ../conf/_d_kboot.s to boot.s in the machine configuration
  3029. directory.  If no boot module supplied will work, it is  not
  3030. too  difficult  to create one for your machine.  The easiest
  3031.  
  3032.  
  3033.  
  3034.                         17 March 1998
  3035.  
  3036.  
  3037.  
  3038.  
  3039.  
  3040. Installing/Operating 2.9BSD -47-        Kernel configuration
  3041.  
  3042.  
  3043. way to do this is to copy one of the other boot modules, and
  3044. modify the last section which actually reads the boot block.
  3045. If you have a bootstrap ROM, you can simply jump to the cor-
  3046. rect  entry with any necessary addresses placed in registers
  3047. first.  Or, you can write a small routine  to  read  in  the
  3048. first  disk block.  If you don't have a boot module, bboooottddeevv
  3049. in the configuration file should be specified as  nnoonnee,  and
  3050. noboot.s will be installed.  This is a dummy file that keeps
  3051. the load  rules  from  changing.   The  UUCCBB__AAUUTTOOBBOOOOTT  option
  3052. should not be defined until a boot module is obtained.
  3053.  
  3054.      The  other change that is normally required is to spec-
  3055. ify where /unix will be found.  This is done by changing the
  3056. definition  of RRBB__DDEEFFNNAAMMEE in /usr/include/sys/reboot.h.  The
  3057. definition is a string in the  same  format  as  the  manual
  3058. input to boot, for example "xp(0,0)unix".  After making this
  3059. change,   boot   will   need   to    be    recompiled    (in
  3060. /usr/src/sys/stand/bootstrap)  and  installed.   It  can  be
  3061. installed initially as /newboot, and the original  boot  can
  3062. be used to load it for testing:
  3063.  
  3064.      >>bboooott
  3065.  
  3066.      _n_nBBoooott
  3067.      :: _d_k(0,0)newboot
  3068.  
  3069.      _n_nBBoooott
  3070.      :: _d_k(0,0)unix
  3071.  
  3072.  
  3073.      If you want to have core dumps made after crashes, this
  3074. must be specified in the configuration file as well.   Dumps
  3075. are  normally  taken  on  the  end of the swap device before
  3076. rebooting, and after the system is back up and the file sys-
  3077. tems  are  checked, the dump will be copied into /usr/sys by
  3078. _s_a_v_e_c_o_r_e(8).  Dump routines are available for the hk, hp, rm
  3079. and xp drivers.  To install, change the dduummppddeevv entry to the
  3080. same value as the swap device.  Then set dduummpplloo to  a  value
  3081. that  will  allow as much as possible of memory to be saved.
  3082. The dump routine will start the dump at dumplo and  continue
  3083. to  the  end  of memory or the end of the swap device parti-
  3084. tion, whichever comes first.  Dumplo should be  larger  than
  3085. swplo  so  that any early swaps will not overwrite the dump,
  3086. but if possible, should be low enough that there is room for
  3087. all  of  memory.  The dduummpprroouuttiinnee entry in the configuration
  3088. file is then set to _d_kdump,  where  _d_k  is  the  disk  type.
  3089. Finally,  after running _c_o_n_f_i_g, edit the header file _d_k.h in
  3090. the new configuration directory to define _D_K_DUMP,  so  that
  3091. that  dump  routine will be included when the driver is com-
  3092. piled.
  3093.  
  3094.  
  3095.  
  3096.  
  3097.  
  3098.  
  3099.  
  3100.                         17 March 1998
  3101.  
  3102.  
  3103.  
  3104.  
  3105.  
  3106. Installing/Operating 2.9BSD -48-        Kernel configuration
  3107.  
  3108.  
  3109. 55..44..44..  CCoonnssiiddeerraattiioonnss oonn aa PPDDPP--1111//2233
  3110.  
  3111.      If setting up a kernel on a PDP-11/23, it is  necessary
  3112. to  consider  the  interrupt  structure of the hardware.  If
  3113. there are any single-priority boards on the bus,  they  must
  3114. be  behind  all  multiple-priority devices.  Otherwise, they
  3115. may accept interrupts  meant  for  another,  higher-priority
  3116. device farther from the processor, at a time when the system
  3117. has set the processor priority  to  block  the  single-level
  3118. device.   The  alternative  is to use spl6 uniformly for any
  3119. high processor priority (spl4, spl5,  spl6).   This  may  be
  3120. accomplished  by  changing  the  _spl routines in mch.s, the
  3121. definitions of br4 and br5  in  l.s,  and  by  changing  the
  3122. script :splfix.mtps (in the _c_o_n_f directory).
  3123.  
  3124.      Berkeley  UNIX does not support more than 256K bytes of
  3125. memory on the 11/23.  If you have extra memory and a way  to
  3126. use it (e.g. a disk driver capable of 22-bit addressing) you
  3127. will want to change this.
  3128.  
  3129. 55..55..  CCoommppiilliinngg tthhee kkeerrnneell
  3130.  
  3131.      Once you have made any local changes, you are ready  to
  3132. compile the kernel.  If you have made any changes which will
  3133. affect the dependency rules  in  the  Makefile,  run  ``make
  3134. depend''  (the output of this command is best appreciated on
  3135. a crt).  Then, ``make unix.''  Note: although several short-
  3136. cuts  have been built into the makefile, the nonseparate I/D
  3137. _m_a_k_e occasionally runs out of space  while  recompiling  the
  3138. kernel.  If this happens, just restart it and it will gener-
  3139. ally make it through the second time.  The split I/D version
  3140. of _m_a_k_e in /usr/70 should have no problem.  Also note, it is
  3141. imperative that overlaid kernels be compiled with the 2.9BSD
  3142. versions of _c_c, _a_s (and _a_s_2) and _l_d.  Use of older C prepro-
  3143. cessors or assemblers will result in compile-time errors  or
  3144. (worse)  systems  that  will  almost  run, but crash after a
  3145. short time.
  3146.  
  3147.      After the unix binary is loaded, the  makefile  runs  a
  3148. small  program  called  _c_h_e_c_k_s_y_s which checks for size over-
  3149. flows.  If you are building an overlaid  system,  check  the
  3150. size  of  the  object file (see _s_i_z_e(1)) and overlay layout.
  3151. The overlay structure may be changed by  editing  the  make-
  3152. file.   For a non-separate I/D system, the base segment size
  3153. must be between 8194 and 16382 bytes and each  overlay  must
  3154. be  at  most  8192  bytes.   The  final object file ``unix''
  3155. should be copied to the root, and then booted to try it out.
  3156. It  is  best  to  name  it /newunix so as not to destroy the
  3157. working system until you're sure it does work:
  3158.  
  3159.      ## cp unix /newunix
  3160.      ## sync
  3161.  
  3162. It is also a good idea to keep the old system  around  under
  3163.  
  3164.  
  3165.  
  3166.                         17 March 1998
  3167.  
  3168.  
  3169.  
  3170.  
  3171.  
  3172. Installing/Operating 2.9BSD -49-        Kernel configuration
  3173.  
  3174.  
  3175. some  other name.  In particular, we recommend that you save
  3176. the generic distribution version of the  system  permanently
  3177. as /genericunix for use in emergencies.
  3178.  
  3179.      To boot the new version of the system you should follow
  3180. the bootstrap procedures outlined in section 2.4  above.   A
  3181. systematic  scheme  for numbering and saving old versions of
  3182. the system is best.
  3183.  
  3184.      You can repeat these steps whenever it is necessary  to
  3185. change the system configuration.
  3186.  
  3187. 55..66..  MMaakkiinngg cchhaannggeess ttoo tthhee kkeerrnneell
  3188.  
  3189.      If you wish to make local mods to the kernel you should
  3190. bracket them with
  3191.  
  3192.      #ifdef PICKLE
  3193.      ...
  3194.      #endif
  3195.  
  3196. perhaps saving old code between
  3197.  
  3198.      #ifndef PICKLE
  3199.      ...
  3200.      #endif
  3201.  
  3202. This will allow you to find changed code easily.
  3203.  
  3204.      To add a device not supported by the distribution  sys-
  3205. tem  you will have to place the driver for the device in the
  3206. directory /usr/src/sys/dev,  edit  a  line  into  the  block
  3207. and/or  character  device  table in /usr/src/sys/PICKLE/c.c,
  3208. add the name of the device to the OPTIONAL line of the  file
  3209. Depend,  and to the makefile load rules.  Place the device's
  3210. address and interrupt vector in the files ioconf.c  and  l.s
  3211. respectively  if  it  is  not  going  to  be  configured  by
  3212. _a_u_t_o_c_o_n_f_i_g(8); otherwise, l.s  will  only  need  the  normal
  3213. interface  to  the C interrupt routine.  If you use autocon-
  3214. figuration, you will need an attach routine in  the  driver,
  3215. and a probe routine in the driver or in _a_u_t_o_c_o_n_f_i_g.  Use the
  3216. entries for a similar device as an example.  If  the  device
  3217. driver uses the UNIBUS map or system buffers, it will proba-
  3218. bly need modifications.  Check ``Changes in  the  Kernel  in
  3219. 2.9BSD''  for  more  technical  information regarding driver
  3220. interfacing.  You can then rebuild the system  (be  sure  to
  3221. make  _d_e_p_e_n_d  first).   After rebooting the resulting kernel
  3222. and making appropriate entries in the  /dev  directory,  you
  3223. can  test  out  the  new  device  and  driver.   Section 7.1
  3224. explains shutdown and reboot procedures.
  3225.  
  3226.  
  3227.  
  3228.  
  3229.  
  3230.  
  3231.  
  3232.                         17 March 1998
  3233.  
  3234.  
  3235.  
  3236.  
  3237.  
  3238. Installing/Operating 2.9BSD -50- Recompiling system software
  3239.  
  3240.  
  3241.                66.. RREECCOOMMPPIILLIINNGG SSYYSSTTEEMM SSOOFFTTWWAARREE
  3242.  
  3243.  
  3244.  
  3245.      We now describe how to recompile  system  programs  and
  3246. install  them.  Some programs must be modified for the local
  3247. system at this time, and other local changes may  be  desir-
  3248. able  now  or  later.   Before  any  of these procedures are
  3249. begun,  be  certain  that  the  include  files   <whoami.h>,
  3250. <sys/localopts.h> and <sys/param.h> are correct for the ker-
  3251. nel that has been installed.  This is important for commands
  3252. that wish to know the name of the local machine or that size
  3253. their data areas appropriately for the  type  of  CPU.   The
  3254. general   procedures  are  given  first,  followed  by  more
  3255. detailed information about some of the  major  systems  that
  3256. require some setup.
  3257.  
  3258. 66..11..  RReeccoommppiilliinngg aanndd rreeiinnssttaalllliinngg ssyysstteemm ssooffttwwaarree
  3259.  
  3260.      It  is  easy to regenerate the system, and it is a good
  3261. idea to try rebuilding pieces of the system to build  confi-
  3262. dence in the procedures.  The system consists of three major
  3263. parts: the kernel itself, along with the bootstrap and stan-
  3264. dalone   utilities   (/usr/src/sys),   the   user   programs
  3265. (/usr/src/cmd, /usr/src/ucb, and  subdirectories),  and  the
  3266. libraries   (/usr/src/lib).   The  major  part  of  this  is
  3267. /usr/src/cmd.
  3268.  
  3269.      We have  already  seen  how  to  recompile  the  system
  3270. itself.   The  commands  and  libraries can be recompiled in
  3271. their respective source directories using the  Makefile  (or
  3272. Ovmakefile  if there are both overlaid and non-overlaid ver-
  3273. sions).  However, it is generally easier to use one  of  the
  3274. MAKE  scripts  set  up  for  /usr/src/lib, /usr/src/cmd, and
  3275. /usr/src/ucb.  These are used in a similar fashion, such as
  3276.  
  3277.      ## ./MAKE -40 [ -cp ] [ -f ] file ...
  3278.  
  3279. The first, required flag sets the CPU  class  for  which  to
  3280. compile.  Three classes are used to used to set requirements
  3281. for separate instruction and data and  for  floating  point.
  3282. ``MAKE  -40''  makes  nonseparate I/D versions that load the
  3283. floating point interpreter as  required.   ``MAKE  -34''  is
  3284. similar  but assumes a hardware floating point unit.  ``MAKE
  3285. -70'' is used for separate I/D  machines  and  also  assumes
  3286. floating  point hardware.  ``MAKE -70 -f'' is used for sepa-
  3287. rate I/D machines without floating point hardware.  The  use
  3288. of  these  MAKE  scripts  automates  the  selection  of CPU-
  3289. dependent options and makes  the  optimal  configuration  of
  3290. each program for the target computer.  The optional argument
  3291. -cp causes each program to be installed as it is made.  They
  3292. are installed in the normal directories, unless the environ-
  3293. ment variable DESTDIR is set, in which case the normal  path
  3294. is  prepended  by  DESTDIR.  This can be used to compile and
  3295.  
  3296.  
  3297.  
  3298.                         17 March 1998
  3299.  
  3300.  
  3301.  
  3302.  
  3303.  
  3304. Installing/Operating 2.9BSD -51- Recompiling system software
  3305.  
  3306.  
  3307. create a new set  of  binary  directories,  e.g.  /nbsd/bin,
  3308. /nbsd/lib,  etc.   Running the command ``MAKE -70 -cp *'' in
  3309. /usr/src/lib, /usr/src/cmd and /usr/src/ucb would thus  cre-
  3310. ate  a  whole  new  tree  of system binaries.  The six major
  3311. libraries are the C  library  in  /usr/src/lib/c,  the  jobs
  3312. library,    /usr/src/lib/jobs,    the    FORTRAN   libraries
  3313. /usr/src/lib/libF77,        /usr/src/lib/libI77,         and
  3314. /usr/src/lib/libU77,  and  the  math library /usr/src/lib/m.
  3315. Most libraries are made in two versions, one  each  for  use
  3316. with and without process overlays.  In each case the library
  3317. is remade by changing into /usr/src/lib and doing
  3318.  
  3319.      ## ./MAKE -_c_p_u _l_i_b_n_a_m_e
  3320.  
  3321. or made and installed by
  3322.  
  3323.      ## ./MAKE -_c_p_u -cp _l_i_b_n_a_m_e
  3324.  
  3325. Similar to the system,
  3326.  
  3327.      ## make clean
  3328.  
  3329. cleans up in each subdirectory.
  3330.  
  3331.      To   recompile   individual   commands,    change    to
  3332. /usr/src/cmd  or  /usr/src/ucb,  as appropriate, and use the
  3333. MAKE script in the same way.  Thus to compile adb, do
  3334.  
  3335.      ## ./MAKE -_c_p_u adb
  3336.  
  3337. where cpu is 34, 40, or 70.  To recompile everything, use
  3338.  
  3339.      ## ./MAKE -_c_p_u *
  3340.  
  3341. After installing new binaries, you can  use  the  script  in
  3342. /usr/src  to link files together as necessary and to set all
  3343. the right set-user-id bits.
  3344.  
  3345.      ## cd /usr/src
  3346.      ## ./MAKE aliases
  3347.      ## ./MAKE modes
  3348.  
  3349.  
  3350. 66..22..  MMaakkiinngg llooccaall mmooddiiffiiccaattiioonnss
  3351.  
  3352.      To keep track of changes to system  source  we  migrate
  3353. changed  versions of commands in /usr/src/cmd in through the
  3354. directory  /usr/src/new  and  out   of   /usr/src/cmd   into
  3355. /usr/src/old for a time before removing them.  Locally writ-
  3356. ten  commands  that   aren't   distributed   are   kept   in
  3357. /usr/src/local  and  their  binaries are kept in /usr/local.
  3358. This allows /usr/bin, /usr/ucb, and /bin  to  correspond  to
  3359. the  distribution  tape  (and to the manuals that people can
  3360. buy).  People wishing to use /usr/local  commands  are  made
  3361.  
  3362.  
  3363.  
  3364.                         17 March 1998
  3365.  
  3366.  
  3367.  
  3368.  
  3369.  
  3370. Installing/Operating 2.9BSD -52- Recompiling system software
  3371.  
  3372.  
  3373. aware  that  they  aren't  in  the  base  manual.  As manual
  3374. updates  incorporate  these  commands  they  are  moved   to
  3375. /usr/ucb.
  3376.  
  3377.      A directory /usr/junk to throw garbage into, as well as
  3378. binary directories /usr/old and /usr/new  are  useful.   The
  3379. _m_a_n(1)   command   supports   manual   directories  such  as
  3380. /usr/man/mann for new and /usr/man/manl for  local  to  make
  3381. this or something similar practical.
  3382.  
  3383. 66..33..  SSeettttiinngg uupp tthhee mmaaiill ssyysstteemm
  3384.  
  3385.      The  mail  system  can  be set up in at least two ways.
  3386. One strategy uses the _d_e_l_i_v_e_r_m_a_i_l(8)  program  to  sort  out
  3387. network  addresses  according to the local network topology.
  3388. It is not perfect,  especially  in  the  light  of  changing
  3389. ARPAnet  conventions.  However, if you use the Berkeley net-
  3390. work or are connected directly or indirectly to the ARPAnet,
  3391. it  is probably the method of choice for the time being.  On
  3392. the other hand, if you use only local mail  and  UUCP  mail,
  3393. /bin/mail  (_m_a_i_l(1))  will  suffice as a mail deliverer.  In
  3394. that case, you will  only  need  to  recompile  _m_a_i_l(1)  and
  3395. _M_a_i_l(1).
  3396.  
  3397.      The  entire  mail system consists of the following com-
  3398. mands:
  3399.  
  3400.  
  3401.      /bin/mail               old standard mail program (from V7 or System III)
  3402.      /usr/ucb/Mail           UCB mail program, described in Mail(1)
  3403.      /usr/lib/Mail.rc        aliases and defaults for Mail(1)
  3404.      /etc/delivermail        mail routing program
  3405.      /usr/net/bin/v6mail     local mailman for berknet
  3406.      /usr/spool/mail         mail spooling directory
  3407.      /usr/spool/secretmail   secure mail directory
  3408.      /usr/bin/xsend          secure mail sender
  3409.      /usr/bin/xget           secure mail receiver
  3410.      /usr/lib/aliases        mail forwarding information for delivermail
  3411.      /usr/ucb/newaliases     command to rebuild binary forwarding database
  3412.  
  3413.  
  3414. Mail is normally sent and received using  the  _M_a_i_l(1)  com-
  3415. mand,  which  provides a front-end to edit the messages sent
  3416. and received, and passes the messages to  _d_e_l_i_v_e_r_m_a_i_l(8)  or
  3417. _m_a_i_l(1) for routing and/or delivery.
  3418.  
  3419.      Mail   is   normally   accessible   in   the  directory
  3420. /usr/spool/mail  and is readable by all users.|- To send mail
  3421. -----------
  3422. |- You can make your mail unreadable by  others  by
  3423. changing      the     mode     of     the     file
  3424. /usr/spool/mail/_y_o_u_r_n_a_m_e to 600  and  putting  the
  3425. line  ``set  keep''  in  your  .mailrc  file.  The
  3426. directory /usr/spool/mail  must  not  be  writable
  3427.  
  3428.  
  3429.  
  3430.                         17 March 1998
  3431.  
  3432.  
  3433.  
  3434.  
  3435.  
  3436. Installing/Operating 2.9BSD -53- Recompiling system software
  3437.  
  3438.  
  3439. which is secure against any possible perusal  (except  by  a
  3440. code-breaker) you should use the secret mail facility, which
  3441. encrypts the mail so that no one can read it.
  3442.  
  3443. 66..33..11..  SSeettttiinngg uupp mmaaiill aanndd MMaaiill
  3444.  
  3445.      Both /bin/mail and /usr/ucb/Mail should  be  recompiled
  3446. to  make  local  versions.  Remake mail in /usr/src/cmd with
  3447. the command
  3448.  
  3449.      ## ./MAKE -_c_p_u mail
  3450.  
  3451. Install the new binary in /bin after  testing;  it  must  be
  3452. setuserid  root.   Section 6.1 gives more details on the use
  3453. of the MAKE scripts.  To configure _M_a_i_l, change  directories
  3454. to  /usr/src/ucb/Mail.  Edit the file v7.local.h to assign a
  3455. letter to your machine with the definition of LOCAL; if  you
  3456. do not have a local area network, the choice is arbitrary as
  3457. long as you pick an unused  letter.   If  you  wish  to  use
  3458. _d_e_l_i_v_e_r_m_a_i_l,  the  definition  of  SENDMAIL should be uncom-
  3459. mented.  Then add your machine to  the  table  in  config.c;
  3460. configdefs.h  gives  some  information on this.  The network
  3461. field should specify which networks (if any)  you  are  con-
  3462. nected  to  (note:  the Schmidt net, SN, is Berknet).  After
  3463. the changes are made, move to /usr/src/ucb and
  3464.  
  3465.      ## ./MAKE -40 Mail   (on a nonseparate I/D machine)
  3466.        or
  3467.      ## ./MAKE -70 Mail   (on a separate I/D machine)
  3468.  
  3469. Install _M_a_i_l in /usr/ucb; it should nnoott be  setuserid.   The
  3470. Mail.rc  file in /usr/lib can be used to set up limited dis-
  3471. tribution lists or aliases if you are not using _d_e_l_i_v_e_r_m_a_i_l.
  3472.  
  3473. 66..33..22..  SSeettttiinngg uupp ddeelliivveerrmmaaiill
  3474.  
  3475.      To  set up the _d_e_l_i_v_e_r_m_a_i_l facility you should read the
  3476. instructions  in  the  file   READ_ME   in   the   directory
  3477. /usr/src/ucb/delivermail  and  then adjust and recompile the
  3478. _d_e_l_i_v_e_r_m_a_i_l program, installing it as /etc/delivermail.  The
  3479. routing  algorithm  uses  knowledge  of  network name syntax
  3480. built into its tables and aliasing and  forwarding  informa-
  3481. tion  built  into  the file /usr/lib/aliases to process each
  3482. piece of mail.  Local mail is delivered by giving it to  the
  3483. program  /usr/net/bin/v6mail  which adds it to the mailboxes
  3484. in the directory /usr/spool/mail/_u_s_e_r_n_a_m_e, using  a  locking
  3485. protocol  to  avoid problems with simultaneous updates.  You
  3486. should also  set  up  the  file  /usr/lib/aliases  for  your
  3487. installation, creating mail groups as appropriate.
  3488.  
  3489.  
  3490.  
  3491. -----------
  3492. (mode 755) for this to work.
  3493.  
  3494.  
  3495.  
  3496.                         17 March 1998
  3497.  
  3498.  
  3499.  
  3500.  
  3501.  
  3502. Installing/Operating 2.9BSD -54- Recompiling system software
  3503.  
  3504.  
  3505. 66..44..  SSeettttiinngg uupp aa uuuuccpp ccoonnnneeccttiioonn
  3506.  
  3507.      To  connect  two UNIX machines with a _u_u_c_p network link
  3508. using modems, one site must have a automatic call  unit  and
  3509. the  other  must  have  a dialup port.  It is better if both
  3510. sites have both.
  3511.  
  3512.      You should first read the paper in  volume  2B  of  the
  3513. UNIX  Programmers  Manual:  ``Uucp  Implementation  Descrip-
  3514. tion.''  It describes in detail the file formats and conven-
  3515. tions, and will give you a little context.  For any configu-
  3516. ration, you must recompile all system dependent programs.
  3517.  
  3518.      Change  directory  to  /usr/src/cmd/uucp  and   examine
  3519. uucp.h,  making  any necessary changes.  Recompile uucp with
  3520. ``make'' and su to ``make install.''
  3521.  
  3522.      You should ensure that the directories  /usr/spool/uucp
  3523. and /usr/spool/uucppublic exist.  The former should be owned
  3524. by uucp, mode 755 (or 777 is OK) and the  latter  should  be
  3525. mode 777 (and the home directory for login uucp).
  3526.  
  3527.      Periodically  you  should clean out /usr/spool/uucp and
  3528. /usr/spool/uucppublic, as they can  accumulate  junk,  espe-
  3529. cially  if  you  don't  have a dialer.  Run ``uulog'' once a
  3530. day, and ``/usr/lib/uucp/uuclean'' periodically with  appro-
  3531. priate options to get rid of old stuff.|- You can  also  just
  3532. remove  some  of the files in /usr/spool/uucp, but if you do
  3533. this blindly you will cause some error messages to be gener-
  3534. ated when uucp tries to access a file another file claims is
  3535. there.  (For instance, each mail transaction  creates  three
  3536. files.)   The /usr/spool/uucppublic directory is a place for
  3537. people at other sites to send to when sending files to users
  3538. on  your  machine.   You should clean it out by hand when it
  3539. gets excessive.
  3540.  
  3541.      If both sites have both a dialer  and  dialup:   follow
  3542. the directions in the volume 2B paper - this is the intended
  3543. mode of operation and the directions fit well.  You have  to
  3544. configure the following files in /usr/lib/uucp:
  3545.  
  3546.  
  3547.      L.sys       setup all fields - this lists the other sites
  3548.      L-devices   your dialer
  3549.      USERFILE    permissions - this can be left alone
  3550.  
  3551.  
  3552. You must also establish a login ``uucp'' in /etc/passwd with
  3553. shell /usr/lib/uucp/uucico.  Each site must know  the  other
  3554. site's phone number, login, and password.
  3555.  
  3556. -----------
  3557. |- The _c_r_o_n(8) program can arrange to execute these
  3558. commands periodically.
  3559.  
  3560.  
  3561.  
  3562.                         17 March 1998
  3563.  
  3564.  
  3565.  
  3566.  
  3567.  
  3568. Installing/Operating 2.9BSD -55- Recompiling system software
  3569.  
  3570.  
  3571.      If  you  have  only a dialup: you can be a second-class
  3572. citizen on the uucp net.  You must find  another  site  that
  3573. has a dialer, and have them poll you regularly.  (Once a day
  3574. is about the minimum that is  reasonable.)   When  you  send
  3575. mail  to  another  site, you must wait for them to call you.
  3576. You    must    set     up     /usr/lib/uucp/USERFILE     and
  3577. /usr/lib/uucp/L.sys.   Only  the first 4 fields of L.sys are
  3578. necessary, and in practice only the first field (site  name)
  3579. is looked at.  A typical L.sys for a passive node might be:
  3580.  
  3581.  
  3582.      ucbvax     Any _A_C_U 300
  3583.      research   Any _A_C_U 300
  3584.  
  3585.  
  3586. where  the first field on each line is a site that will poll
  3587. you and _A_C_U is either ``ACU'' or ``DIR.''  You need to put a
  3588. password  on the uucp login and let the other site know your
  3589. phone number, uucp login name (which is usually  uucp),  and
  3590. password.  It doesn't matter whether they call you at 300 or
  3591. 1200 baud.
  3592.  
  3593.      If you have a dialer and want  to  poll  another  site:
  3594. normally, uucp will call the other site when it has anything
  3595. to send it, and while it's at it will check to see  if  any-
  3596. thing should come back.  The command
  3597.  
  3598.      /usr/lib/uucp/uucico -r1 -sucbvax
  3599.  
  3600. will  force  _u_u_c_p  to  poll ucbvax, even if there is nothing
  3601. waiting.   This  command  can   be   conveniently   put   in
  3602. /usr/lib/crontab to run early each morning.  If you are hav-
  3603. ing trouble with the connection, invoke uucico by hand:
  3604.  
  3605.      /usr/lib/uucp/uucico -r1 -sucbvax -x7
  3606.  
  3607. where the --xx option turns on debugging output.   The  higher
  3608. the  number,  the more debugging output you get; 1, 4, and 7
  3609. are reasonable choices.
  3610.  
  3611. 66..55..  MMiisscceellllaanneeoouuss ssooffttwwaarree
  3612.  
  3613.      The directory /usr/contrib contains programs and  pack-
  3614. ages  that  you  may  wish to install on your system.  Also,
  3615. some programs or libraries in the _u_c_b directory  are  suffi-
  3616. ciently unique to be noteworthy.  Here is a brief summary.
  3617.  
  3618. 66..55..11..  AAppee
  3619.  
  3620.      _A_p_e (_Arbitrary _Precision _Extended) is a replacement for
  3621. the multiple precision arithmetic routines (_m_p(3)).   It  is
  3622. much faster and contains numerous bug fixes.
  3623.  
  3624.  
  3625.  
  3626.  
  3627.  
  3628.                         17 March 1998
  3629.  
  3630.  
  3631.  
  3632.  
  3633.  
  3634. Installing/Operating 2.9BSD -56- Recompiling system software
  3635.  
  3636.  
  3637. 66..55..22..  LL1111,, MM1111
  3638.  
  3639.      _M_1_1  is  a  Macro-11 assembler.  It recognizes and emu-
  3640. lates almost all of the directives of standard DEC  Macro-11
  3641. assemblers.  _L_1_1 is its loader.
  3642.  
  3643. 66..55..33..  JJoovvee
  3644.  
  3645.      _J_o_v_e  (_Jonathan's  _Own  _Version  of  _EMACS) is an EMACS
  3646. style editor developed  at  Lincoln  Sudbury  Regional  High
  3647. School.
  3648.  
  3649. 66..55..44..  NNeewwss
  3650.  
  3651.      The  network  bulletin  board  system developed at Duke
  3652. University and the University of North  Carolina  and  since
  3653. heavily modified at Berkeley.
  3654.  
  3655. 66..55..55..  NNootteess
  3656.  
  3657.      The network bulletin board system developed at the Uni-
  3658. versity of Illinois.  This version  contains  many  enhance-
  3659. ments and clean _n_e_w_s interfaces.
  3660.  
  3661. 66..55..66..  RRaannmm
  3662.  
  3663.      _R_a_n_m  is  a  fast uniform pseudorandom number generator
  3664. package developed at Berkeley.
  3665.  
  3666.  
  3667.  
  3668.  
  3669.  
  3670.  
  3671.  
  3672.  
  3673.  
  3674.  
  3675.  
  3676.  
  3677.  
  3678.  
  3679.  
  3680.  
  3681.  
  3682.  
  3683.  
  3684.  
  3685.  
  3686.  
  3687.  
  3688.  
  3689.  
  3690.  
  3691.  
  3692.  
  3693.  
  3694.                         17 March 1998
  3695.  
  3696.  
  3697.  
  3698.  
  3699.  
  3700. Installing/Operating 2.9BSD -57-            System Operation
  3701.  
  3702.  
  3703.                     77.. SSYYSSTTEEMM OOPPEERRAATTIIOONN
  3704.  
  3705.  
  3706.  
  3707.      This section describes procedures  used  to  operate  a
  3708. PDP-11  UNIX  system.   Procedures  described  here are used
  3709. periodically, to reboot the system, analyze  error  messages
  3710. from  devices,  do disk backups, monitor system performance,
  3711. recompile system software and control local changes.
  3712.  
  3713. 77..11..  BBoooottssttrraapp aanndd sshhuuttddoowwnn pprroocceedduurreess
  3714.  
  3715.      The system boot procedure varies with the hardware con-
  3716. figuration, but generally uses the console emulator or a ROM
  3717. routine to boot one  of  the  disks.   /boot  comes  up  and
  3718. prompts  (with  ``:  '') for the name of the system to load.
  3719. Simply hitting a carriage return will load the default  sys-
  3720. tem.   The  system  will come up with a single-user shell on
  3721. the console.  To bring the system up to a multi-user config-
  3722. uration  from  the single-user status, all you have to do is
  3723. hit ^D on the console (you should check and,  if  necessary,
  3724. set the date before going multiuser; see _d_a_t_e(1)).  The sys-
  3725. tem will then execute /etc/rc, a multi-user restart  script,
  3726. and  come  up  on the terminals listed as active in the file
  3727. /etc/ttys.  See _i_n_i_t(8) and _t_t_y_s(5).   Note,  however,  that
  3728. this  does  not  cause  a file system check to be performed.
  3729. Unless the system was taken down  cleanly,  you  should  run
  3730. ``fsck  -p''  or  force  a reboot with _r_e_b_o_o_t(8) to have the
  3731. disks checked.
  3732.  
  3733.      In an automatic reboot, the system checks the disks and
  3734. comes up multi-user without intervention at the console.  If
  3735. the file system check fails, or  is  interrupted  (after  it
  3736. prints  the  date)  from the console when a delete/rubout is
  3737. hit, it will  leave  the  system  in  special-session  mode,
  3738. allowing root to log in on one of a limited number of termi-
  3739. nals (generally including a dialup) to repair file  systems,
  3740. etc.   The system is then brought to normal multiuser opera-
  3741. tions by signaling init with a SIGINT  signal  (with  ``kill
  3742. -INT 1'').
  3743.  
  3744.      To  take the system down to a single user state you can
  3745. use
  3746.  
  3747.      ## kill 1
  3748.  
  3749. or use the _s_h_u_t_d_o_w_n(8) command (which is much more polite if
  3750. there are other users logged in) when you are up multi-user.
  3751. Either command will kill all processes and give you a  shell
  3752. on the console, almost as if you had just booted.  File sys-
  3753. tems remain mounted after the system is  taken  single-user.
  3754. If  you wish to come up multi-user again, you should do this
  3755. by:
  3756.  
  3757.  
  3758.  
  3759.  
  3760.                         17 March 1998
  3761.  
  3762.  
  3763.  
  3764.  
  3765.  
  3766. Installing/Operating 2.9BSD -58-            System Operation
  3767.  
  3768.  
  3769.      ## cd /
  3770.      ## /etc/umount -a
  3771.      ## ^D
  3772.  
  3773. The system can also be halted or rebooted with _r_e_b_o_o_t(8)  if
  3774. automatic  reboots  are  enabled.   Otherwise, the system is
  3775. halted by switching to single-user mode  to  kill  all  pro-
  3776. cesses, updating the disks with a ``sync'' command, and then
  3777. halting.
  3778.  
  3779.      Each system shutdown, crash, processor halt and  reboot
  3780. is recorded in the file /usr/adm/shutdownlog with the cause.
  3781.  
  3782. 77..22..  DDeevviiccee eerrrroorrss aanndd ddiiaaggnnoossttiiccss
  3783.  
  3784.      When errors occur on peripherals or in the system,  the
  3785. system  prints  a  warning diagnostic on the console.  These
  3786. messages are collected regularly and written into  a  system
  3787. error log file /usr/adm/messages by _d_m_e_s_g(8).
  3788.  
  3789.      Error messages printed by the devices in the system are
  3790. described with the drivers for the devices in section  4  of
  3791. the  Berkeley  PDP-11  UNIX  Programmer's manual.  If errors
  3792. occur indicating hardware problems, you should contact  your
  3793. hardware  support group or field service.  It is a good idea
  3794. to examine the error log file regularly (e.g. with ``tail -r
  3795. /usr/adm/messages'').
  3796.  
  3797.      If  you have DEC field service, they should know how to
  3798. interpret these messages.  If they do not, tell them to con-
  3799. tact the DEC UNIX Engineering Group.
  3800.  
  3801. 77..33..  FFiillee ssyysstteemm cchheecckkss,, bbaacckkuuppss aanndd ddiissaasstteerr rreeccoovveerryy
  3802.  
  3803.      Periodically  (say  every  week or so in the absence of
  3804. any problems) and always  (usually  automatically)  after  a
  3805. crash,  all  the  file systems should be checked for consis-
  3806. tency by _f_s_c_k(8).  The procedures of  _b_o_o_t(8)  or  _r_e_b_o_o_t(8)
  3807. should  be  used  to  get the system to a state where a file
  3808. system check can be performed manually or automatically.
  3809.  
  3810.      Dumping of the file systems should be  done  regularly,
  3811. since  once the system is going it is easy to become compla-
  3812. cent.  Complete and incremental dumps are easily  done  with
  3813. _d_u_m_p(8).   You  should  arrange to do a towers-of-Hanoi dump
  3814. sequence; we tune ours so that almost all files  are  dumped
  3815. on  two  tapes  and kept for at least a week in almost every
  3816. case.  We take full dumps every month (and keep these indef-
  3817. initely).
  3818.  
  3819.      Dumping of files by name is best done by _t_a_r(1) but the
  3820. amount of data that can be moved in this way is limited to a
  3821. single  tape.   Finally,  if there are enough drives, entire
  3822. disks can be copied with _d_d(1) using the raw  special  files
  3823.  
  3824.  
  3825.  
  3826.                         17 March 1998
  3827.  
  3828.  
  3829.  
  3830.  
  3831.  
  3832. Installing/Operating 2.9BSD -59-            System Operation
  3833.  
  3834.  
  3835. and an appropriate block size.
  3836.  
  3837.      It is desirable that full dumps of the root file system
  3838. are made regularly.  This is especially true when  only  one
  3839. disk is available.  Then, if the root file system is damaged
  3840. by a hardware or software failure, you can rebuild  a  work-
  3841. able  disk  using  a standalone restore in the same way that
  3842. _r_e_s_t_o_r was used to build the initial root file system.
  3843.  
  3844.      Exhaustion of user-file space is certain to  occur  now
  3845. and  then;  the  only  mechanisms  for controlling this phe-
  3846. nomenon are occasional use of _d_f(1), _d_u(1), _q_u_o_t(8), threat-
  3847. ening  messages  of the day, personal letters, and (probably
  3848. as a last resort) quotas (see _s_e_t_q_u_o_t_a(8)).
  3849.  
  3850. 77..44..  MMoovviinngg ffiillee ssyysstteemm ddaattaa
  3851.  
  3852.      If you have the equipment, the best way to move a  file
  3853. system  is  to  dump  it  to  magtape  using _d_u_m_p(8), to use
  3854. _m_k_f_s(8) to create the new file system,  and  restore,  using
  3855. _r_e_s_t_o_r(8),  the  tape.  If for some reason you don't want to
  3856. use magtape, dump accepts an argument telling where  to  put
  3857. the dump; you might use another disk.  Sometimes a file sys-
  3858. tem has to be increased in  logical  size  without  copying.
  3859. The  super-block of the device has a word giving the highest
  3860. address that can be allocated.  For  small  increases,  this
  3861. word  can  be patched using the debugger _a_d_b(1) and the free
  3862. list reconstructed using _f_s_c_k(8).  The size  should  not  be
  3863. increased  greatly  by this technique, since the file system
  3864. will then be short of inode slots.  Read and understand  the
  3865. description given in _f_i_l_s_y_s(5) before playing around in this
  3866. way.
  3867.  
  3868.      If you have to merge a file system into another, exist-
  3869. ing  one, the best bet is to use _t_a_r(1).  If you must shrink
  3870. a file system, the best bet is  to  dump  the  original  and
  3871. restor  it onto the new file system.  However, this will not
  3872. work if the i-list on the smaller  file  system  is  smaller
  3873. than  the maximum allocated inode on the larger.  If this is
  3874. the case,  reconstruct  the  file  system  from  scratch  on
  3875. another file system (perhaps using _t_a_r(1)) and then dump it.
  3876. If you are playing with the root file system and  only  have
  3877. one drive the procedure is more complicated.  What you do is
  3878. the following:
  3879.  
  3880. 1.   GET A SECOND PACK!!!!
  3881.  
  3882. 2.   Dump the root file system to tape using _d_u_m_p(8).
  3883.  
  3884. 3.   Bring the system down and mount the new pack.
  3885.  
  3886. 4.   Load the standalone versions of _m_k_f_s(8)  and  _r_e_s_t_o_r(8)
  3887.      as in sections 2.1-2.3 above.
  3888.  
  3889.  
  3890.  
  3891.  
  3892.                         17 March 1998
  3893.  
  3894.  
  3895.  
  3896.  
  3897.  
  3898. Installing/Operating 2.9BSD -60-            System Operation
  3899.  
  3900.  
  3901. 5.   Boot normally using the newly created disk file system.
  3902.  
  3903.      Note that if you add new disk drivers they should  also
  3904. be added to the standalone system in /usr/src/sys/stand.
  3905.  
  3906. 77..55..  MMoonniittoorriinngg SSyysstteemm PPeerrffoorrmmaannccee
  3907.  
  3908.      The  _i_o_s_t_a_t(8) and _v_m_s_t_a_t(8) programs provided with the
  3909. system are designed to aid in monitoring  systemwide  activ-
  3910. ity.   By  running  them  when  the system is active you can
  3911. judge the system activity in several dimensions: job distri-
  3912. bution, virtual memory load, swapping activity, disk and CPU
  3913. utilization.  Ideally, there  should  be  few  blocked  (DW)
  3914. jobs, there should be little swapping activity, there should
  3915. be available bandwidth on the disk devices (most single arms
  3916. peak  out  at  30-35 tps in practice), and the user CPU uti-
  3917. lization (US) should be high (above 60%).
  3918.  
  3919.      If the system is busy, then the count  of  active  jobs
  3920. may be large, and several of these jobs may often be blocked
  3921. (DW).
  3922.  
  3923.      If you run _v_m_s_t_a_t when the system is busy  (a  ``vmstat
  3924. 5''  gives  all the numbers computed by the system), you can
  3925. find imbalances by noting abnormal  job  distributions.   If
  3926. many  processes are blocked (DW), then the disk subsystem is
  3927. overloaded or  imbalanced.   If  you  have  several  non-DMA
  3928. devices or open teletype lines that are ``ringing'', or user
  3929. programs   that   are    doing    high-speed    non-buffered
  3930. input/output,  then  the  system time may go high (60-70% or
  3931. higher).  It is often possible to pin down the cause of high
  3932. system  time by looking to see if there is excessive context
  3933. switching (CS),  interrupt  activity  (IN)  or  system  call
  3934. activity (SY).
  3935.  
  3936.      If  the system is heavily loaded, or if you have little
  3937. memory for your load (248K is little in  almost  any  case),
  3938. then  the  system will be forced to swap.  This is likely to
  3939. be accompanied by a noticeable reduction in  system  perfor-
  3940. mance and pregnant pauses when interactive jobs such as edi-
  3941. tors swap out.  If you expect to be in a  memory-poor  envi-
  3942. ronment  for  an extended period you might consider adminis-
  3943. tratively limiting system load.
  3944.  
  3945. 77..66..  AAddddiinngg uusseerrss
  3946.  
  3947.      New users can be added to the system by adding  a  line
  3948. to  the  password file /etc/passwd.  You should add accounts
  3949. for the initial user community, giving each a directory  and
  3950. a  password,  and putting users who will wish to share soft-
  3951. ware in the same group.  User id's should be assigned start-
  3952. ing  with  16 or higher, as lower id's are treated specially
  3953. by the system.  Default startup files should  probably  pro-
  3954. vided  for  new  users  and  can be copied from /usr/public.
  3955.  
  3956.  
  3957.  
  3958.                         17 March 1998
  3959.  
  3960.  
  3961.  
  3962.  
  3963.  
  3964. Installing/Operating 2.9BSD -61-            System Operation
  3965.  
  3966.  
  3967. Initial passwords should be set also.
  3968.  
  3969.      A number of guest accounts have been  provided  on  the
  3970. distribution system; these accounts are for people at Berke-
  3971. ley and at Bell Laboratories who have  done  major  work  on
  3972. UNIX  in  the past.  You can delete these accounts, or leave
  3973. them on the system if you expect  that  these  people  would
  3974. have occasion to login as guests on your system.
  3975.  
  3976. 77..77..  AAccccoouunnttiinngg
  3977.  
  3978.      UNIX currently optionally records two kinds of account-
  3979. ing  information:  connect  time  accounting   and   process
  3980. resource  accounting.   The connect time accounting informa-
  3981. tion is normally stored in the file /usr/adm/wtmp, which  is
  3982. summarized  by the program _a_c(8).  The process time account-
  3983. ing information is stored in  the  file  /usr/adm/acct,  and
  3984. analyzed and summarized by the program _s_a(8).
  3985.  
  3986.      If  you  need to implement recharge for computing time,
  3987. you can implement procedures based on the  information  pro-
  3988. vided  by these commands.  A convenient way to do this is to
  3989. give commands to the clock daemon /etc/cron to  be  executed
  3990. every day at a specified time.  This is done by adding lines
  3991. to /usr/adm/crontab; see _c_r_o_n(8) for details.
  3992.  
  3993. 77..88..  RReessoouurrccee ccoonnttrrooll
  3994.  
  3995.      Resource control in the  current  version  of  UNIX  is
  3996. rather  primitive.   Disk  space  usage  can be monitored by
  3997. _d_u(1) or _q_u_o_t(8) as was previously mentioned.   Disk  quotas
  3998. can  be  set  and changed with _s_e_t_q_u_o_t_a(8) if the kernel has
  3999. been configured for quotas.  Our quota mechanism is simplis-
  4000. tic  and  easily  defeated but does make users more aware of
  4001. the amount of space they use.
  4002.  
  4003. 77..99..  FFiilleess wwhhiicchh nneeeedd ppeerriiooddiicc aatttteennttiioonn
  4004.  
  4005.      We conclude the  discussion  of  system  operations  by
  4006. listing  the files and directories that continue to grow and
  4007. thus require periodic truncation, along with  references  to
  4008. relevant  manual  pages.  _C_r_o_n(8) can be used to run scripts
  4009. to truncate these periodically, possibly  summarizing  first
  4010. or  saving recent entries.  Some of these can be disabled if
  4011. you don't need to collect the information.
  4012.  
  4013. //uussrr//aaddmm//aacccctt             sa(8)          raw process account data
  4014. //uussrr//aaddmm//mmeessssaaggeess         dmesg(8)       system error log
  4015. //uussrr//aaddmm//sshhuuttddoowwnnlloogg      shutdown(8)    log of system reboots
  4016. //uussrr//aaddmm//wwttmmpp             ac(8)          login session accounting
  4017. //uussrr//ssppooooll//uuuuccpp//LLOOGGFFIILLEE   uulog(1)       uucp log file
  4018. //uussrr//ssppooooll//uuuuccpp//SSYYSSLLOOGG    uulog(1)       more uucp logging
  4019. //uussrr//ddiicctt//ssppeellllhhiisstt       spell(1)       spell log
  4020.  
  4021.  
  4022.  
  4023.  
  4024.                         17 March 1998
  4025.  
  4026.  
  4027.  
  4028.  
  4029.  
  4030. Installing/Operating 2.9BSD -62-            System Operation
  4031.  
  4032.  
  4033. //uussrr//lliibb//lleeaarrnn//lloogg        learn(1)       learn lesson logging
  4034. //uussrr//ssyyss                  savecore(8)    system core images
  4035.  
  4036.  
  4037.  
  4038.  
  4039.  
  4040.  
  4041.  
  4042.  
  4043.  
  4044.  
  4045.  
  4046.  
  4047.  
  4048.  
  4049.  
  4050.  
  4051.  
  4052.  
  4053.  
  4054.  
  4055.  
  4056.  
  4057.  
  4058.  
  4059.  
  4060.  
  4061.  
  4062.  
  4063.  
  4064.  
  4065.  
  4066.  
  4067.  
  4068.  
  4069.  
  4070.  
  4071.  
  4072.  
  4073.  
  4074.  
  4075.  
  4076.  
  4077.  
  4078.  
  4079.  
  4080.  
  4081.  
  4082.  
  4083.  
  4084.  
  4085.  
  4086.  
  4087.  
  4088.  
  4089.  
  4090.                         17 March 1998
  4091.  
  4092.  
  4093.  
  4094.  
  4095.  
  4096. Installing/Operating 2.9BSD -63-               Magic numbers
  4097.  
  4098.  
  4099.                   88.. KKEERRNNEELL MMAAGGIICC NNUUMMBBEERRSS
  4100.  
  4101.  
  4102.  
  4103.      This sections contains a collection  of  magic  numbers
  4104. for use in patching core or an executable unix binary.  Some
  4105. of them have also been  mentioned  earlier  in  this  paper.
  4106. With  the  exception of the _x_p___t_y_p_e_[_i_] variables (which hold
  4107. bytes) and _s_w_p_l_o (which is a long) all locations given  con-
  4108. tain short integers.  N.B.:  in the case of paired interrupt
  4109. vectors (for DHs and DZs) the address of the  second  vector
  4110. of  the pair is four more than the address of the first vec-
  4111. tor.
  4112.  
  4113.  
  4114.  
  4115.  
  4116.  
  4117.  
  4118.  
  4119.  
  4120.                       Interrupt Vectors
  4121. Vector   Handler   Contents   Block device   Character device
  4122. 0160     rlio       01202          8                18
  4123. 0210     hkio       01142          4                19
  4124. 0220     rkio       01172          0                 9
  4125. 0224     tmio       01222          3                12
  4126. 0224     htio       01152          7                15
  4127. 0224     tsio       01232          9                20
  4128. 0254     xpio       01242          6                14
  4129. 0260     rpio       01212          1                11
  4130. |-        dzin       01132          -                21
  4131. |-        dzdma      02202          -                21
  4132. |-        dhin       01112          -                 4
  4133. |-        dhou       01122          -                 4
  4134. |-        lpio       01162          -                 2
  4135.  
  4136.  
  4137.  
  4138.  
  4139.  
  4140.  
  4141.  
  4142.  
  4143.  
  4144.  
  4145.  
  4146.  
  4147.  
  4148.  
  4149.  
  4150.  
  4151. -----------
  4152. |- Set by _a_u_t_o_c_o_n_f_i_g(8).
  4153.  
  4154.  
  4155.  
  4156.                         17 March 1998
  4157.  
  4158.  
  4159.  
  4160.  
  4161.  
  4162. Installing/Operating 2.9BSD -64-               Magic numbers
  4163.  
  4164.  
  4165.         Other Variables
  4166.    Name      Address   Contents
  4167. xp_addr       061464   0176700
  4168. xp_type[0]    061472      |=
  4169. xp_type[1]    061506      |=
  4170. xp_type[2]    061522      |=
  4171. xp_type[3]    061536      |=
  4172. HKADDR        061006   0177440
  4173. HTADDR       0114236      |-
  4174. RKADDR        061152   0177400
  4175. RLADDR        061154   0174400
  4176. RPADDR        061236   0176710
  4177. TMADDR       0113330      |-
  4178. TSADDR       0113622      |-
  4179. dz_addr      0113324      |-
  4180. dh_addr      0114146      |-
  4181. lp_addr      0113462      |-
  4182. rootdev       060772      *
  4183. pipedev       060776      *
  4184. swapdev       060774      *
  4185. swplo         061000      *
  4186. nswap         061004      *
  4187.  
  4188.  
  4189.  
  4190.  
  4191.  
  4192.  
  4193.  
  4194.  
  4195.  
  4196.  
  4197.  
  4198.  
  4199.  
  4200.  
  4201.  
  4202.  
  4203.  
  4204.  
  4205.  
  4206.  
  4207.  
  4208.  
  4209.  
  4210.  
  4211.  
  4212.  
  4213.  
  4214. -----------
  4215. |- Set by _a_u_t_o_c_o_n_f_i_g(8).
  4216. |= Set by reading the corresponding drive type reg-
  4217. ister.
  4218. * System dependent.
  4219.  
  4220.  
  4221.  
  4222.                         17 March 1998
  4223.  
  4224.  
  4225.