Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ fd(HW) — OpenDesktop 3.0.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought


 fd(HW)                        06 January 1993                         fd(HW)


 Name

    fd - floppy devices

 Description

    The fd devices implement the interface with floppy disk drives.  Each de-
    vice 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 the device naming procedure.)
    The corresponding character special (raw) devices allow direct, unbuf-
    fered 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.  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 per track (8,9,15 or 18)

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

 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 inter-
    face. 0 or 1 selects the drive to be accessed: f0 selects floppy drive 0,
    while f1 selects drive 1. The following list describes the possible for-
    mats:

       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" high 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

    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 follow-
    ing 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.

 Minor device numbers

    The minor device bit representation scheme for floppy disk drives is
    shown in the table below. Using this table, you can construct the minor
    device number of any allowable floppy disk configuration. For example,
    the minor device number would be 61 for a double sided, 135 tracks per
    inch, 18 sector floppy disk drive, connected as unit 1
    (/dev/[r]dsk/f13h[t|u]). The corresponding bit representation would be
    ``00111101''.

    Floppy disk drive minor device bit representation

    _________________________________________________________________________
                         Bits
    7     6      5     4      3     2      1     0         Description
    _________________________________________________________________________
    -     -      -     -      -     -      X     X         Disk drive number*
    -     -      -     -      -     0      -     -         Single sided (ss)
    -     -      -     -      -     1      -     -         Double sided (ds)
    -     -      0     0      0     -      -     -         48tpi, 9 sector
    -     -      0     0      1     -      -     -         48tpi, 8 sector
    -     -      1     0      0     -      -     -         96tpi, 9 sector
    -     -      1     1      0     -      -     -         96tpi, 15 sector
    -     -      1     0      0     -      -     -         135tpi, 9 sector
    -     -      1     1      1     -      -     -         135tpi, 18 sector
    0     0      -     -      -     -      -     -         Always set to zero

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

 Files

    XENIX Devices:

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

    UNIX Devices:

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


 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.


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