home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / mach / doc / unpublished / i386_manpages.doc.Z / i386_manpages.doc
Encoding:
Text File  |  1992-08-19  |  41.6 KB  |  958 lines

  1.  
  2.  
  3.  
  4. BADBLOCKS(8)        UNIX Programmer's Manual         BADBLOCKS(8)
  5.  
  6.  
  7.  
  8. NAME
  9.      badblocks - bad block table maintainance program
  10.  
  11. SYNOPSIS
  12.      badblocks [ -_i_u_w ]
  13.  
  14. DESCRIPTION
  15.      The Mach disk driver supports replacement of bad sectors and
  16.      bad tracks that have been found on the Mach partition  of
  17.      the disk.  badblocks is run in an _i_n_i_t_i_a_l_i_z_e mode to find
  18.      the problem areas.  With today's smart disk controllers that
  19.      do slip sectors, etc, it is not uncommon to find very few
  20.      reported errors.  The example below illustrates just such a
  21.      case.  In fact the error noted was actually a soft ECC error
  22.      that the disk driver corrected on the fly.  It was entered
  23.      as a bad block manually.
  24.  
  25.      badblocks with no arguments just prints out the bad block
  26.      tables.
  27.  
  28.                The bad sectors/tracks read from the disk were:
  29.                bad sectors:   1 used,  17 reserved, at 38284
  30.                bad tracks:    0 used,  29 reserved, at 38301  [1479 sectors]
  31.                The first available sector for the root file system is 39780
  32.  
  33.                        Bad sectors detected:
  34.                                       Cyl  Head  Sector
  35.                                 0:    406     3      23
  36.  
  37.  
  38.      The flags _i, _u, and _w are used to indicate that the data is
  39.      to be updated.  The badblocks program will enter a conversa-
  40.      tional mode.  This mode is designed not to change any data
  41.      unless you explicitly tell it to.  badblocks selects
  42.      defaults for its questions to guarantee the above behaviour.
  43.  
  44.      The _i flag makes the choice of parameters as follows.  bad-
  45.      blocks calculates how many of the initial sectors of the
  46.      unix partition have been used up with the bootstrap, vtoc,
  47.      etc.  It reserves to the next track boundary as bad block
  48.      replacement sectors.  It then reserves to the next cylinder
  49.      boundary as bad track replacement.  (The Mach file system
  50.      would start then, but ...) The _u flag allows you to enter
  51.      whatever values you want.  THIS WOULD NOT BE WISE.
  52.  
  53.      Then, badblocks allows you to manually specify the bad sec-
  54.      tors and bad tracks.  You will probably want to use this
  55.      facility, if bad sectors turn up after the disk has been in
  56.      service for a while.
  57.  
  58.      Finally, badblocks asks you if you want to run _v_e_r_i_f_y.  The
  59.      _v_e_r_i_f_y phase scans the entire BIOS Mach paritition looking
  60.      for bad sectors and bad tracks.  It will either just read
  61.      all the blocks or if the _w command line switch is used read
  62.      and write all the blocks in the partition.  Clearly, the _w
  63.      option is destructive and you ONLY want to run it when you
  64.      are setting up the disk.  The way the _v_e_r_i_f_y works is that
  65.      as bad sectors are encountered, they are replaced by a sec-
  66.      tor from the "reserved" pool.  If this pool becomes
  67.      exhausted, the first replacement track is split up into
  68.      replacement sectors.  The replacement tracks ripple forward
  69.      in the track table to account for the loss of the first
  70.      track.  A similar strategy is used when the track replace-
  71.      ment "reserved" pool fills.  We push the start of Mach to
  72.      the next available cylinder and steal all the tracks up to
  73.      it.  After the scan, we ensure that a few replacement tracks
  74.      and sectors are available if errors turn up as the disk
  75.      wears out in service.
  76.  
  77.           The automatic expansion of the disk bad block area only
  78.           will happen if there are not any Mach partitions on the
  79.           disk for the badblock area to overlap.
  80.  
  81. NOTES
  82.      You should run this program interactively once or twice to
  83.      see how it works.  This is completely safe as long as you
  84.      answer the last question in the negative.  There are
  85.      subtleties that the program detects that are not fully
  86.      explained in this manual page.
  87.  
  88. SEE ALSO
  89.      diskutil (8), fdisk (8), vtoc (8)
  90.  
  91. BUGS
  92.      probably
  93.  
  94.  
  95.  
  96. DISKUTIL(8)         UNIX Programmer's Manual          DISKUTIL(8)
  97.  
  98.  
  99.  
  100. NAME
  101.      diskutil - disk layout program
  102.  
  103. SYNOPSIS
  104.      diskutil clobber_my_disk [ -_o_p ]
  105.      diskutil finit [ -_o_p ]
  106.      diskutil init [ -_p ]
  107.      diskutil fs
  108.      diskutil parm
  109.  
  110. DESCRIPTION
  111.      A Mach I386 disk has several "control" structures on it: the
  112.      BIOS partition structure, the VTOC (Mach partition sruc-
  113.      ture), and the bad block table.  These structures must be
  114.      initialized for Mach to be able to use the disk.  Most
  115.      structures are never modified again.
  116.  
  117.      The diskutil program is used to edit all these structures.
  118.      We will describe diskutil clobber_my_disk, diskutil finit,
  119.      diskutil init, diskutil fs, and diskutil parm on this manual
  120.      page.  These commands provide a "simple" interface for disk
  121.      initialization.  Collectively, the three programs, fdisk,
  122.      vtoc, and badblocks, allow you to edit all the fields in the
  123.      disk control structures.  They will be described under
  124.      separate manual pages.  (Note: fdisk, vtoc, and badblocks
  125.      are actually links to the diskutil program and are
  126.      equivalent to diskutil fdisk, diskutil vtoc, and diskutil
  127.      badblocks, respectively.)
  128.  
  129.      diskutil clobber_my_disk [ -_o_p ]
  130.           performs the vanilla disk initialization by executing:
  131.  
  132.           1.  diskutil finit [ -_o_p ]
  133.  
  134.           2.  badblocks -w
  135.  
  136.           3.  diskutil fs
  137.  
  138.      After this step, you are ready to load files onto your disk.
  139.  
  140.      diskutil finit [ -_o_p ]
  141.  
  142.      diskutil init [ -_p ]
  143.           These commands set up the disk structures so that you
  144.           are ready to run the badblocks command.  Both will set
  145.           up the VTOC to specify that the Mach disk geometry is
  146.           the same as the BIOS geometry and that there are no
  147.           entries in the Mach partition table.  They will also
  148.           initialize the badblock table to a default allocation.
  149.  
  150.           The -p flag is used to indicate that you want to over-
  151.           ride the BIOS disk geometry specifications and will
  152.           provide them interactively.
  153.  
  154.           The -o flag is followed by a number.  This number (in
  155.           sectors) specifies for the beginning of the MACH parti-
  156.           tion.  The flag is normally used if there are bad
  157.           blocks in the region of the disk that would be used for
  158.           replacements of bad blocks.
  159.  
  160.           diskutil finit performs the operations above and in
  161.           addition, it initializes the BIOS sector 0 partition to
  162.           one active partition that spans the entire disk and is
  163.           used for Mach. This command will totally rewrite sector
  164.           0.  If you have existing BIOS partitions, or want to
  165.           leave room to add them you must use _f_d_i_s_k and then
  166.           _d_i_s_k_u_t_i_l _i_n_i_t to layout your disk.
  167.  
  168.      diskutil fs
  169.           is used after you run badblocks to put Mach partitions
  170.           on the disk to receive your initial Mach distribution:
  171.  
  172.              "c" partition is the entirety of the BIOS Mach par-
  173.              tition.
  174.  
  175.              "a" partition begins at the start of the BIOS Mach
  176.              partition.  It is made approximately 11Meg in size
  177.              ending on a cylinder boundary.  This is large enough
  178.              for the standard "root" binaries and a few kernels.
  179.  
  180.              "d" partition is contiguous with the "a" partition
  181.              and approximately 50Meg in size ending on a cylinder
  182.              boundary.  This is large enough for the standard
  183.              "usr" binaries and the X binaries/environment.
  184.  
  185.              "e" partition is contiguous with the "d" partition
  186.              and occupies the rest of disk.
  187.  
  188.      diskutil parm
  189.           Displays the true disk geometry and the disk geometry
  190.           that BIOS believes.  For disks with a large number of
  191.           cylinders (> 1024), you will probably want to set the
  192.           Mach disk geometry to the actual drive geometry.  A
  193.           sample output for an HP Vectra follows:
  194.  
  195.                There are 1581 cylinders, 12 heads, and 32 sectors per track.
  196.                There are 384 sectors per cylinder.
  197.                There are a total 607104 sectors or 296 Meg
  198.  
  199.                BIOS THINKS
  200.  
  201.                There are 791 cylinders, 16 heads, and 48 sectors per track.
  202.                There are 768 sectors per cylinder.
  203.                There are a total 607488 sectors or 296 Meg
  204.  
  205. NOTES
  206.      Of the commands described here, diskutil parm is nondestruc-
  207.      tive and can be run as often as you like.  The others,
  208.      diskutil clobber_my_disk, diskutil finit, diskutil init, and
  209.      diskutil fs are run at most once.  And only if you can live
  210.      with the defaults that they select.
  211.  
  212. SEE ALSO
  213.      fdisk (8), vtoc (8), badblocks (8)
  214.  
  215. BUGS
  216.      probably
  217.  
  218.  
  219.  
  220. FDISK(8)            UNIX Programmer's Manual             FDISK(8)
  221.  
  222.  
  223.  
  224. NAME
  225.      fdisk - DOS partition maintainance program
  226.  
  227. SYNOPSIS
  228.      fdisk [ -_i_u ]
  229.  
  230. PROLOGUE
  231.      In order for BIOS to boot the kernel, certain conventions
  232.      must be adhered to.  Sector 0 of the disk must contain boot
  233.      code, a partition table, and a magic number.  BIOS parti-
  234.      tions can be used to break the disk up into several pieces.
  235.      BIOS brings in sector 0 and verifies the magic number.  It
  236.      then searches the 4 BIOS partitions described by sector 0 to
  237.      determine which of them is _a_c_t_i_v_e.  This boot then brings in
  238.      the secondary boot block from the _a_c_t_i_v_e partition and runs
  239.      it.  Under DOS, you could have one or more partitions with
  240.      one _a_c_t_i_v_e.  The DOS fdisk program can be used to divide
  241.      space on the disk into partitions and set one _a_c_t_i_v_e.
  242.  
  243. DESCRIPTION
  244.      The Mach program fdisk serves a similar purpose to the DOS
  245.      program.  When called with no arguments, it prints the sec-
  246.      tor 0 partition table.  An example follows:
  247.  
  248.                The data for partition 0 is:
  249.                systid 2, start 1, size 38249 (18 Meg), bootid 0
  250.                        beg: cyl 0/ sector 2/ head 0; end: cyl 50/ sector 0/ head 0
  251.                The data for partition 1 is:
  252.                MT
  253.                The data for partition 2 is:
  254.                MT
  255.                The data for partition 3 is:
  256.                systid 99, start 38250, size 584460 (285 Meg), bootid 80
  257.                        beg: cyl 50/ sector 1/ head 0; end: cyl 252/ sector 129/ head 0
  258.  
  259.      The disk is divided into two partitions that happen to fill
  260.      the disk.
  261.  
  262.      _s_t_a_r_t and _s_i_z_e
  263.           fields provide the start address and size of a parti-
  264.           tion in sectors.
  265.  
  266.      _b_o_o_t_i_d _8_0
  267.           specifies that this is the active partition.
  268.  
  269.      _s_y_s_i_d
  270.           is used to label the partition.  Mach reserves the
  271.           magic number 99 decimal (65 in hex).
  272.  
  273.      _c_y_l, _s_e_c_t_o_r, and _h_e_a_d
  274.           fields are used to specify the beginning address plus
  275.           one and end address plus one for the parititon.  Note:
  276.           these numbers are given using BIOS's understanding of
  277.           the disk geometry.  Further, the two high bits of the
  278.           _s_e_c_t_o_r fields are used to provide two more bits for the
  279.           _c_y_l field.
  280.  
  281.      The flags _i or _u are used to indicate that the paritition
  282.      data is to be updated.  The fdisk program will enter a
  283.      conversational mode.  This mode is designed not to change
  284.      any data unless you explicitly tell it to.  fdisk selects
  285.      defaults for its questions to guarantee the above behaviour.
  286.  
  287.      It displays each partition and ask if you want to edit it.
  288.      If you say yes, it will step through each field showing the
  289.      old value and asking for a new one.  When you are done with
  290.      a partition, fdisk will display it and ask if it is correct.
  291.      fdisk will then procede to the next entry.
  292.  
  293.           Getting the _c_y_l, _s_e_c_t_o_r, and _h_e_a_d fields correct is
  294.           tricky.  So by default, they will be calculated for
  295.           you; you can specify them if you choose.
  296.  
  297.      After all the partitions are processed, you are given the
  298.      option to change the _a_c_t_i_v_e partition.  Finally, when the
  299.      all the data for the first sector has been accumulated,  you
  300.      are asked if you really want to rewrite sector 0.  Only if
  301.      you answer yes, will the data be written to disk.
  302.  
  303.           The difference between the _u flag and _i flag is that
  304.           the _u flag just edits the fields as they appear on the
  305.           disk.  While the _i flag is used to "initialize" sector
  306.           0;  it will setup the last BIOS partition to use the
  307.           whole disk for Mach; and make it active.
  308.  
  309. NOTES
  310.      If you hand craft you disk layout, please make sure that the
  311.      Mach partition starts on a cylinder boundary.  A number of
  312.      decisions made later assume this.
  313.  
  314.      Editing as existing partition will most likely cause you to
  315.      lose all the data in that partition.
  316.  
  317.      You should run this program interactively once or twice to
  318.      see how it works.  This is completely safe as long as you
  319.      answer the last question in the negative.  There are
  320.      subtleties that the program detects that are not fully
  321.      explained in this manual page.
  322.  
  323. SEE ALSO
  324.      diskutil (8), badblocks (8), vtoc (8)
  325.  
  326. BUGS
  327.      probably
  328.  
  329.  
  330.  
  331. SUP(1)              UNIX Programmer's Manual               SUP(1)
  332.  
  333.  
  334.  
  335. NAME
  336.      sup - software upgrade protocol
  337.  
  338. SYNOPSIS
  339.      sup [ _f_l_a_g_s ] [ _s_u_p_f_i_l_e ] [ _c_o_l_l_e_c_t_i_o_n ...]
  340.  
  341. DESCRIPTION
  342.      _S_u_p is a program used for upgrading collections of files
  343.      from other machines to your machine.  You execute _s_u_p, the
  344.      _c_l_i_e_n_t program, which talks over the network using IP/TCP to
  345.      a _f_i_l_e _s_e_r_v_e_r and possibly a _n_a_m_e _s_e_r_v_e_r process.  The name
  346.      server process determines appropriate _r_e_p_o_s_i_t_o_r_y machines
  347.      from which to request upgrades.  The file server process
  348.      cooperates with _s_u_p to determine which files of the collec-
  349.      tion need to be upgraded on your machine.
  350.  
  351.      In performing an upgrade, the file server constructs a list
  352.      of files included in the collection.  The list is sent to
  353.      your machine, which determines which files are needed.
  354.      Those files are then sent from the file server.  It will be
  355.      most useful to run _s_u_p as a daemon each night so you will
  356.      continually have the latest version of the files in the
  357.      needed collections.
  358.  
  359.      The only required argument to _s_u_p is the name of a supfile.
  360.      It must either be given explicitly on the command line, or
  361.      the -s flag must be specified.  If the -s flag is given, the
  362.      system supfile will be used and a supfile command argument
  363.      should not be specified.  The list of collections is
  364.      optional and if specified will be the only collections
  365.      upgraded.  The following flags affect all collections speci-
  366.      fied:
  367.  
  368.      -s   As described above.
  369.  
  370.      -t   When this flag is given, _s_u_p will print the time that
  371.           each collection was last upgraded, rather than perform-
  372.           ing actual upgrades.
  373.  
  374.      -N   _S_u_p will trace network messages sent and received that
  375.           implement the _s_u_p network protocol.
  376.  
  377.      -P   Sup will use a set of non-privileged network ports
  378.           reserved for debugging purposes.
  379.  
  380.      The remaining flags affect all collections unless an expli-
  381.      cit list of collections are given with the flags.  Multiple
  382.      flags may be specified together that affect the same collec-
  383.      tions.  For the sake of convience, any flags that always
  384.      affect all collections can be specified with flags that
  385.      affect only some collections.  For example, sup
  386.      -sde=coll1,coll2 would perform a system upgrade, and the
  387.      first two collections would allow both file deletions and
  388.      command executions.  Note that this is not the same command
  389.      as sup -sde=coll1 coll2, which would perform a system
  390.      upgrade of just the coll2 collection and would ignore the
  391.      flags given for the coll1 collection.
  392.  
  393.      -a   All files in the collection will be copied from the
  394.           repository, regardless of their status on the current
  395.           machine.  Because of this, it is a very expensive
  396.           operation and should only be done for small collections
  397.           if data corruption is suspected and been confirmed.  In
  398.           most cases, the -o flag should be sufficient.
  399.  
  400.      -b   If the -b flag if given, or the backup supfile option
  401.           is specified, the contents of regular files on the
  402.           local system will be saved before they are overwritten
  403.           with new data.  The file collection maintainer can
  404.           designate specific files to be worthy of backing up
  405.           whenever they are upgraded.  However, such backup will
  406.           only take place if you specify this flag or the backup
  407.           option to allow backups for a file collection on your
  408.           machine.  The backup mechanism will create a copy of
  409.           the current version of a file immediately before a new
  410.           copy is received from the file server; the copy is
  411.           given the same name as the original file but is put
  412.           into a directory called BACKUP within the directory
  413.           containing the original file.  For example,
  414.           /usr/sas/src/foo.c would have a backup copy called
  415.           /usr/sas/src/BACKUP/foo.c.  There is no provision for
  416.           automatically maintaining multiple old versions of
  417.           files; you would have to do this yourself.
  418.  
  419.      -B   The -B flag overrides and disables the -b flag and the
  420.           backup supfile option.
  421.  
  422.      -d   Files that are no longer in the collection on the repo-
  423.           sitory will be deleted if present on the local machine.
  424.           This may also be specified in a supfile with the delete
  425.           option.
  426.  
  427.      -D   The -D flag overrides and disables the -d flag and the
  428.           delete supfile option.
  429.  
  430.      -e   Sup will execute commands sent from the repository that
  431.           should be run when a file is upgraded.  If the -e flag
  432.           is omitted, Sup will print a message that specifies the
  433.           command to execute.  This may also be specified in a
  434.           supfile with the execute option.
  435.  
  436.      -E   The -E flag overrides and disables the -e flag and the
  437.           execute supfile option.
  438.  
  439.      -f   A _l_i_s_t-_o_n_l_y upgrade will be performed.  Messages will
  440.           be printed that indicate what would happen if an actual
  441.           upgrade were done.
  442.  
  443.      -l   Normally, _s_u_p will not upgrade a collection if the
  444.           repository is on the same machine.  This allows users
  445.           to run upgrades on all machines without having to make
  446.           special checks for the repository machine.  If the -l
  447.           flag is specified, collections will be upgraded even if
  448.           the repository is local.
  449.  
  450.      -m   Normally, _s_u_p used standard output for messages.  If
  451.           the -m flag if given, _s_u_p will send mail to the user
  452.           running _s_u_p, or a user specified with the notify sup-
  453.           file option, that contains messages printed by _s_u_p.
  454.  
  455.      -o   _S_u_p will normally only upgrade files that have changed
  456.           on the repository since the last time an upgrade was
  457.           performed.  The -o flag, or the old supfile option,
  458.           will cause _s_u_p to check all files in the collection for
  459.           changes instead of just the new ones.
  460.  
  461.      -O   The -O flag overrides and disables the -o flag and the
  462.           old supfile option.
  463.  
  464.      -v   Normally, _s_u_p will only print messages if there are
  465.           problems.  This flag causes _s_u_p to also print messages
  466.           during normal progress showing what _s_u_p is doing.
  467.  
  468. SETTING UP UPGRADES
  469.      Each file collection to be upgraded must have a _b_a_s_e _d_i_r_e_c_-
  470.      _t_o_r_y which contains a subdirectory called sup that will be
  471.      used by the _s_u_p program; it will be created automatically if
  472.      you do not create it.  _S_u_p will put subdirectories and files
  473.      into this directory as needed.
  474.  
  475.      _S_u_p will look for a subdirectory with the same name as the
  476.      collection within the sup subdirectory of the _b_a_s_e _d_i_r_e_c_-
  477.      _t_o_r_y. If it exists it may contain any of the following
  478.      files:
  479.  
  480.      when This file is automatically updated by _s_u_p when a col-
  481.           lection is successfully upgraded and contains the time
  482.           that the file server, or possibly _s_u_p_s_c_a_n, created the
  483.           list of files in the upgrade list.  _S_u_p will send this
  484.           time to the file server for generating the list of
  485.           files that have been changed on the repository machine.
  486.  
  487.      refuse
  488.           This file contains a list of files and directories, one
  489.           per line, that the client is not interested in that
  490.           should not be upgraded.
  491.  
  492.      lock This file is used by _s_u_p to lock a collection while it
  493.           is being upgraded.  _S_u_p will get exclusive access to
  494.           the lock file using _f_l_o_c_k(2), preventing more than one
  495.           _s_u_p from upgrading the same collection at the same
  496.           time.
  497.  
  498.      last This file contains a list of files and directories, one
  499.           per line, that have been upgraded by _s_u_p in the past.
  500.           This information is used when the delete option, or the
  501.           -d flag is used to locate files previously upgraded
  502.           that are no longer in the collection that should be
  503.           deleted.
  504.  
  505.      Each file collection must also be described in one or more
  506.      supfiles.  When _s_u_p is executed, it reads the specified sup-
  507.      file to determine what file collections to upgrade.  Each
  508.      collection is described by a single line of text in the sup-
  509.      file; this line must contain the name of the collection, and
  510.      possibly one or more options separated by spaces.  The
  511.      options are:
  512.  
  513.      base=_d_i_r_e_c_t_o_r_y
  514.           The usual default name of the base directory for a col-
  515.           lection is described below (see FILES); if you want to
  516.           specify another directory name, use this option speci-
  517.           fying the desired directory.
  518.  
  519.      prefix=_d_i_r_e_c_t_o_r_y
  520.           Each collection may also have an associated _p_r_e_f_i_x
  521.           _d_i_r_e_c_t_o_r_y which is used instead of the base directory
  522.           for references to files within the collection.
  523.  
  524.      host=_h_o_s_t_n_a_m_e
  525.      hostbase=_d_i_r_e_c_t_o_r_y
  526.           _S_y_s_t_e_m collections are supported by the system main-
  527.           tainers, and _s_u_p will automatically find out the name
  528.           of the host machine and base directory on that machine.
  529.           However, you can also upgrade _p_r_i_v_a_t_e collections; you
  530.           simply specify with these options the _h_o_s_t_n_a_m_e of the
  531.           machine containing the files and the _d_i_r_e_c_t_o_r_y used as
  532.           a base directory for the file server on that machine.
  533.           Details of setting up a file collection are given in
  534.           the section below.
  535.  
  536.      login=_a_c_c_o_u_n_t_i_d
  537.      password=_p_a_s_s_w_o_r_d
  538.      crypt=_k_e_y
  539.           Files on the file server may be protected, and network
  540.           transmissions may be encrypted.  This prevents unau-
  541.           thorized access to files via _s_u_p.  When files are not
  542.           accessible to the default account (e.g.  the anon
  543.           anonymous account), you can specify an alternative
  544.           _a_c_c_o_u_n_t_i_d and _p_a_s_s_w_o_r_d for the file server to use on
  545.           the repository host.  Network transmission of the pass-
  546.           word will be always be encrypted.  You can also have
  547.           the actual file data encrypted by specifying a _k_e_y; the
  548.           file collection on the repository must specify the same
  549.           key or else _s_u_p will not be able to upgrade files from
  550.           that collection.  In this case, the default account
  551.           used by the file server on the repository machine will
  552.           be the owner of the encryption key file (see FILES)
  553.           rather than the anon anonymous account.
  554.  
  555.      notify=_a_d_d_r_e_s_s
  556.           If you use the -m option to receive log messages by
  557.           mail, you can have the mail sent to different user,
  558.           possibly on another host, than the user running the sup
  559.           program.  Messages will be sent to the specified
  560.           _a_d_d_r_e_s_s, which can be any legal netmail address.  In
  561.           particular, a project maintainer can be designated to
  562.           receive mail for that project's file collection from
  563.           all users running _s_u_p to upgrade that collection.
  564.  
  565.      backup
  566.           As described above under the -b flag.
  567.  
  568.      delete
  569.           As described above under the -d flag.
  570.  
  571.      execute
  572.           As described above under the -e flag.
  573.  
  574.      old  As described above under the -o flag.
  575.  
  576. PREPARING A FILE COLLECTION REPOSITORY
  577.      A set of files residing on a repository must be prepared
  578.      before _s_u_p client processes can upgrade those files.  The
  579.      collection must be given a _n_a_m_e and a _b_a_s_e _d_i_r_e_c_t_o_r_y. If it
  580.      is a private collection, client users must be told the name
  581.      of the collection, repository host, and base directory;
  582.      these will be specified in the supfile via the host and
  583.      hostbase options.  For a system-maintained file collection,
  584.      entries must be placed into the host list file and directory
  585.      list file as described in _s_u_p_f_i_l_e_s_r_v(8).
  586.  
  587.      Within the base directory, a subdirectory must be created
  588.      called sup . Within this directory there must be a subdirec-
  589.      tory for each collection using that base directory, whose
  590.      name is the name of the collection; within each of these
  591.      directories will be a list file and possibly a prefix file,
  592.      a host file, an encryption key file, a log file and a scan
  593.      file.  The filenames are listed under FILES below.
  594.  
  595.      prefix
  596.           Normally, all files in the collection are relative to
  597.           the base directory.  This file contains a single line
  598.           which is the name of a directory to be used in place of
  599.           the base directory for file references.
  600.  
  601.      host Normally, all remote host machines are allowed access
  602.           to a file collection.  If you wish to restrict access
  603.           to specific remote hosts for this collection, put each
  604.           allowed hostname on a separate line of text in this
  605.           file.  If a host has more than one name, only one of
  606.           its names needs to be listed.  The name LOCAL can be
  607.           used to grant access to all hosts on the local network.
  608.  
  609.      crypt
  610.           If you wish to use the _s_u_p data encryption mechanism,
  611.           create an encryption file containing, on a single line
  612.           of text, the desired encryption key.  Client processes
  613.           must then specify the same key with the crypt option in
  614.           the supfile or they will be denied access to the files.
  615.           In addition, actual network transmission of file con-
  616.           tents and filenames will be encrypted.
  617.  
  618.      list This file describes the actual list of files to be
  619.           included in this file collection, in a format described
  620.           below.
  621.  
  622.      scan This file, created by _s_u_p_s_c_a_n, is the list of filenames
  623.           that correspond to the instructions in the list file.
  624.           The scan file is only used for frequently-updated file
  625.           collections; it makes the file server run much faster.
  626.           See _s_u_p_s_e_r_v_e_r_s(8) for more information.
  627.  
  628.      lock As previously mentioned, this file is used to indicate
  629.           that the collection should be locked while upgrades are
  630.           in progress.  All file servers will try to get shared
  631.           access to the lock file with _f_l_o_c_k(2).
  632.  
  633.      logfile
  634.           If a log file exists in the collection directory, the
  635.           file server will append the last time an upgrade was
  636.           successfully completed, the time the last upgrade
  637.           started and finished, and the name of the host request-
  638.           ing the upgrade.
  639.  
  640.      It should be noted that _s_u_p allows several different named
  641.      collections to use the same base directory.  Separate
  642.      encryption, remote host access, and file lists are then used
  643.      for each collection.
  644.  
  645.      The list file is a text file with one command on each line.
  646.      Each command contains a keyword and a number of operands
  647.      separated by spaces.  All filenames in the list file are
  648.      evaluated on the repository machine relative to the host's
  649.      base directory, or prefix directory if one is specified, and
  650.      on your machine with respect to the base, or prefix, direc-
  651.      tory for the client.  The _f_i_l_e_n_a_m_e_s below (except _e_x_e_c-
  652.      _c_o_m_m_a_n_d) may all include wild-cards and meta-characters as
  653.      used by _c_s_h(1) including *, ?, [...], and {...}.  The com-
  654.      mands are:
  655.  
  656.      upgrade _f_i_l_e_n_a_m_e ...
  657.           The specified file(s) (or directories) will be included
  658.           in the list of files to be upgraded.  If a directory
  659.           name is given, it recursively includes all subdirec-
  660.           tories and files within that directory.
  661.  
  662.      always _f_i_l_e_n_a_m_e ...
  663.           The always command is identical to upgrade, except that
  664.           omit and omitany commands do not affect filenames
  665.           specified with the always command.
  666.  
  667.      omit _f_i_l_e_n_a_m_e ...
  668.           The specified file(s) (or directories) will be excluded
  669.           from the list of files to be upgraded.  For example, by
  670.           specifying upgrade /usr/vision and omit
  671.           /usr/vision/exp, the generated list of files would
  672.           include all subdirectories and files of /usr/vision
  673.           except /usr/vision/exp (and its subdirectories and
  674.           files).
  675.  
  676.      omitany _p_a_t_t_e_r_n ...
  677.           The specified patterns are compared against the files
  678.           in the upgrade list.  If a pattern matches, the file is
  679.           omitted.  The omitany command currently supports all
  680.           wild-card patterns except {...}.  Also, the pattern
  681.           must match the entire filename, so a leading */, or a
  682.           trailing /*, may be necessary in the pattern.
  683.  
  684.      backup _f_i_l_e_n_a_m_e ...
  685.           The specified file(s) are marked for backup; if they
  686.           are upgraded and the client has specified the backup
  687.           option in the corresponding line of the supfile, then
  688.           backup copies will be created as described above.
  689.           Directories may not be specified, and no recursive
  690.           filename construction is performed; you must specify
  691.           the names of the specific files to be backed up before
  692.           upgrading.
  693.  
  694.      noaccount _f_i_l_e_n_a_m_e ...
  695.           The accounting information of the specified file(s)
  696.           will not be preserved by _s_u_p.  Accounting information
  697.           consists of the owner, group, mode and modified time of
  698.           a file.
  699.  
  700.      symlink _f_i_l_e_n_a_m_e ...
  701.           The specified file(s) are to be treated as symbolic
  702.           links and will be transfered as such and not followed.
  703.           By default, _s_u_p will follow symbolic links.
  704.  
  705.      execute _e_x_e_c-_c_o_m_m_a_n_d (_f_i_l_e_n_a_m_e ...)
  706.           The _e_x_e_c-_c_o_m_m_a_n_d you specified will be executed on the
  707.           client process whenever any of the files listed in
  708.           parentheses are upgraded.  A special token, %s, may be
  709.           specified in the _e_x_e_c-_c_o_m_m_a_n_d and will be replaced by
  710.           the name of the file that was upgraded.  For example,
  711.           if you say execute ranlib %s (libc.a), then whenever
  712.           libc.a is upgraded, the client machine will execute
  713.           ranlib libc.a.  As described above, the client must
  714.           invoke _s_u_p with the -e flag to allow the automatic exe-
  715.           cution of command files.
  716.  
  717.      include _l_i_s_t_f_i_l_e ...
  718.           The specified _l_i_s_t_f_i_l_e_s will be read at this point.
  719.           This is useful when one collection subsumes other col-
  720.           lections; the larger collection can simply specify the
  721.           listfiles for the smaller collections contained within
  722.           it.
  723.  
  724.      The order in which the command lines appear in the list file
  725.      does not matter.  Blank lines may appear freely in the list
  726.      file.
  727.  
  728. FILES
  729.      Files on the client machine for _s_u_p:
  730.  
  731.      /usr/cs/lib/supfiles/name.host
  732.           list of names of host machines acting as name servers
  733.  
  734.      /usr/cs/lib/supfiles/coll.list
  735.           supfile used for -s flag
  736.  
  737.      <_b_a_s_e-_d_i_r_e_c_t_o_r_y>/sup/<_c_o_l_l_e_c_t_i_o_n>/last
  738.           recorded list of files in collection as of last upgrade
  739.  
  740.      <_b_a_s_e-_d_i_r_e_c_t_o_r_y>/sup/<_c_o_l_l_e_c_t_i_o_n>/lock
  741.           file used to lock collection
  742.  
  743.      <_b_a_s_e-_d_i_r_e_c_t_o_r_y>/sup/<_c_o_l_l_e_c_t_i_o_n>/refuse
  744.           list of files to refuse in collection
  745.  
  746.      <_b_a_s_e-_d_i_r_e_c_t_o_r_y>/sup/<_c_o_l_l_e_c_t_i_o_n>/when
  747.           recorded time of last upgrade
  748.  
  749.      /usr/<_c_o_l_l_e_c_t_i_o_n>
  750.           default base directory for file collection
  751.  
  752.      Files needed on each name-server machine for the name
  753.      server:
  754.  
  755.      /usr/cs/lib/supservers/coll.host
  756.           host name list for system collections
  757.  
  758.      Files needed on each repository machine for the file server:
  759.  
  760.      /usr/cs/lib/supservers/coll.dir
  761.           base directory list for system collections
  762.  
  763.      <_b_a_s_e-_d_i_r_e_c_t_o_r_y>/sup/<_c_o_l_l_e_c_t_i_o_n>/crypt
  764.           data encryption key for a collection. the owner of this
  765.           file is the default account used when data encryption
  766.           is specified
  767.  
  768.      <_b_a_s_e-_d_i_r_e_c_t_o_r_y>/sup/<_c_o_l_l_e_c_t_i_o_n>/host
  769.           list of remote hosts allowed to upgrade a collection
  770.  
  771.      <_b_a_s_e-_d_i_r_e_c_t_o_r_y>/sup/<_c_o_l_l_e_c_t_i_o_n>/list
  772.           list file for a collection
  773.  
  774.      <_b_a_s_e-_d_i_r_e_c_t_o_r_y>/sup/<_c_o_l_l_e_c_t_i_o_n>/lock
  775.           lock file for a collection
  776.  
  777.      <_b_a_s_e-_d_i_r_e_c_t_o_r_y>/sup/<_c_o_l_l_e_c_t_i_o_n>/logfile
  778.           log file for a collection
  779.  
  780.      <_b_a_s_e-_d_i_r_e_c_t_o_r_y>/sup/<_c_o_l_l_e_c_t_i_o_n>/prefix
  781.           file containing the name of the prefix directory for a
  782.           collection
  783.  
  784.      <_b_a_s_e-_d_i_r_e_c_t_o_r_y>/sup/<_c_o_l_l_e_c_t_i_o_n>/scan
  785.           scan file for a collection
  786.  
  787.      /usr/<_c_o_l_l_e_c_t_i_o_n>
  788.           default base directory for a file collection
  789.  
  790. SEE ALSO
  791.      _s_u_p_s_e_r_v_e_r_s(8)
  792.      _T_h_e _S_U_P _S_o_f_t_w_a_r_e _U_p_g_r_a_d_e _P_r_o_t_o_c_o_l, S. A. Shafer, CMU
  793.      Computer Science Department, 1985.
  794.  
  795. EXAMPLE
  796.      <example>
  797.  
  798. BUGS
  799.      The encryption mechanism should be strengthened, although
  800.      it's not trivial.
  801.  
  802. HISTORY
  803.      10-May-86  Glenn Marcy (gm0w) at Carnegie-Mellon University
  804.           Replaced reference to /usr/cmu with /usr/cs.
  805.  
  806.      29-Mar-86  Glenn Marcy (gm0w) at Carnegie-Mellon University
  807.           Updated manual entry to version 5.14 of sup.
  808.  
  809.      14-Jan-86  Glenn Marcy (gm0w) at Carnegie-Mellon University
  810.           Updated manual entry to version 5.7 of sup.
  811.  
  812.      04-Apr-85  Steven Shafer (sas) at Carnegie-Mellon University
  813.           Created.
  814.  
  815.  
  816.  
  817. VTOC(8)             UNIX Programmer's Manual              VTOC(8)
  818.  
  819.  
  820.  
  821. NAME
  822.      vtoc - Mach partition maintainance program
  823.  
  824. SYNOPSIS
  825.      vtoc [ -_i_u | -_m <_l_e_t_t_e_r> ]
  826.  
  827. DESCRIPTION
  828.      The vtoc describes the disk for Mach.  It specifies the disk
  829.      geometry that the Mach disk driver will use, the location of
  830.      the bad block table, and lastly the division of the space on
  831.      the disk into Mach partitions.
  832.  
  833.      The vtoc program, displays the disk layout when called with
  834.      no arguments.  An example follows:
  835.             The static data for the vtoc is:
  836.                     cyls 1581/ heads 12/ sectors 32; alt ptr 15360 alt len 2048
  837.                     6 UNIX partition entries.
  838.             a: start 141696, end 163967, size  22272 ( 10 Meg), flag 200, tag 2
  839.             b: MT
  840.             c: start      1, end 607103, size 607103 (296 Meg), flag 200, tag 5
  841.             d: start 163968, end 264191, size 100224 ( 48 Meg), flag 201, tag 4
  842.             e: start 264192, end 607103, size 342912 (167 Meg), flag 201, tag 4
  843.             f: start   1920, end 141695, size 139776 ( 68 Meg), flag 201, tag 4
  844.  
  845.           For this particular disk on a HP VECTRA, BIOS uses the
  846.           geometry _c_y_l_s 791, _s_e_c_t_o_r_s 16, and ead 48.  We believe
  847.           that using the true geometry will improve the perfor-
  848.           mance.
  849.  
  850.           _a_l_t _p_t_r and _a_l_t _l_e_n specify the location and size of
  851.           the bad block table on disk.  (It is probably a mistake
  852.           to let you see/alter this.)
  853.  
  854.      The standard Mach partitions are labeled "a", through ""h".
  855.      We show the _s_t_a_r_t, _e_n_d, and _s_i_z_e of each partition.  The _e_n_d
  856.      is actually calculated and not stored.  (The flag and tag
  857.      data are also probably a mistake and should not be visible.)
  858.  
  859.           Note: in the example, the "root" (paritition "a") is in
  860.           the middle of the disk.  The "f" partition maps the
  861.           beginning of the disk to the "root".
  862.  
  863.      vtoc -_m <_l_e_t_t_e_r>
  864.           A paritition corresponds to an area on the disk.
  865.           Creating a partition does not also make a Mach file
  866.           system in the area.  You must use the Unix program mkfs
  867.           to organize the space into a file system.  Since mkfs
  868.           is a hard program to use without some cover program, we
  869.           provide an option to vtoc, -_m <_l_e_t_t_e_r>.  This will out-
  870.           put to "standard out" most of the parameters needed for
  871.           mkfs.  You need only specify the blocksize (4096 or
  872.           8192) and frag size (512 or 1024), to complete the mkfs
  873.           command.
  874.  
  875.             vtoc -m a                               yields
  876.             mkfs /dev/rhd0a 22272 32 12
  877.  
  878.             vtoc -m f                               yields
  879.             mkfs /dev/rhd0f 139776 32 12
  880.  
  881.      The flags _i or _u are used to indicate that the paritition
  882.      data is to be updated.  The vtoc program will enter a
  883.      conversational mode.  This mode is designed not to change
  884.      any data unless you explicitly tell it to.  vtoc selects
  885.      defaults for its questions to guarantee the above behaviour.
  886.  
  887.      First vtoc displays the geometry data and asks if you want
  888.      to change it.  If you say yes, vtoc will step through each
  889.      field showing the old value and asking for a new one.  When
  890.      you are done, vtoc will display the changed data and ask if
  891.      it is ok.
  892.  
  893.      Next vtoc will walk you through each partition displaying
  894.      its data and ask if you want to edit the data.  If you say
  895.      yes, it will step through each field showing the old value
  896.      and asking for a new one.  It will ask for the _s_i_z_e and then
  897.      the _e_n_d.  It uses the _s_i_z_e to calculate the _e_n_d.  But then
  898.      goes back and uses the answer for the _e_n_d to recalculate the
  899.      _s_i_z_e.  So you may specify whichever item is easier for you
  900.      to calculate with.  (If you do not fill in the _f_l_a_g and _t_a_g;
  901.      it will choose reasonable defaults.) When you are done with
  902.      an entry, vtoc will display it and ask if it is ok.  vtoc
  903.      will then procede to the next entry.  If all the fields are
  904.      set to zero, the entry becomes empty (indicated by MT) and
  905.      disappears.
  906.  
  907.           Note: the number of UNIX parition entries is always
  908.           updated dynamically by ignoring the MT (emtpy) entries
  909.           at the end of the partition table.
  910.  
  911.           You are not obliged to set up partitions to fill the
  912.           whole disk initially.  You can always define a new one
  913.           as needed; although you would typically define pariti-
  914.           tions to fill the entire disk initially.
  915.  
  916.      After all the partitions are processed, you are asked if you
  917.      really want to write the changes.  Only if you answer yes,
  918.      will the data be written to disk.
  919.  
  920.      The difference between the _u flag and the _i flag
  921.           is that _u just edits the fields as they appear on the
  922.           disk.  While _i is used to "initialize" the partition
  923.           table:
  924.  
  925.              "c" partition is the entirety of the BIOS Mach par-
  926.              tition.
  927.  
  928.              "a" partition begins at the start of the BIOS Mach
  929.              partition.  It is made approximately 11Meg in size
  930.              ending on a cylinder boundary.  This is enough for
  931.              the standard "root" binaries and a few kernels.
  932.  
  933.              "d" is contiguous with the "a" partition and approx-
  934.              imately 50Meg in size ending on a cylinder boundary.
  935.              This is large enough for the standard "usr" binaries
  936.              and the X binaries/environment.
  937.  
  938.              "e" partition is contiguous with the "d" partition
  939.              and to occupy the rest of disk.
  940.  
  941.      Note that "a", "d", and "e" are set up to be contiguous.  So
  942.      if you change the size or start of one partition, the other
  943.      partitions slide forward.  This technique was used to create
  944.      the partition table shown in the above example.
  945.  
  946. NOTES
  947.      You should run this program interactively once or twice to
  948.      see how it works.  This is completely safe as long as you
  949.      answer the last question in the negative.  There are
  950.      subtleties that the program detects that are not fully
  951.      explained in this manual page.
  952.  
  953. SEE ALSO
  954.      diskutil (8), fdisk (8), badblocks (8), mkfs (8)
  955.  
  956. BUGS
  957.      probably
  958.