home *** CD-ROM | disk | FTP | other *** search
/ Lion Share / lionsharecd.iso / utils_mz / pfdisktc.zip / PFDISK.DOC < prev    next >
Text File  |  1992-04-15  |  7KB  |  265 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6. PFDISK(8)          MAINTENANCE COMMANDS        PFDISK(8)
  7.  
  8.  
  9.  
  10.  
  11.  
  12. NAME
  13.     pfdisk - partition fixed disk
  14.  
  15. SYNOPSIS
  16.     pfdisk device
  17.  
  18. DESCRIPTION
  19.     pfdisk partitions the fixed disk identified as device  into  (at
  20.     most) four parts, each of which    may be independently loaded with
  21.     an operating system.  The actual name of device    depends     on  the
  22.     operating  system  in  use.   For ESIX (System V/386) the device
  23.     name is    either "/dev/rdsk/0s0" or "/dev/rdsk/1s0".   For  Minix,
  24.     it is "/dev/hd0" or "/dev/hd5".     For MS-DOS it is a single digit
  25.     (zero or one).
  26.  
  27.     pfdisk reads the hard disk partition table from     block    zero  of
  28.     device    into  memory  and allows the user to examine, modify, or
  29.     save the partition table.  A regular file may be used instead of
  30.     a  real     device    for testing purposes, though the device    geometry
  31.     must be    specified manually, and    some  systems  will  requrire  a
  32.     file-name argument with    the "R"    and "W"    commands (DOS, ESIX).
  33.  
  34.     The partition table on device is NOT modified unless  the  write
  35.     command    (W) is used with no argument.
  36.  
  37. USAGE
  38.   Commands
  39.     All pfdisk commands  consist  of  a  command  word  followed  by
  40.     optional  blank-separated command arguments.  Note that    only the
  41.     first letter of    a command word is significant (except  for  "wq"
  42.     and  "q!").  All command letters are accepted in either    upper or
  43.     lower case.  Numeric arguments are  specified  using  C     syntax.
  44.     Extra arguments    are silently ignored.
  45.  
  46.     The commands are:
  47.  
  48.     ?    Prints a command summary (help).
  49.  
  50.     1 sys_id first last sys_name
  51.         Set the    partition  table  entry     for  part  one,  using:
  52.         sys_id    as  its    system ID code,    first as the lowest num-
  53.         bered cylinder it uses,    last  as  the  highest    numbered
  54.         cylinder  it uses, and sys_name    (optional) as the system
  55.         name (in the menu name table).
  56.  
  57.     2|3|4 sys-id first last    sys-name
  58.         Similar    to 1 but sets partition     two,  three,  or  four,
  59.         respectively.
  60.  
  61.  
  62.  
  63.  
  64.  
  65. Release    1.3          Last change: Oct 1990            1
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72. PFDISK(8)          MAINTENANCE COMMANDS        PFDISK(8)
  73.  
  74.  
  75.  
  76.  
  77.  
  78.     A number
  79.         Mark partition number as active    (so it will be used  for
  80.         booting).   If    number    is  zero,  no  partition will be
  81.         active.
  82.  
  83.     G cylinders heads sectors
  84.         Inform pfdisk what the geometry    of the device is.
  85.  
  86.     I    Print a    summary    of the known ID    codes.
  87.  
  88.     L    List the partition table.  See Output Format below.
  89.  
  90.     Q    Quit without saving.  If the memory copy of  the  parti-
  91.         tion  table  was  modified, a warning will be issued and
  92.         the command ignored.
  93.  
  94.     Q!    Quit, even if the memory copy of the partition table was
  95.         not saved.
  96.  
  97.     R file-name
  98.         Read boot sector from  file-name  (if  given)  otherwise
  99.         read from device.
  100.  
  101.     W file-name
  102.         Write boot sector to  file-name.  (if  given)  otherwise
  103.         write to device.
  104.  
  105.     WQ    Same as    "write"    followed by "quit".
  106.  
  107.     #    This line is a comment (to be ignored).
  108.  
  109.   Output Format
  110.     Here is    a sample of the    output from the    L command:
  111.  
  112.     # Partition table on device: /dev/rdsk/0s0
  113.     geometry 1222 15 34 (cyls heads    sectors)
  114.     #  ID  First(cyl)  Last(cyl)  Name     # start,    length (sectors)
  115.     1   4       0        127          MS-LOSS  # 34, 65246
  116.     2 129     128        255          Minix    # 65280,    65280
  117.     3   0       0          0               # 0, 0
  118.     4  99     256       1220          ESIX     # 130560, 492150
  119.     # note:     last(4): phys=(1023,14,34) logical=(1220,14,34)
  120.     active:    4
  121.  
  122.     This output format is carefully    constructed so that  it     may  be
  123.     saved in a file     (by redirecting standard output) and later used
  124.     as input (by redirecting standard input).  On a    UNIX system, one
  125.     can save this output using the command:
  126.  
  127.  
  128.  
  129.  
  130.  
  131. Release    1.3          Last change: Oct 1990            2
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138. PFDISK(8)          MAINTENANCE COMMANDS        PFDISK(8)
  139.  
  140.  
  141.  
  142.  
  143.  
  144.         (echo L) | pfdisk device-name >    save-file
  145.  
  146.     save-file is a complete    record of the  partition  table.   On  a
  147.     UNIX system, one could use save-file to    re-initialize the parti-
  148.     tion table using the command:
  149.  
  150.         (cat save-file ; echo wq) | pfdisk device-name
  151.  
  152.     Consistency of each partition table entry is checked  while  the
  153.     table is listed.  Any inconsistencies discovered are reported in
  154.     a commentary note as shown above.
  155.  
  156.   Physical vs. Logical
  157.     Each partition table entry has both "physical" and  a  "logical"
  158.     fields.      The  physical     fields     specify  the lowest and highest
  159.     cylinder,head,sector combinations to be    used in    that  partition.
  160.     The  logical  start  field has the total number    of sectors which
  161.     precede    this partition,    and the    logical     length     field    has  the
  162.     total  number  of  sectors  contained  in this partition.  These
  163.     fields should be self consistent unless    the disk has  more  than
  164.     1024 cylinders.
  165.  
  166.     The physical cylinder fields are only ten-bits wide so the  con-
  167.     tents are limited to 1023. The logical sector fields are 32 bits
  168.     wide and always    show the true logical beginning     and  length  of
  169.     the partition.    Generally, the physical    start field is used only
  170.     to locate the secondary    boot sector, and the logical  start  and
  171.     length fields are used to actually delimit the partition used by
  172.     a particular system.
  173.  
  174.   Partition Names
  175.     The Name field in the partition    table is  treated  specially  if
  176.     the  bootmenu  program    is installed in    the primary boot sector.
  177.     (See the file bootmenu.doc for    more  information.)  pfdisk  can
  178.     recognize  the    name  table  used  by bootmenu and will    show the
  179.     actual names present in    that name table.  If any other boot pro-
  180.     gram  is  used    then  the  Name     field    reflects the result of a
  181.     table-lookup of    the system ID.
  182.  
  183.     If you provide a name when  setting  any  partition  entry,  the
  184.     boot-sector  is     marked    as using a name    table, so that on subse-
  185.     quent uses of pfdisk you will see the partition    names  you  have
  186.     specified.
  187.  
  188.   Boot program replacement
  189.     You can    replace    the boot program in  your  boot     sector     without
  190.     affecting  the    partition  table  by  using  pfdisk  as    follows.
  191.     First, (as always) save    a copy of the current boot sector (on  a
  192.  
  193.  
  194.  
  195.  
  196.  
  197. Release    1.3          Last change: Oct 1990            3
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204. PFDISK(8)          MAINTENANCE COMMANDS        PFDISK(8)
  205.  
  206.  
  207.  
  208.  
  209.  
  210.     floppy)    using the "W file" command.  Then, use the "R file" com-
  211.     mand to    read the new boot program.  If the boot    program    read  in
  212.     is  less  than    446  bytes  long,  the    partition  table will be
  213.     unchanged.
  214.  
  215.     Unlike the DOS or UNIX fdisk programs, pfdisk has NO  boot  pro-
  216.     gram  compiled    into  its  executable image.  If you wish to use
  217.     pfdisk to partition a newly formatted hard disk, you must have a
  218.     boot  program image available to read in using the "r file" com-
  219.     mand.  Two boot    programs, "bootmenu.bin" and "bootauto.bin"  are
  220.     distributed  with  pfdisk  and    should    be found with its source
  221.     files.    See the    file bootmenu.doc for further information  about
  222.     these boot programs.
  223.  
  224. AUTHOR
  225.     Gordon W. Ross
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263. Release    1.3          Last change: Oct 1990            4
  264.  
  265.