Manual Page Result
0
Command: fd | Section: 7 | Source: Digital UNIX | File: fd.7.gz
fd(7) Miscellaneous Information Manual fd(7)
NAME
fd - Floppy disk interface
SYNOPSIS
controller fdi0 at * vector fdintr
device disk fd0 at fdi0 drive 0
device disk fd1 at fdi0 drive 1
DESCRIPTION
The fd device driver and fdi controller make up the interface to Digi-
tal's integrated Floppy Disk Interface (FDI).
If the minor number is less than 64, the driver select number is indi-
cated by bits 4 and 5, and the partition by bits 0 through 3. If the
minor number is one of 64, 65, 66, or 67, the drive select number is
indicated by bits 0 and 1, and disk partitions are disabled. In the
latter case, the entire surface of the media is treated as one large
partition, and attempts to change the partition table fail. The major
number is 14 for both the block interface and the raw (character) in-
terface.
The device names have the format rfd0, which indicates the raw device
interface, or fd0p, which indicates the block interface and where p in-
dicates the partition using the characters a through h. If you do not
specify a partition with the block interface, partitioning is disabled.
Default file protection for /dev/fd0 is 666.
The block interface is restricted to 512-byte, disk-sector aligned ac-
cesses. Reads or writes that attempt to start at the middle of a sector
actually start at the beginning of the sector.
There is no sector-boundary limitation if you use the raw interface.
The driver protects the process that opens the floppy disk device from
an accidental media change by preventing access to the device if the
media is removed and then reinserted. To access the drive after the
media has been changed, either you must close and then reopen the de-
vice, or you must issue a DEVIOCGET or FDIOTPRRST ioctl. You can use
the fddisk command with the -new option to issue the FDIOTPRRST ioctl.
When a floppy disk device is first opened after changing media, a delay
occurs while the partition table is read from the media if the device
is not of type rfd0. If the device is opened with FNDELAY, partition
table reading may be delayed until the first actual read or write re-
quest.
If you access media containing non-UFS data, the data on the media may
appear to be a valid partition table. In this case, the user will
probably not be able to access the media. To work around the problem,
use the rfd0 device.
Partitions a and c begin at physical sector 0 and occupy the entire
disk. All other partitions also begin at physical sector 0, but are of
zero (0) length. You can change partition sizes by using the disklabel
command.
The currently supported floppy disk drive is the RX26. The supported
media types in the RX26 are the 350DD of size 737280 (1440 sectors),
350HD of size 1474560 (2880 sectors), and 350ED of size 2949120 (5760
sectors), as shown in the following partition layouts for the media
types:
RX26, Double Density:
disk start length
rz?a 0 1440
rz?b 0 0
rz?c 0 1440
rz?d 0 0
rz?e 0 0
rz?f 0 0
rz?g 0 0
rz?h 0 0
RX26, High Density:
disk start length
rz?a 0 2880
rz?b 0 0
rz?c 0 2880
rz?d 0 0
rz?e 0 0
rz?f 0 0
rz?g 0 0
rz?h 0 0
RX26, Extra Density:
disk start length
rz?a 0 5760
rz?b 0 0
rz?c 0 5760
rz?d 0 0
rz?e 0 0
rz?f 0 0
rz?g 0 0
rz?h 0 0
Ioctl Support
Several special ioctls are defined for use with the fd device driver.
Use of these requires that /usr/include/sys/ioctl.h and
/sys/io/fd/mips/fdi.h are included. See the fdi.h file for reference
purposes.
FDIOSENSE returns information about the current state of the drive via
the structure fd_sense. All elements of this structure are initialized
by this call. See comments in fdi.h for use of each element.
FDIOGETMTYP returns information about the media currently in the drive
via the structure fd_mt. All elements of this structure are initial-
ized by this call. See comments in fdi.h for use of each element.
FDIOFMTDSK, FDIOFFBSETUP, FDIOFFBNEXT, and FDIOFMTTRK are used for disk
formatting. Data is passed to and from these calls via certain ele-
ments of a structure of type fd_fmt_spec. See comments in fdi.h for
use of each element. FDIOFMTDSK causes the entire disk to be format-
ted. FDIOFMTTRK causes a specified track to be formatted. The combi-
nation of FDIOFFBSETUP and FDIOFFBNEXT cause the entire disk to be for-
matted, a little at a time, allowing the calling process to display an
updated status line indicating the progress of the format.
FDIOTPRRST causes the driver to ignore the fact that the media might
have just been removed and reinserted. Status information is returned
via a fd_sense structure, just as with the FDIOSENSE call.
FDIOSEEK allows the user to specify the position of the next single-
sector access (and only the next access) in any of several formats.
These formats include logical-sector-number format, physical-sector-
number format, and cylinder-head-sector format. These formats are
specified in a structure of type fd_seek. See comments in fdi.h for
use of each element.
FDIOMKCHS and FDIOMKPSN are used to translate between cylinder-head-
sector sector specification and physical-sector-number sector specifi-
cation. Data is passed to and from these calls via certain elements of
a structure of type fd_chs_psn. See comments in fdi.h for use of each
element.
The calls DEVIOCGET, DEVGETGEOM, DIOCGETPT, DIOCDGTPT, and DIOCSETPT
are also supported and perform in their expected manner. A call to DE-
VIOCGET also has the effect of calling FDIOTPRRST.
FILES
RELATED INFORMATION
Commands: disklabel(8), fddisk(8), MAKEDEV(8), uerf(8) delim off
fd(7)