Section (4) fd
Name
fd — floppy disk device
CONFIGURATION
Floppy drives are block devices with major number 2.
Typically they are owned by root:floppy (i.e., user root,
group floppy) and have either mode 0660 (access checking via
group membership) or mode 0666 (everybody has access). The
minor numbers encode the device type, drive number, and
controller number. For each device type (that is, combination
of density and track count) there is a base minor number. To
this base number, add the drive_zsingle_quotesz_s number on its controller
and 128 if the drive is on the secondary controller. In the
following device tables, n
represents the drive
number.
if you use formats with more tracks than supported by your drive, you may cause it mechanical damage. Trying once if more tracks than the usual 40/80 are supported should not damage it, but no warranty is given for that. If you are not sure, don_zsingle_quotesz_t create device entries for those formats, so as to prevent their usage.
Drive-independent device files which automatically detect the media format and capacity:
Name | Base minor # |
fd n |
0 |
5.25 inch double-density device files:
Name | Capacity | Cyl. | Sect. | Heads | Base |
KiB | minor # | ||||
fd n d360 |
360 | 40 | 9 | 2 | 4 |
5.25 inch high-density device files:
Name | Capacity | Cyl. | Sect. | Heads | Base |
KiB | minor # | ||||
fd n h360 |
360 | 40 | 9 | 2 | 20 |
fd n h410 |
410 | 41 | 10 | 2 | 48 |
fd n h420 |
420 | 42 | 10 | 2 | 64 |
fd n h720 |
720 | 80 | 9 | 2 | 24 |
fd n h880 |
880 | 80 | 11 | 2 | 80 |
fd n h1200 |
1200 | 80 | 15 | 2 | 8 |
fd n h1440 |
1440 | 80 | 18 | 2 | 40 |
fd n h1476 |
1476 | 82 | 18 | 2 | 56 |
fd n h1494 |
1494 | 83 | 18 | 2 | 72 |
fd n h1600 |
1600 | 80 | 20 | 2 | 92 |
3.5 inch double-density device files:
Name | Capacity | Cyl. | Sect. | Heads | Base |
KiB | minor # | ||||
fd n u360 |
360 | 80 | 9 | 1 | 12 |
fd n u720 |
720 | 80 | 9 | 2 | 16 |
fd n u800 |
800 | 80 | 10 | 2 | 120 |
fd n u1040 |
1040 | 80 | 13 | 2 | 84 |
fd n u1120 |
1120 | 80 | 14 | 2 | 88 |
3.5 inch high-density device files:
Name | Capacity | Cyl. | Sect. | Heads | Base |
KiB | minor # | ||||
fd n u360 |
360 | 40 | 9 | 2 | 12 |
fd n u720 |
720 | 80 | 9 | 2 | 16 |
fd n u820 |
820 | 82 | 10 | 2 | 52 |
fd n u830 |
830 | 83 | 10 | 2 | 68 |
fd n u1440 |
1440 | 80 | 18 | 2 | 28 |
fd n u1600 |
1600 | 80 | 20 | 2 | 124 |
fd n u1680 |
1680 | 80 | 21 | 2 | 44 |
fd n u1722 |
1722 | 82 | 21 | 2 | 60 |
fd n u1743 |
1743 | 83 | 21 | 2 | 76 |
fd n u1760 |
1760 | 80 | 22 | 2 | 96 |
fd n u1840 |
1840 | 80 | 23 | 2 | 116 |
fd n u1920 |
1920 | 80 | 24 | 2 | 100 |
3.5 inch extra-density device files:
Name | Capacity | Cyl. | Sect. | Heads | Base |
KiB | minor # | ||||
fd n u2880 |
2880 | 80 | 36 | 2 | 32 |
fd n CompaQ |
2880 | 80 | 36 | 2 | 36 |
fd n u3200 |
3200 | 80 | 40 | 2 | 104 |
fd n u3520 |
3520 | 80 | 44 | 2 | 108 |
fd n u3840 |
3840 | 80 | 48 | 2 | 112 |
DESCRIPTION
fd
special files access the
floppy disk drives in raw mode. The following ioctl(2) calls are
supported by fd
devices:
FDCLRPRM
-
clears the media information of a drive (geometry of disk in drive).
FDSETPRM
-
sets the media information of a drive. The media information will be lost when the media is changed.
FDDEFPRM
-
sets the media information of a drive (geometry of disk in drive). The media information will not be lost when the media is changed. This will disable autodetection. In order to reenable autodetection, you have to issue an
FDCLRPRM
. FDGETDRVTYP
-
returns the type of a drive (name parameter). For formats which work in several drive types,
FDGETDRVTYP
returns a name which is appropriate for the oldest drive type which supports this format. FDFLUSH
-
invalidates the buffer cache for the given drive.
FDSETMAXERRS
-
sets the error thresholds for reporting errors, aborting the operation, recalibrating, resetting, and reading sector by sector.
FDSETMAXERRS
-
gets the current error thresholds.
FDGETDRVTYP
-
gets the internal name of the drive.
FDWERRORCLR
-
clears the write error statistics.
FDWERRORGET
-
reads the write error statistics. These include the total number of write errors, the location and disk of the first write error, and the location and disk of the last write error. Disks are identified by a generation number which is incremented at (almost) each disk change.
FDTWADDLE
-
Switch the drive motor off for a few microseconds. This might be needed in order to access a disk whose sectors are too close together.
FDSETDRVPRM
-
sets various drive parameters.
FDGETDRVPRM
-
reads these parameters back.
FDGETDRVSTAT
-
gets the cached drive state (disk changed, write protected et al.)
FDPOLLDRVSTAT
-
polls the drive and return its state.
FDGETFDCSTAT
-
gets the floppy controller state.
FDRESET
-
resets the floppy controller under certain conditions.
FDRAWCMD
-
sends a raw command to the floppy controller.
For more precise information, consult also the
<
linux/fd.h
>
and <
linux/fdreg.h
>
include files, as well as the
floppycontrol(1) manual
page.
NOTES
The various formats permit reading and writing many types of disks. However, if a floppy is formatted with an inter-sector gap that is too small, performance may drop, to the point of needing a few seconds to access an entire track. To prevent this, use interleaved formats.
It is not possible to read floppies which are formatted using GCR (group code recording), which is used by Apple II and Macintosh computers (800k disks).
Reading floppies which are hard sectored (one hole per sector, with the index hole being a little skewed) is not supported. This used to be common with older 8-inch floppies.
COLOPHON
This page is part of release 5.04 of the Linux man-pages
project. A
description of the project, information about reporting bugs,
and the latest version of this page, can be found at
https://www.kernel.org/doc/man−pages/.
t Copyright (c) 1993 Michael Haardt (michaelcantor.informatik.rwth-aachen.de) and 1994,1995 Alain Knaff (Alain.Knaffimag.fr) %%%LICENSE_START(GPLv2+_DOC_FULL) This is free documentation; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The GNU General Public License_zsingle_quotesz_s references to object code and executables are to be interpreted as the output of any document formatting or typesetting system, including intermediate and printed output. This manual is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this manual; if not, see <http://www.gnu.org/licenses/>. %%%LICENSE_END Modified, Sun Feb 26 15:00:02 1995, faithcs.unc.edu |