Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ hd(HW) — OpenDesktop 1.1.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

fdisk(ADM)

badtrk(ADM)

divvy(ADM)

dos(C)

mkdev(ADM)


     HD(HW)                               UNIX System V



     Name
          hd - internal hard disk drive


     Description
          Block-buffered access to the primary hard disk  is  provided
          through  the  following  block  special  files:   hd00, hd01
          through hd04, hd0a and hd0d, root, and swap.  Block-buffered
          access  to  the  secondary hard disk is provided through the
          following block special files:   hd10,  hd11  through  hd14,
          hd1a.

          hd00 refers to the entire physical disk; hd01  through  hd04
          refer  to the fdisk partitions. root refers to the root file
          system; swap refers to the  swap  area;  The  block  special
          files  access  the  disks  via the system's normal buffering
          mechanism and may be read and written without regard to  the
          size of physical disk records.

          Character special files follow the same naming convention as
          the  block  special  files except that the character special
          file is prefaced with an ``r''.  For example, the  character
          special  file  referring  to  the  entire  physical  disk is
          /dev/rhd00.

          The following are the names of the  fixed  disk  partitions.
          Each  partition  can  be accessed through a block interface,
          for  example  /dev/hd01,  or  through  a   character   (raw)
          interface, for example /dev/rhd01.

          The  above  devices  follow  the  XENIX  naming  convention.
          Equivalant   UNIX   devices   are   found  in  the  /dev/dsk
          (character) and /dev/rdsk (raw) directories.  In  the  table
          that  follows,  both  XENIX  UNIX  devices are shown.  XENIX
          devices  extend  only  to  disks  located   on   the   first
          controller;  beyond  this,  the  UNIX  devices shown must be
          used.

          ____________________________________________________________________________
         |                     Device File Names for Fixed Disks                     |
         |________________________|_______________________________|__________________|
         |    First Controller    |        Second Controller      |                  |
         |   Disk 1       Disk 2  |     Disk 1          Disk 2    |     Partition    |
         |________________________|_______________________________|__________________|
         | /dev/hd00    /dev/hd10 |  /dev/dsk/4s0    /dev/dsk/5s0 |  entire disk     |
         | /dev/rhd00   /dev/rhd10|  /dev/rdsk/4s0   /dev/rdsk/5s0|                  |
         |________________________|_______________________________|__________________|
         | /dev/hd01    /dev/hd11 |  /dev/dsk/4s1    /dev/dsk/5s1 |  first partition |
         | /dev/rhd01   /dev/rhd11|  /dev/rdsk/4s1   /dev/rdsk/5s1|                  |
         |________________________|_______________________________|__________________|
         | /dev/hd02    /dev/hd12 |  /dev/dsk/4s2    /dev/dsk/5s2 |  second partition|
         | /dev/rhd02   /dev/rhd12|  /dev/rdsk/4s2   /dev/rdsk/5s2|                  |
         |________________________|_______________________________|__________________|
         | /dev/hd03    /dev/hd13 |  /dev/dsk/4s3    /dev/dsk/5s3 |  third partition |
         | /dev/rhd03   /dev/rhd13|  /dev/rdsk/4s3   /dev/rdsk/5s3|                  |
         |________________________|_______________________________|__________________|
         | /dev/hd04    /dev/hd14 |  /dev/dsk/4s4    /dev/dsk/5s4 |  fourth partition|
         | /dev/rhd04   /dev/rhd14|  /dev/rdsk/4s4   /dev/rdsk/5s4|                  |
         |________________________|_______________________________|__________________|
         | /dev/hd0a    /dev/hd1a |  /dev/dsk/4sa    /dev/dsk/5sa |  active partition|
         | /dev/rhd0a   /dev/rhd1a|  /dev/rdsk/4sa   /dev/rdsk/5sa|                  |
         |________________________|_______________________________|__________________|
         | /dev/hd0d    /dev/hd1d |  /dev/dsk/4sd    /dev/dsk/5sd |  DOS partition   |
         | /dev/rhd0d   /dev/rhd1d|  /dev/rdsk/4sd   /dev/rdsk/5sd|                  |
         |________________________|_______________________________|__________________|
         | /dev/root              |                               |  root file system|
         | /dev/rroot             |                               |                  |
         |________________________|_______________________________|__________________|
         | /dev/swap              |                               |  swap area       |
         | /dev/rswap             |                               |                  |
         |________________________|_______________________________|__________________|

          Note that the root and swap file exist  only  for  the  root
          disk.

          To access DOS partitions, specify letters such as ``C:''  or
          ``D:''  to  indicate  first  or second partitions.  The file
          /etc/default/msdos  contains  lines  that  assign  a  letter
          abbreviation for the DOS device name.  Refer to dos(C).

          The  following  table  lists   the   minor   device   number
          definitions  for  the  hard  disk  special files, along with
          examples.  Note that the block and character special devices
          share  the  same  minor device definition.  The minor device
          number definition is  as  follows:   bits  7  and  6  denote
          physical drive, bits 5-3 denote virtual(fdisk) partition and
          bits 2-0 denote divvy partition.

     ________________________________________________________________________
    |                           Minor Device Bits                           |
    |_______________________________________________________________________|
    | Phys.   Virtual   divvy   Device special   Description                |
    |  7 6     5 4 3    2 1 0   file name                                   |
    |_______________________________________________________________________|
    |  0 0     0 0 0    0 0 0   /dev/hd00        whole PD 0                 |
    |  0 1     0 0 0    0 0 0   /dev/hd10        whole PD 1                 |
    |  1 0     0 0 0    0 0 0   /dev/dsk/4s0     whole PD 2                 |
    |  1 1     0 0 0    0 0 0   /dev/dsk/5s0     whole PD 3                 |
    |  0 0     0 0 1    1 1 1   /dev/hd01        PD 0, whole VD 1           |
    |  0 0     0 1 0    1 1 1   /dev/hd02        PD 0, whole VD 2           |
    |  0 0     0 1 1    1 1 1   /dev/hd03        PD 0, whole VD 3           |
    |  0 0     1 0 0    1 1 1   /dev/hd04        PD 0, whole VD 4           |
    |  0 0     1 0 1    1 1 1   /dev/hd0a        PD 0, whole active VD      |
    |  0 0     1 1 0    1 1 1   /dev/hd0d        PD 0, whole DOS VD         |
    |  0 0     1 0 1    0 0 0   /dev/root        PD 0, active virtual, DP 0 |
    |  0 0     1 0 1    0 0 1   /dev/swap        PD 0, active virtual, DP 1 |
    |  0 0     1 0 1    0 1 0   /dev/usr         PD 0, active virtual, DP 2 |
    |  0 0     1 0 1    1 1 0   /dev/recover     PD 0, active virtual, DP 6 |
    |  0 1     0 0 1    1 1 1   /dev/hd11        PD 1, whole VD 1           |
    |  0 1     0 1 0    1 1 1   /dev/hd12        PD 1, whole VD 2           |
    |  0 1     0 1 1    1 1 1   /dev/hd13        PD 1, whole VD 3           |
    |  0 1     1 0 0    1 1 1   /dev/hd14        PD 1, whole VD 4           |
    |  0 1     1 0 1    1 1 1   /dev/hd1a        PD 1, whole active VD      |
    |  0 1     1 1 0    1 1 1   /dev/hd1d        PD 1, whole DOS VD         |
    |  0 1     1 0 1    0 0 0   /dev/u0          PD 1, active virtual, DP 0†|
    |  0 1     1 0 1    0 0 1   /dev/u1          PD 1, active virtual, DP 1†|
    |  0 1     1 0 1    0 1 0   /dev/u2          PD 1, active virtual, DP 2†|
    |  1 1     0 0 1    1 1 1   /dev/dsk/4s1     PD 2, whole VD 1           |
    |  1 1     0 1 0    1 1 1   /dev/dsk/4s2     PD 2, whole VD 2           |
    |  1 1     0 1 1    1 1 1   /dev/dsk/4s3     PD 2, whole VD 3           |
    |  1 1     1 0 0    1 1 1   /dev/dsk/4s4     PD 2, whole VD 4           |
    |  1 1     1 0 1    1 1 1   /dev/dsk/4sa     PD 2, whole active VD      |
    |  1 1     1 1 0    1 1 1   /dev/dsk/4sd     PD 2, whole DOS VD         |
    |  1 1     0 0 1    1 1 1   /dev/dsk/5s1     PD 3, whole VD 1           |
    |  1 1     0 1 0    1 1 1   /dev/dsk/5s2     PD 3, whole VD 2           |
    |  1 1     0 1 1    1 1 1   /dev/dsk/5s3     PD 3, whole VD 3           |
    |  1 1     1 0 0    1 1 1   /dev/dsk/5s4     PD 3, whole VD 4           |
    |  1 1     1 0 1    1 1 1   /dev/dsk/5sa     PD 3, whole active VD      |
    |  1 1     1 1 0    1 1 1   /dev/dsk/5sd     PD 3, whole DOS VD         |
    |______|________________________________________________________________|
    | KEY  |  VD = virtual drive                 PD = physical drive        |
    |      |  DP = divvy partition               † = user-defined name      |
    |      |                                                                |
    |______|________________________________________________________________|

          The device files usr  and  u[0-2]  are  optional  filesystem
          names;  these  nodes  are  not present unless created by the
          system administrator.


     Files
          /dev/hd0a                  /dev/hd1a                   /dev/usr
          /dev/rhd0a                 /dev/rhd1a                  /dev/rusr
          /dev/hd0[0-4]              /dev/hd1[0-4]               /dev/root
          /dev/rhd0[0-4]             /dev/rhd1[0-4]              /dev/rroot
          /dev/hd0d                  /dev/hd1d                   /dev/swap
          /dev/rhd0d                 /dev/rhd1d                  /dev/rswap
          /dev/dsk/4s0              /dev/dsk/4s4               /dev/dsk/5s3
          /dev/dsk/5s0              /dev/dsk/4sa               /dev/dsk/5s4
          /dev/dsk/4s1              /dev/dsk/4sd               /dev/dsk/5sa
          /dev/dsk/4s2              /dev/dsk/5s1               /dev/dsk/5sd
          /dev/dsk/4s3              /dev/dsk/5s2


     See Also
          fdisk(ADM), badtrk(ADM), divvy(ADM), dos(C), mkdev(ADM)


     Diagnostics
          The following messages are among those that may  be  printed
          on the console:

               invalid fixed disk parameter table

          and:

               error on fixed disk (minor n), block = nnnnn,
               cmd=nnnnn, status=nnnn,
               Sector = nnnnn, Cylinder/head = nnnnn

          Possible reasons for the first error include:

          -  The kernel is unable to get drive specifications, such as
             number  of  heads, cylinders, and sectors per track, from
             the disk controller ROM.

          -  Improper configuration.

          -  The disk is not turned on.

          -  The disk is not supported.

          The second error specifies the following information:

          -  block : The UNIX block number within the device.

          -  cmd : The last command sent to the disk controller.

          -  status : The error status from the disk controller.

          -  Sector  and  Cylinder/head  specify  the  location  of  a
             possible   flaw.    This   information   is   used   with
             badtrk(ADM).

     Notes
          On the first disk, hd00 denotes the entire disk and is  used
          to  access  the  master  boot block which includes the fdisk
          partition table. For  the  second  disk,  hd10  denotes  the
          entire disk and is used to access its fdisk partition table.
          Do not write to hd10 and hd00.


     (printed 2/15/90)                                     HD(HW)







































































































































































































































































































































































































Typewritten Software • bear@typewritten.org • Edmonds, WA 98026