fd(7) fd(7)
NAME
fd - floppy disk interface
DESCRIPTION
fd provides the interface to both 3" and 51/4" floppy disk units
connected to a Western Digital 1772 controller. The character and
block special interfaces in /dev provide support for up to two drives
using 512 byte sector sizes. Other sector sizes are supported via
the PDSET ioctl.
The binary representation of the minor device number is encoded as
cudhspppp; meanings of which are as follows:
c Selects configuration on open. A 0 in this position means that
the disk drive parameters will be set as indicated by the d, h,
and s bits. A 1 here means that the parameters last used will
be re-used.
u Selects which floppy drive to use.
d Selects density; 0 = double density (9 sectors/track), 1 = quad
density (18 sectors/track). Quad density may not be selected
unless the motherboard switches have been set so as to indicate
that a drive capable of quad density has been installed.
h Selects number of sides (heads); 0 = single sided, 1 = double
sided.
s Determines whether to do double stepping; 0 = no, 1 = yes.
Setting s to 1 enables 40 track/inch disks to be read.
pppp Must be zero.
Both block and character (raw) interfaces are provided. The block
interface accesses the disk via the system's normal buffering
mechanism and may be read or written without regard to physical disk
records.
The raw interface provides for direct transmission between the disk
and the user's data area; thus I/O is considerably more efficient
when large amounts of data are to be transferred. However, seeks are
truncated to 512-byte block boundaries and attempts to write data in
quantities that are not in multiples of 512 bytes will fail,
returning an error condition.
Internally, fd uses a pdsector structure and a structure of type vtoc
(both as defined in /usr/include/sys/vtoc.h) to store certain
information relating to the physical characteristics of each drive.
(Note, however, that pdsectors and vtocs are not implemented on the
floppy disk itself.)
8/91 Page 1
fd(7) fd(7)
The following extra fields (as defined in /usr/include/sys/fd.h) are
implemented in the pdsector.
#define pd_density reserved[0]
#define pd_precomp reserved[1]
#define pd_steprate reserved[2]
These fields have meanings as follows:
pd_density
Indicates the disks recording density. Possible values
(defined in /usr/include/sys/wd1772.h) are DD for double
density (9 sectors/track) or QD for quad density (18
sectors/track).
pd_precomp
First track not to apply precomp. The default value is zero
(i.e., precomp always on).
pd_steprate
Time for the heads to move between tracks.
These parameters may be changed via the PDSET ioctl function.
FORMATTING
The low level, device specific format program may be used to format
new diskettes or simply reconfigure the driver in a variety of ways.
When something other than the standard parameters are required, a
data file must be supplied to the format program. The following
options may be set in the data file:
alloc_end
alloc_start
bytes_per_sector(*)
This may be set to 128, 256, 512, or 1024.
cylinders(*)
This may be set to any number in the range 0 < n <= 82.
defect_map
density(*)
This may be set to DD or QD.
device_type
Page 2 8/91
fd(7) fd(7)
diagnost_info_block
diagnost_size
errlog_area
heads(*)
This may only be set to 1 or 2.
interleave(*)
logical_sector_zero
mfg_info
next_relocation_area
no_of_relocation_areas
precomp(*)
relocation_area
sanity
sectors_per_track(*)
serial
size_of_defect_map
size_of_errlog_area
size_of_mfg_info
size_of_relocation_area
steprate(*)
version
Only those option marked with (*) are used by the driver, other
options may be set, but changing them will have no effect.
FILES
/dev/fdsk/*
/dev/rfdsk/*
SEE ALSO
format(1M), disk(7).
8/91 Page 3