home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / unixen.tar / unixen / Documentation / PUPS / Setup / v7_setup.txt < prev   
Encoding:
Text File  |  2000-05-25  |  26.6 KB  |  793 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.              SSeettttiinngg UUpp UUnniixx -- SSeevveenntthh EEddiittiioonn
  11.  
  12.                       _C_h_a_r_l_e_s _B_. _H_a_l_e_y
  13.                      _D_e_n_n_i_s _M_. _R_i_t_c_h_i_e
  14.  
  15.  
  16.      The  distribution  tape  can  be  used  only  on  a DEC
  17. PDP11/45 or PDP11/70 with RP03, RP04, RP05, RP06  disks  and
  18. with  a TU10, TU16, or TE16 tape drive.  It consists of some
  19. preliminary bootstrapping programs followed by two file sys-
  20. tem images; if needed, after the initial construction of the
  21. file  systems  individual  files  can  be  extracted.   (See
  22. restor(1))
  23.  
  24.      If  you  are  set  up to do it, it might be a good idea
  25. immediately to make a copy of the tape to guard against dis-
  26. aster.   The  tape  is  9-track  800  BPI  and contains some
  27. 512-byte records followed by many 10240-byte records.  There
  28. are interspersed tapemarks.
  29.  
  30.      The system as distributed contains binary images of the
  31. system and all the user level programs,  along  with  source
  32. and  manual  sections for them--about 2100 files altogether.
  33. The binary images, along with other things needed  to  flesh
  34. out  the  file system enough so UNIX will run, are to be put
  35. on one file system called the `root file system'.  The  file
  36. system  size required is about 5000 blocks.  The file second
  37. system has all of the source and documentation.   Altogether
  38. it amounts to more than 18,000 512-byte blocks.
  39.  
  40. MMaakkiinngg aa DDiisskk FFrroomm TTaappee
  41.  
  42.      Perform  the  following bootstrap procedure to obtain a
  43. disk with a root file system on it.
  44.  
  45. 1.   Mount the magtape on drive 0 at load point.
  46.  
  47. 2.   Mount a formatted disk pack on drive 0.
  48.  
  49. 3.   Key in and execute at 100000
  50.  
  51.        TU10                TU16/TE16
  52.      012700              Use the DEC ROM or other
  53.      172526              means to load block 1
  54.      010040              (i.e. second block) at 800 BPI
  55.      012740              into location 0 and transfer
  56.      060003              to 0.
  57.      000777
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.                              -2-
  71.  
  72.  
  73.      The tape should move and the CPU loop.  (The TU10  code
  74.      is _n_o_t the DEC bulk ROM for tape; it reads block 0, not
  75.      block 1.)
  76.  
  77. 4.   If you used the above TU10 code, halt and  restart  the
  78.      CPU at 0, otherwise continue to the next step.
  79.  
  80. 5.   The console should type
  81.  
  82.           _B_o_o_t
  83.           _:
  84.  
  85.      Copy  the  magtape  to disk by the following procedure.
  86.      The machine's printouts are shown in  italic,  explana-
  87.      tory  comments are within ( ).  Terminate each line you
  88.      type by carriage return or line-feed.   There  are  two
  89.      classes  of  tape drives: the name `tm' is used for the
  90.      TU10, and `ht' is used for the TU16 or TE16.  There are
  91.      also  two  classes of disks: `rp' is used for the RP03,
  92.      and `hp' is used for the RP04/5/6.
  93.  
  94.      If you should make a mistake while typing, the  charac-
  95. ter  '#' erases the last character typed up to the beginning
  96. of the line, and the character '@' erases  the  entire  line
  97. typed.   Some  consoles  cannot  print  lower  case letters,
  98. adjust the instructions accordingly.
  99.  
  100.      (bring in the program mkfs)
  101.      _:tm(0,3)       (use `ht(0,3)' for the TU16/TE16)
  102.      _f_i_l_e _s_y_s_t_e_m _s_i_z_e_: 5000
  103.      _f_i_l_e _s_y_s_t_e_m_: rp(0,0)          (use `hp(0,0)' for RP04/5/6)
  104.      _i_s_i_z_e _= _X_X
  105.      _m_/_n _= _X_X
  106.      (after a while)
  107.      _e_x_i_t _c_a_l_l_e_d
  108.      _B_o_o_t
  109.      _:
  110.  
  111. This step makes an empty file system.
  112.  
  113. 6.   The next thing to do is to restore the  data  onto  the
  114.      new  empty  file  system. To do this you respond to the
  115.      `_:' printed in the last step with
  116.  
  117.           (bring in the program restor)
  118.           _:tm(0,4)       (`ht(0,4)' for TU16/TE16)
  119.           _t_a_p_e_? tm(0,5)  (use `ht(0,5)' for TU16/TE16)
  120.           _d_i_s_k_? rp(0,0)       (use `hp(0,0)' for RP04/5/6)
  121.           _L_a_s_t _c_h_a_n_c_e _b_e_f_o_r_e _s_c_r_i_b_b_l_i_n_g _o_n _d_i_s_k_. (you type return)
  122.           (the tape moves, perhaps 5-10 minutes pass)
  123.           _e_n_d _o_f _t_a_p_e
  124.           _B_o_o_t
  125.           _:
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.                              -3-
  137.  
  138.  
  139.      You now have a UNIX root file system.
  140.  
  141. BBoooottiinngg UUNNIIXX
  142.  
  143.      You probably have the bootstrap running, left over from
  144. the  last  step above; if not, repeat the boot process (step
  145. 3) again.  Then use one of the following:
  146.  
  147.      _:rp(0,0)rptmunix         (for RP03 and TU10)
  148.      _:rp(0,0)rphtunix         (for RP03 and TU16/TE16)
  149.      _:hp(0,0)hptmunix         (for RP04/5/6 and TU10)
  150.      _:hp(0,0)hphtunix         (for RP04/5/6 and TU16/TE16)
  151.  
  152. The machine should type the following:
  153.  
  154.      _m_e_m _= _x_x_x
  155.      _#
  156.  
  157. The _m_e_m message gives the memory available to user  programs
  158. in bytes.
  159.  
  160.      UNIX is now running, and the `UNIX Programmer's manual'
  161. applies; references below of the form X(Y) mean the  subsec-
  162. tion  named  X  in  section Y of the manual.  The `#' is the
  163. prompt from the Shell, and indicates you are the super-user.
  164. The user name of the super-user is `root' if you should find
  165. yourself in multi-user mode and need to log in; the password
  166. is also `root'.
  167.  
  168.      To  simplify  your  life  later, rename the appropriate
  169. version of the system as specified above plain `unix.'   For
  170. example, use mv (1) as follows if you have an RP04/5/6 and a
  171. TU16 tape:
  172.  
  173.      mv hphtunix unix
  174.  
  175. In the future, when you reboot, you can type just
  176.  
  177.      hp(0,0)unix
  178.  
  179. to the `:' prompt.  (Choose appropriately among `hp',  `rp',
  180. `ht', `tm' according to your configuration).
  181.  
  182.      You  now  need to make some special file entries in the
  183. dev directory. These specify what sort of disk you are  run-
  184. ning  on,  what  sort  of tape drive you have, and where the
  185. file systems are.  For simplicity, this recipe creates fixed
  186. device  names.   These names will be used below, and some of
  187. them are built into various programs, so they are most  con-
  188. venient.   However,  the  names  do not always represent the
  189. actual major and minor device in  the  manner  suggested  in
  190. section  4  of  the Programmer's Manual.  For example, `rp3'
  191. will be used for the name of the file system  on  which  the
  192. user  file system is put, even though it might be on an RP06
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.                              -4-
  203.  
  204.  
  205. and is not logical device 3.  Also, this sequence  will  put
  206. the  user  file  system  on the same disk drive as the root,
  207. which is not the best place if you have more than one drive.
  208. Thus  the  prescription  below  should  be taken only as one
  209. example of where to put things.  See  also  the  section  on
  210. `Disk layout' below.
  211.  
  212.      In  any event, change to the dev directory (cd(1)) and,
  213. if you like, examine and perhaps change the  makefile  there
  214. (make (1)).
  215.  
  216.      cd /dev
  217.      cat makefile
  218.  
  219. Then, use one of
  220.  
  221.      make rp03
  222.      make rp04
  223.      make rp05
  224.      make rp06
  225.  
  226. depending on which disk you have.  Then, use one of
  227.  
  228.      make tm
  229.      make ht
  230.  
  231. depending  on which tape you have.  The file `rp0' refers to
  232. the root file system; `swap' to the swap-space file  system;
  233. `rp3'  to  the  user  file  system.   The devices `rrp0' and
  234. `rrp3' are the `raw' versions of the disks.  Also, `mt0'  is
  235. tape  drive  0, at 800 BPI; `rmt0' is the raw tape, on which
  236. large records can be read and written; `nrmt0' is  raw  tape
  237. with  the quirk that it does not rewind on close, which is a
  238. subterfuge that permits multifile tapes to be handled.
  239.  
  240.      The next thing to do is to extract the rest of the data
  241. from  the  tape.   Comments  are enclosed in ( ); don't type
  242. these.  The number in the first command is the size  of  the
  243. file system; it differs between RP03, RP04/5, and RP06.
  244.  
  245.      /etc/mkfs /dev/rp3 74000 (153406 if on RP04/5, 322278 on RP06)
  246.      (The above command takes about 2-3 minutes on an RP03)
  247.      dd if=/dev/nrmt0 of=/dev/null bs=20b files=6 (skip 6 files on the tape)
  248.      restor rf /dev/rmt0 /dev/rp3  (restore the file system)
  249.      (Reply with a `return' (CR) to the `Last chance' message)
  250.      (The restor takes about 20-30 minutes)
  251.  
  252. All of the data on the tape has been extracted.
  253.  
  254.      You  may  at  this  point  mount the source file system
  255. (mount(1)). To do this type the following:
  256.  
  257.      /etc/mount /dev/rp3 /usr
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.                              -5-
  269.  
  270.  
  271. The source and manual pages are now available in subdirecto-
  272. ries of /usr.
  273.  
  274.      The above mount command is only needed if you intend to
  275. play around with source on a single user system,  which  you
  276. are  going to do next.  The file system is mounted automati-
  277. cally when multi-user mode is entered, by a command  in  the
  278. file /etc/rc. (See `Disk Layout' below).
  279.  
  280.      Before  anything further is done the bootstrap block on
  281. the disk (block 0) should be filled in.  This is done  using
  282. the command
  283.  
  284.      dd if=/usr/mdec/rpuboot of=/dev/rp0 count=1
  285.  
  286. if you have the RP03, or
  287.  
  288.      dd if=/usr/mdec/hpuboot of=/dev/rp0 count=1
  289.  
  290. if  you  have  an RP04/5/6.  Now the DEC disk bootstraps are
  291. usable.  See Boot Procedures(8) for further information.
  292.  
  293.      Before UNIX is turned up completely, a  few  configura-
  294. tion  dependent exercises must be performed.  At this point,
  295. it would be wise to read  all  of  the  manuals  (especially
  296. `Regenerating  System Software') and to augment this reading
  297. with hand to hand combat.
  298.  
  299. RReeccoonnffiigguurraattiioonn
  300.  
  301.      The UNIX system running is configured to run  with  the
  302. given  disk  and tape, a console, and no other device.  This
  303. is certainly not the correct configuration.  You  will  have
  304. to correct the configuration table to reflect the true state
  305. of your machine.
  306.  
  307.      It is wise at this point to know how to  recompile  the
  308. system.   Print  (cat(1))  the  file /usr/sys/conf/makefile.
  309. This file is input to the program `make(1)' which if invoked
  310. with  `make all' will recompile all of the system source and
  311. install it in the correct libraries.
  312.  
  313.      The program mkconf(1) prepares files  that  describe  a
  314. given  configuration  (See mkconf(1)).  In the /usr/sys/conf
  315. directory, the four files _x_yconf were  input  to  mkconf  to
  316. produce  the  four  versions of the system _x_yunix.  Pick the
  317. appropriate one, and edit it to add  lines  describing  your
  318. own  configuration.   (Remember  the  console  typewriter is
  319. automatically included; don't count it in the kl  specifica-
  320. tion.)   Then  run  mkconf;  it  will generate the files l.s
  321. (trap vectors) c.c (configuration table), and mch0.s.   Take
  322. a careful look at l.s to make sure that all the devices that
  323. you have are assembled in the correct interrupt vectors.  If
  324. your  configuration is non-standard, you will have to modify
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.                              -6-
  335.  
  336.  
  337. l.s to fit your configuration.
  338.  
  339.      There  are  certain  magic  numbers  and  configuration
  340. parameters  imbedded  in various device drivers that you may
  341. want to change.  The device addresses  of  each  device  are
  342. defined  in  each driver.  In case you have any non-standard
  343. device addresses, just change  the  address  and  recompile.
  344. (The device drivers are in the directory /usr/sys/dev.)
  345.  
  346.      The  DC11  driver  is  set to run 4 lines.  This can be
  347. changed in dc.c.
  348.  
  349.      The DH11 driver is set to handle 3 DH11's with  a  full
  350. complement  of 48 lines.  If you have less, or more, you may
  351. want to edit dh.c.
  352.  
  353.      The DN11 driver will handle 4 DN's.  Edit dn.c.
  354.  
  355.      The DU11 driver can only handle a single DU.  This can-
  356. not be easily changed.
  357.  
  358.      The  KL/DL driver is set up to run a single DL11-A, -B,
  359. or -C (the console) and no DL11-E's.  To change  this,  edit
  360. kl.c  to  have  NKL11 reflect the total number of DL11-ABC's
  361. and NDL11 to reflect the number of DL11-E's.  So far as  the
  362. driver  is  concerned, the difference between the devices is
  363. their address.
  364.  
  365.      All of the disk and tape  drivers  (rf.c,  rk.c,  rp.c,
  366. tm.c,  tc.c,  hp.c,  ht.c)  are  set  up to run 8 drives and
  367. should not need to be changed.  The big disk  drivers  (rp.c
  368. and  hp.c)  have partition tables in them which you may want
  369. to experiment with.
  370.  
  371.      After all the corrections have been made, use `make(1)'
  372. to  recompile  the  system (or recompile individually if you
  373. wish: use the makefile as a guide).  If you  compiled  indi-
  374. vidually,  say  `make  unix' in the directory /usr/sys/conf.
  375. The final object file (unix) should be moved  to  the  root,
  376. and then booted to try it out.  It is best to name it /nunix
  377. so as not to destroy the working system until you're sure it
  378. does work.  See Boot Procedures(8) for a discussion of boot-
  379. ing.  Note:  before taking the system down, always (!!) per-
  380. form a sync(1) to force delayed output to the disk.
  381.  
  382. SSppeecciiaall FFiilleess
  383.  
  384.      Next  you must put in special files for the new devices
  385. in the directory /dev using mknod(1).  Print the  configura-
  386. tion  file  c.c  created  above.   This  is the major device
  387. switch of each device class (block and character).  There is
  388. one  line  for  each  device configured in your system and a
  389. null line for place holding for those  devices  not  config-
  390. ured.   The  essential  block  special  files were installed
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.                              -7-
  401.  
  402.  
  403. above; for any new  devices,  the  major  device  number  is
  404. selected  by  counting  the  line  number (from zero) of the
  405. device's entry in the block configuration table.   Thus  the
  406. first  entry in the table bdevsw would be major device zero.
  407. This number is also printed in the  table  along  the  right
  408. margin.
  409.  
  410.      The  minor  device  is the drive number, unit number or
  411. partition as described under each device in section 4 of the
  412. manual.  For tapes where the unit is dial selectable, a spe-
  413. cial file may be made for each possible selection.  You  can
  414. also add entries for other disk drives.
  415.  
  416.      In  reality,  device names are arbitrary. It is usually
  417. convenient to have a  system  for  deriving  names,  but  it
  418. doesn't have to be the one presented above.
  419.  
  420.      Some  further  notes  on  minor device numbers.  The hp
  421. driver uses the 0100 bit of the minor device number to indi-
  422. cate  whether or not to interleave a file system across more
  423. than one physical device. See hp(4) for more detail.  The tm
  424. and  ht  drivers use the 0200 bit to indicate whether or not
  425. to rewind the tape when it is closed. The 0100 bit indicates
  426. the density of the tape on TU16 drives.  By convention, tape
  427. special files with the 0200 bit on have an `n' prepended  to
  428. their name, as in /dev/nmt0 or /dev/nrmt1.  Again, see tm(4)
  429. or ht(4).
  430.  
  431.      The naming of character devices  is  similar  to  block
  432. devices.  Here the names are even more arbitrary except that
  433. devices meant to be used  for  teletype  access  should  (to
  434. avoid  confusion, no other reason) be named /dev/ttyX, where
  435. X is some string (as in `00' or `library').  The files  con-
  436. sole,  mem, kmem, and null are already correctly configured.
  437.  
  438.      The disk and magtape drivers provide a `raw'  interface
  439. to the device which provides direct transmission between the
  440. user's core and the device and  allows  reading  or  writing
  441. large records.  The raw device counts as a character device,
  442. and should have the name of the corresponding standard block
  443. special  file  with  `r'  prepended.  (The `n' for no rewind
  444. tapes violates this rule.)  Thus the raw magtape files would
  445. be called /dev/rmtX.  These special files should be made.
  446.  
  447.      When  all  the  special  files  have been created, care
  448. should be taken to change the  access  modes  (chmod(1))  on
  449. these files to appropriate values (probably 600 or 644).
  450.  
  451. FFllooaattiinngg PPooiinntt
  452.  
  453.      UNIX  only  supports  (and  really expects to have) the
  454. FP11-B/C floating point unit.   For  machines  without  this
  455. hardware,  there  is  a  user subroutine available that will
  456. catch illegal instruction traps and interpret floating point
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.                              -8-
  467.  
  468.  
  469. operations.  (See fptrap(3).)  To install this subroutine in
  470. the library, change to  /usr/src/libfpsim  and  execute  the
  471. shell files
  472.  
  473.           compall
  474.           mklib
  475.  
  476. The  system as delivered does not have this code included in
  477. any command, although the operating system adapts  automati-
  478. cally to the presence or absence of the FP11.
  479.  
  480.      Next,  a  floating-point  version  of the C compiler in
  481. /usr/src/cmd/c should be compiled using the commands:
  482.  
  483.      cd /usr/src/cmd/c
  484.      make fc1
  485.      mv fc1 /lib/fc1
  486.  
  487. This allows programs with floating  point  constants  to  be
  488. compiled.   To  compile floating point programs use the `-f'
  489. flag to cc(1). This flag ensures  that  the  floating  point
  490. interpreter is loaded with the program and that the floating
  491. point version of `cc' is used.
  492.  
  493. TTiimmee CCoonnvveerrssiioonn
  494.  
  495.      If your machine is not in the Eastern  time  zone,  you
  496. must  edit  (ed(1))  the  file /usr/sys/h/param.h to reflect
  497. your local time.  The manifest `TIMEZONE' should be  changed
  498. to reflect the time difference between local time and GMT in
  499. minutes.  For EST, this is 5*60; for PST it would  be  8*60.
  500. Finally,  there  is  a  `DSTFLAG'  manifest; when it is 1 it
  501. causes the time to shift to Daylight  Savings  automatically
  502. between  the  last  Sundays  in  April and October (or other
  503. algorithms in 1974 and 1975).  Normally this will  not  have
  504. to  be  reset.   When the needed changes are done, recompile
  505. and load the system using make(1) and  install  it.   (As  a
  506. general  rule,  when  a  system  header file is changed, the
  507. entire system should be recompiled.  As it happens, the only
  508. uses  of  these flags are in /usr/sys/sys/sys4.c, so if this
  509. is all that was changed it alone needs to be recompiled.)
  510.  
  511.      You   may   also   want   to   look   at    timezone(3)
  512. (/usr/src/libc/gen/timezone.c)  to  see  if the name of your
  513. timezone is in its internal  table.   If  needed,  edit  the
  514. changes  in.   After timezone.c has been edited it should be
  515. compiled   and   installed    in    its    library.     (See
  516. /usr/src/libc/(mklib  and compall)) Then you should (at your
  517. leisure) recompile and reinstall all programs  that  use  it
  518. (such as date(1)).
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.                              -9-
  533.  
  534.  
  535. DDiisskk LLaayyoouutt
  536.  
  537.      If  there are to be more file systems mounted than just
  538. the root and /usr, use mkfs(1) to create any new file system
  539. and  put  its  mounting in the file /etc/rc (see init(8) and
  540. mount(1)).  (You might look at /etc/rc anyway  to  see  what
  541. has been provided for you.)
  542.  
  543.      There  are two considerations in deciding how to adjust
  544. the arrangement of things on your disks: the most  important
  545. is making sure there is adequate space for what is required;
  546. secondarily, throughput should be maximized.  Swap space  is
  547. a  critical  parameter.   The system as distributed has 8778
  548. (hpunix) or 2000  (rpunix)  blocks  for  swap  space.   This
  549. should  be  large  enough so running out of swap space never
  550. occurs.  You may want to change these if local wisdom  indi-
  551. cates otherwise.
  552.  
  553.      The  system  as  distributed has all of the binaries in
  554. /bin.  Most of them should be  moved  to  /usr/bin,  leaving
  555. only  the  ones  required  for  system  maintenance (such as
  556. icheck, dcheck, cc, ed, restor, etc.) and the  most  heavily
  557. used  in  /bin.  This will speed things up a bit if you have
  558. only one disk, and also free up space on the root file  sys-
  559. tem for temporary files. (See below).
  560.  
  561.      Many  common system programs (C, the editor, the assem-
  562. bler etc.)  create intermediate files in the /tmp directory,
  563. so  the file system where this is stored also should be made
  564. large enough to accommodate most high-water marks.   If  you
  565. leave  the  root  file system as distributed (except as dis-
  566. cussed above) there should be no problem.  All the  programs
  567. that create files in /tmp take care to delete them, but most
  568. are not immune to events like being hung up  upon,  and  can
  569. leave  dregs.   The  directory  should  be examined every so
  570. often and the old files deleted.
  571.  
  572.      Exhaustion of user-file space is certain to  occur  now
  573. and  then;  the  only  mechanisms  for controlling this phe-
  574. nomenon are occasional use of du(1), df(1), quot(1), threat-
  575. ening messages of the day, and personal letters.
  576.  
  577.      The  efficiency  with which UNIX is able to use the CPU
  578. is largely  dictated  by  the  configuration  of  disk  con-
  579. trollers.   For  general time-sharing applications, the best
  580. strategy is to try to split user files, the  root  directory
  581. (including the /tmp directory) and the swap area among three
  582. controllers.
  583.  
  584.      Once you have decided how to  make  best  use  of  your
  585. hardware, the question is how to initialize it.  If you have
  586. the equipment, the best way to move a file system is to dump
  587. it  (dump(1)) to magtape, use mkfs(1) to create the new file
  588. system, and restore  (restor(1))  the  tape.   If  for  some
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.                             -10-
  599.  
  600.  
  601. reason  you don't want to use magtape, dump accepts an argu-
  602. ment telling where to put the dump; you  might  use  another
  603. disk.   Sometimes a file system has to be increased in logi-
  604. cal size without copying.  The super-block of the device has
  605. a  word  giving  the highest address which can be allocated.
  606. For relatively small increases, this  word  can  be  patched
  607. using  the debugger (adb(1)) and the free list reconstructed
  608. using icheck(1).  The size  should  not  be  increased  very
  609. greatly by this technique, however, since although the allo-
  610. catable space will increase the maximum number of files will
  611. not  (that  is, the i-list size can't be changed).  Read and
  612. understand the description given in  file  system(5)  before
  613. playing  around  in  this  way.  You may want to see section
  614. rp(4) for some suggestions on how to lay out the information
  615. on RP disks.
  616.  
  617.      If you have to merge a file system into another, exist-
  618. ing one, the best bet is to use tar(1).  If you must  shrink
  619. a  file  system,  the  best  bet is to dump the original and
  620. restor it onto the new filesystem.  However, this might  not
  621. work if the i-list on the smaller filesystem is smaller than
  622. the maximum allocated inode on the larger.  If this  is  the
  623. case,  reconstruct  the  filesystem  from scratch on another
  624. filesystem (perhaps using tar(1)) and then dump it.  If  you
  625. are  playing  with  the  root  file system and only have one
  626. drive the procedure is more complicated. What you do is  the
  627. following:
  628.  
  629. 1.   GET A SECOND PACK!!!!
  630.  
  631. 2.   Dump  the current root filesystem (or the reconstructed
  632.      one) using dump(1).
  633.  
  634. 3.   Bring the system down and mount the new pack.
  635.  
  636. 4.   Retrieve the WECo distribution tape and perform steps 1
  637.      through 5 at the beginning of this document, substitut-
  638.      ing the desired file system size instead of  5000  when
  639.      asked for `file system size'.
  640.  
  641. 5.   Perform  step  6 above up to the point where the `tape'
  642.      question is asked. At this point  mount  the  tape  you
  643.      made just a few minutes ago. Continue with step 6 above
  644.      substituting a 0 (zero) for the 5.
  645.  
  646. NNeeww UUsseerrss
  647.  
  648.      Install  new  users  by  editing  the   password   file
  649. /etc/passwd (passwd(5)).  This procedure should be done once
  650. multi-user mode is entered (see init(8)).   You'll  have  to
  651. make  a  current  directory for each new user and change its
  652. owner to the newly installed name.  Login as  each  user  to
  653. make  sure the password file is correctly edited.  For exam-
  654. ple:
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.                             -11-
  665.  
  666.  
  667.      ed /etc/passwd
  668.      $a
  669.      joe::10:1::/usr/joe:
  670.      w
  671.      q
  672.      mkdir /usr/joe
  673.      chown joe /usr/joe
  674.      login joe
  675.      ls -la
  676.      login root
  677.  
  678. This will make a new login entry  for  joe,  who  should  be
  679. encouraged to use passwd(1) to give himself a password.  His
  680. default current directory is /usr/joe which  has  been  cre-
  681. ated.  The delivered password file has the user _b_i_n in it to
  682. be used as a prototype.
  683.  
  684. MMuullttiippllee UUsseerrss
  685.  
  686.      If UNIX is to support  simultaneous  access  from  more
  687. than just the console terminal, the file /etc/ttys (ttys(5))
  688. has to be edited.  To add a new terminal be sure the  device
  689. is  configured  and  the  special  file exists, then set the
  690. first character of the appropriate line of  /etc/ttys  to  1
  691. (or  add  a  new  line).   Note  that init.c will have to be
  692. recompiled if there are to be more than 100 terminals.  Also
  693. note  that  if  the  special  file is inaccessible when init
  694. tries to create a process for it,  the  system  will  thrash
  695. trying and retrying to open it.
  696.  
  697. FFiillee SSyysstteemm HHeeaalltthh
  698.  
  699.      Periodically  (say  every day or so) and always after a
  700. crash, you should check all the file systems for consistency
  701. (icheck,  dcheck(1)).  It is quite important to execute sync
  702. (8) before rebooting or taking the machine  down.   This  is
  703. done  automatically  every  30 seconds by the update program
  704. (8) when a multiple-user system is running, but  you  should
  705. do it anyway to make sure.
  706.  
  707.      Dumping  of  the  file system should be done regularly,
  708. since once the system is going it is  very  easy  to  become
  709. complacent.   Complete and incremental dumps are easily done
  710. with dump(1).  Dumping of files by  name  is  best  done  by
  711. tar(1) but the number of files is somewhat limited.  Finally
  712. if there are enough drives entire disks can be copied  using
  713. cp(1),  or preferably with dd(1) using the raw special files
  714. and an appropriate block size.
  715.  
  716. CCoonnvveerrttiinngg SSiixxtthh EEddiittiioonn FFiilleessyysstteemmss
  717.  
  718.      The best way to convert file systems from  6th  edition
  719. (V6) to 7th edition (V7) format is to use tar(1). However, a
  720. special version of tar must be prepared to run on  V6.   The
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.                             -12-
  731.  
  732.  
  733. following steps will do this:
  734.  
  735. 1.   change directories to /usr/src/cmd/tar
  736.  
  737. 2.   At the shell prompt respond
  738.  
  739.           make v6tar
  740.  
  741.      This will leave an executable binary named `v6tar'.
  742.  
  743. 3.   Mount a scratch tape.
  744.  
  745. 4.   Use tp(1) to put `v6tar' on the scratch tape.
  746.  
  747. 5.   Bring down V7 and bring up V6.
  748.  
  749. 6.   Use  tp  (on  V6) to read in `v6tar'. Put it in /bin or
  750.      /usr/bin (or perhaps some other preferred location).
  751.  
  752. 7.   Use v6tar to make tapes of all that you  wish  to  con-
  753.      vert.   You  may  want  to  read  the manual section on
  754.      tar(1) to see whether you want to use blocking or  not.
  755.      Try  to  avoid  using  full  pathnames  when making the
  756.      tapes. This will simplify moving the hierarchy to  some
  757.      other place on V7 if desired. For example
  758.  
  759.           chdir /usr/ken
  760.           v6tar c .
  761.  
  762.      is preferable to
  763.  
  764.           v6tar c /usr/ken
  765.  
  766.  
  767. 8.   After  all of the desired tapes are made, bring down V6
  768.      and reboot V7. Use tar(1) to read  in  the  tapes  just
  769.      made.
  770.  
  771. OOddddss aanndd EEnnddss
  772.  
  773.      The programs dump, icheck, quot, dcheck, ncheck, and df
  774. (source in /usr/source/cmd) should  be  changed  to  reflect
  775. your  default  mounted file system devices.  Print the first
  776. few lines of these programs and the changes will be obvious.
  777. Tar  should  be changed to reflect your desired default tape
  778. drive.
  779.  
  780.  
  781.  
  782.                                         Good Luck
  783.  
  784.                                         Charles B. Haley
  785.                                         Dennis M. Ritchie
  786.  
  787.  
  788.  
  789.  
  790.  
  791.  
  792.  
  793.