fd(7)
NAME
fd, fdc − drivers for floppy disks and floppy disk controllers
CONFIG
name="fd" parent="fdc" density="DSHD" unit=0;
name="fd" parent="fdc" density="DSHD" unit=1;
DESCRIPTION
The fd and fdc drivers provide the interfaces to floppy disks using the Intel 8272, NEC 765, or compatible disk controllers on Solaris 2.1 for x86 systems.
The minor device number in files that use the floppy interface encodes the unit number as well as the partition. The bits of the minor device number are defined as rrruuppp where r=controller, u=unit, and p=partition. The unit number selects a particular floppy drive for the controller. The partition number picks one of eight partitions [a-h].
When the floppy is first opened the driver looks for a label in logical block 0 of the diskette. If a label is found, the geometry and partition information from the label will be used on each access thereafter. The driver first assumes high density characteristics when it tries to read the label. If the read fails it will try the read again using low density characteristics. If attempts to read the label fail, the open will fail. Use the FNDELAY flag when opening an unformatted diskette as a signal to the driver that it should not attempt to access the diskette. If block 0 is read successfully, but a label is not found, the open will fail for the block interface. Using the raw interface, the open will succeed even if the diskette is unlabeled. Default geometry and partitioning are assumed if the diskette is unlabeled.
The default partitions are:
a All cylinders except the last
b Only the last cylinder
c Entire diskette
d All cylinders except the first
e Just the first cylinder
The fd driver supports both block and raw interfaces. The block files access the disk using the system’s normal buffering mechanism and may be read and written without regard to physical disk records. There is also a “raw” interface that provides for direct transmission between the disk and the user’s read or write buffer. A single read(2) or write(2) call usually results in one I/O operation; therefore raw I/O is considerably more efficient when many words are transmitted. The names of the raw files conventionally begin with an extra ‘r’.
Note that the fd driver on Solaris 2.1 for x86 systems auto-senses the density of the floppy.
For 3.5" double-sided diskettes, the following densities are supported:
HD: 80 cylinders, 18 sectors per track
DD: 80 cylinders, 9 sectors per track
For 5.25" double-sided diskettes, the following densities are supported:
HD: 80 cylinders, 15 sectors per track
DD: 40 cylinders, 9 sectors per track
DD: 40 cylinders, 8 sectors per track
QD: 80 cylinders, 9 sectors per track
DD: 40 cylinders, 16 sectors per track (256 bytes per sector)
DD: 40 cylinders, 4 sectors per track (1024 bytes per sector)
FILES
First Drive:
/dev/fd0[a-e] block file
/dev/rfd0[a-e] raw file
Second Drive:
/dev/fd1[a-e] block file
/dev/rfd1[a-e] raw file
SEE ALSO
dd(1M), read(2), write(2), dkio(7), fdio(7)
DIAGNOSTICS
fd%d: %s failed (%x %x %x)
The command, %s, failed after several retries on drive %d. The three hex values in parenthesis are the contents of status register 0, status register 1, and status register 2 of the Intel 8272 Floppy Disk Controller on completion of the command as documented in the data sheet for that part. This error message is usually followed by one of the following, interpreting the bits of the status register: fd%d: not writable
fd%d: crc error
fd%d: overrun/underrun
fd%d: bad format
fd%d: timeout
NOTES
3.5" HD diskettes have 18 sectors per track and 5.25" HD diskettes have 15 sectors per track. They can cross a track (though not a cylinder) boundary without losing data, so when using dd(1M) to or from a diskette, you should specify bs=18k or multiples thereof for 3.5" diskettes, and bs=15k or multiples thereof for 5.25" diskettes.
SunOS 5.1 — Last change: 22 January 1993