Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ fd(HW) — OpenDesktop 1.0.0y

Media Vault

Software Library

Restoration Projects

Artifacts Sought


     FD(HW)                                     UNIX System V



     Name
          fd - floppy devices


     Description
          The fd devices implement  the  interface  with  floppy  disk
          drives.   Each  device  name corresponds to a specific major
          and minor device.  Typically, the tar(C), cpio(C)  or  dd(C)
          commands  are  used  to  read  or  write  floppy disks.  For
          instance,

               tar tvf /dev/fd0

          tabulates the contents of the floppy disk in drive 0 (zero).

          The block special fd devices are also  block-buffered.   The
          floppy driver can read or write 1K bytes at a time using raw
          i/o.  Note that block transfers are always a multiple of the
          1K disk block size.

     XENIX Devices
          XENIX diskette device file names use the following format:

               /dev/[r]fd[0,1][48ss8,48ss9,
               96ds9,96ds15,135ds9,135ds18]

          (See  Notes, below, for more information about device naming
          procedure.)  The  corresponding  character   special   (raw)
          devices  afford  direct, unbuffered transmission between the
          floppy and the user's read or write transfer address in  the
          user's program.

          For information about formatting, see format(C).

          The minor device number determines  what  kind  of  physical
          device  is  attached  to each device file (see Notes).  When
          accessing the character special floppy devices,  the  user's
          buffer  must  begin  on  a  word  boundary.   The count in a
          read(S), write(S), or lseek(S) call to a  character  special
          floppy device must be a multiple of 1K bytes.

          Device  names  determine  the  particular  drive  and  media
          configuration.  The device names have the form:

               fd048ds9

          Where:

               fd0 = drive number (0, 1, 2 or 3)
               48  = number of disk tracks per inch (48 or 96)
               ds  = single or double sided floppy (ss or ds)
               9   = number of sectors on the floppy (8 or 9)

          For instance, /dev/fd048ss9 indicates a 48 track  per  inch,
          single sided, 9 sector floppy disk device in drive 0.

          The minor device numbers for floppy  drives  depend  on  the
          drive and media configuration.  The most common are:


       _________________________________________________________________
       |              48tpi               |    96tpi     |    135tpi    |
       |        ds/8   ds/9   ss/8   ss/9 | ds/15   ds/8 | ds/9   ds/18 |
       |________________________________________________________________|
       |Drive |                   Minor Device Number                   |
       |_____|_________________________________________________________|
       | 0    |  12  |  4   |  8   |  0   |  52   |  44  |  36  |  60   |
       | 1    |  13  |  5   |  9   |  1   |  53   |  45  |  37  |  61   |
       | 2    |  14  |  6   |  10  |  2   |  54   |  46  |  38  |  62   |
       | 3*   |      |      |      |      |       |      |      |       |
       |      |      |      |      |      |       |      |      |       |
       |______|_____|_____|______|______|_______|______|______|______|

          *    reserved for special, non-floppy devices  connected  to
               the floppy controller as unit #3.

          The scheme for creating minor device numbers is as  follows.
          When  interpreted  as a binary number, each bit of the minor
          device number represents some  aspect  of  the  device/media
          configuration.

          For example, the minor device number  for  /dev/fd048ss8  is
          ``8.'' Interpreted as a binary number, 8 is:

               00001000

          This is how each bit, or binary digit, is significant:

               ________________________________________________
               |48tpi - 0  |   Sectors per    | ss - 0 | Drive |
               |___________|                  |________|       |
               |96tpi - 1  |      Track       |        |       |
               |___________|                  |        |       |
               |135tpi - 1 |                  | ds - 1 |       |
               |___________|_________________|________|_______|
               |    32     |   16        8    |   4    | 2   1 |
               |___________|_________________|________|_______|
               |    0      |    0    |   1    |   0    | 0 | 0 |
               |           |         |        |        |   |   |
               |___________|________|________|________|___|___|


          Only the last six digits of the number  are  used  in  minor
          device  identification.  The  first significant digit is the
          third from the left.  In this example, the third digit  from
          the  left  is  zero, thus the device is 48tpi.  The next two
          digits mean:

                             ______________________
                             |       | Sectors per |
                             | Bits  |    Track    |
                             |_______|             |
                             |16 | 8 |             |
                             |__|___|_____________|
                             |0  | 0 |      9      |
                             |0  | 1 |      8      |
                             |1  | 0 |     15      |
                             |1  | 1 |     18      |
                             |___|___|____________|

          The fourth digit tells whether the floppy  is  single  sided
          (ss - 0) or double sided (ds - 1).  The last two signify the
          drive number:

                                ________________
                                |      | Drive  |
                                |Bits  | Number |
                                |______|        |
                                |2 | 1 |        |
                                |_|___|________|
                                |0 | 0 |   0    |
                                |0 | 1 |   1    |
                                |1 | 0 |   2    |
                                |1 | 1 |   3*   |
                                |_|___|________|

          *    reserved for special, non-floppy devices  connected  to
               the floppy controller as unit #3.

          Using this information, you can construct any  minor  device
          numbers you need.


     UNIX Devices
          UNIX diskette device file names use the following format:

               /dev/[r]dsk/f[0,1][5h,5d9,
               5d8,5d4,5d16,5q,3h,3d][t,u]

          where  r  indicates  a  raw  (character)  interface  to  the
          diskette,  rdsk  selects  the  raw  device interface and dsk
          selects the block device interface. 0 or 1 selects the drive
          to  be accessed: f0 selects floppy drive 0, while f1 selects
          drive 1. The following  list  describes  the  format  to  be
          interacted with:

               5h      5.25" high density diskette (1.2MB).
               5d9     5.25" double density diskette,  9  sectors  per
                       track (360KB).
               5d8     5.25" double density diskette,  8  sectors  per
                       track (320KB).
               5d4     5.25" double density diskette,  4  sectors  per
                       track (320KB).
               5d16    5.25" double density diskette, 16  sectors  per
                       track (320KB).
               5q      5.25" quad density diskette (720KB).
               3h      3.50" high density diskette (1.44MB).
               3d      3.50" double density diskette (720KB).


          Format specification is mandatory when  opening  the  device
          for  formatting.  However,  when accessing a floppy disk for
          other operations (read and write), the format  specification
          field  can be omitted.  In this case, the floppy disk driver
          will   automatically   determine   the   format   previously
          established  on  the diskette and then perform the requested
          operation (for example, cpio -itv</dev/rsdk/f1).

          The last parameter, t or u,  selects  the  partition  to  be
          accessed.  t  represents  the whole diskette. Without t or u
          specified, the whole diskette  except  cylinder  0  will  be
          selected.  u represents the whole diskette except track 0 of
          cylinder 0.

          Besides the device file naming convention  described  above,
          some  of  the  formats  have  alias  names that correlate to
          previous releases. The following list describes the  formats
          that have an alias:

               format         alias
               5h             q15d
               5d8            d8d
               5d9            d9d


          For example, the device file /dev/rdsk/f0q15dt is equivalent
          to /dev/rdsk/f05ht.

     Files
          XENIX Devices:

          /dev/[r]fd0         /dev/[r]fd048ds9   /dev/[r]fd196ds9
          /dev/[r]fd1         /dev/[r]fd096ds9   /dev/[r]fd1135ds18
          /dev/[r]fd048       /dev/[r]fd0135ds18 /dev/[r]fd096ds15
          /dev/[r]fd148       /dev/[r]fd148ds9   /dev/[r]fd196ds15
          /dev/[r]fd048ds8    /dev/[r]fd048ss9   /dev/[r]fd0135ds9
          /dev/[r]fd148ds8    /dev/[r]fd148ss9   /dev/[r]fd1135ds9
          /dev/[r]fd048ss8    /dev/[r]fd096
          /dev/[r]fd148ss8    /dev/[r]fd196

          UNIX Devices:

          /dev/[r]dsk/f0      /dev/[r]dsk/f05d8t   /dev/[r]dsk/f03h
          /dev/[r]dsk/f0t     /dev/[r]dsk/f05d4    /dev/[r]dsk/f03ht
          /dev/[r]dsk/f05h    /dev/[r]dsk/f05d4t   /dev/[r]dsk/f03d
          /dev/[r]dsk/f05ht   /dev/[r]dsk/f05d16   /dev/[r]dsk/f03dt
          /dev/[r]dsk/f05d9   /dev/[r]dsk/f05d16t
          /dev/[r]dsk/f05d9t  /dev/[r]dsk/f05q
          /dev/[r]dsk/f0fd8   /dev/[r]dsk/f05qt


     Notes
          It is not advisable to format a low density (48tpi) diskette
          on  a  high  density  (96tpi  or  135tpi) floppy drive.  Low
          density diskettes written on a high density drive should  be
          read on high density drives. They may or may not be readable
          on a low density drive.

          Use error-free floppy disks for best results on reading  and
          writing.


     (printed 8/30/89)                                  FD(HW)

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