fd(4)
๐พ fd(4) โ floppy disk device ๐พ
okay bestie, so this is fd from section 4 (kernel interfaces), and it's literally all about floppy disk devices. yes, the little plasticky square ones. we're going retro. ๐
๐ธ NAME ๐ธ
fd โ floppy disk device. that's it, that's the name, iconic.
โ๏ธ CONFIGURATION โ๏ธ
Floppy drives are block devices with major number 2. โจ
Typically they're owned by root:floppy (so, user root, group floppy), and they've got either mode 0660 (access checking happens via group membership) or mode 0666 (literally everybody has access, the audacity ๐
).
The minor numbers are the ones doing the heavy lifting here โ they encode the device type, the drive number, and the controller number. no cap. For every device type (and "device type" means a combination of density and track count) there's a base minor number. Then to that base number you add the drive's number on its controller, plus 128 if that drive is on the secondary controller. math but make it floppy. ๐งฎ
In all the device tables below, n represents the drive number.
โ ๏ธ WARNING, and I need you to actually read this one: if you use formats with more tracks than your drive supports, 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're not sure, do not create device entries for those formats, so as to prevent their usage. protect your hardware, bestie, she's fragile ๐ฅบ
๐ฆ Drive-independent device files ๐ฆ
these ones automatically detect the media format and capacity. main character behavior fr:
Name Base minor #
โโโโโโโโโโโโโโโ
fdn 0
๐ 5.25 inch double-density device files ๐
Name Capacity Cyl. Sect. Heads Base
KiB minor #
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
fdnd360 360 40 9 2 4
๐ฅ 5.25 inch high-density device files ๐ฅ
Name Capacity Cyl. Sect. Heads Base
KiB minor #
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
fdnh360 360 40 9 2 20
fdnh410 410 41 10 2 48
fdnh420 420 42 10 2 64
fdnh720 720 80 9 2 24
fdnh880 880 80 11 2 80
fdnh1200 1200 80 15 2 8
fdnh1440 1440 80 18 2 40
fdnh1476 1476 82 18 2 56
fdnh1494 1494 83 18 2 72
fdnh1600 1600 80 20 2 92
๐ 3.5 inch double-density device files ๐
Name Capacity Cyl. Sect. Heads Base
KiB minor #
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
fdnu360 360 80 9 1 12
fdnu720 720 80 9 2 16
fdnu800 800 80 10 2 120
fdnu1040 1040 80 13 2 84
fdnu1120 1120 80 14 2 88
๐ 3.5 inch high-density device files ๐
Name Capacity Cyl. Sect. Heads Base
KiB minor #
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
fdnu360 360 40 9 2 12
fdnu720 720 80 9 2 16
fdnu820 820 82 10 2 52
fdnu830 830 83 10 2 68
fdnu1440 1440 80 18 2 28
fdnu1600 1600 80 20 2 124
fdnu1680 1680 80 21 2 44
fdnu1722 1722 82 21 2 60
fdnu1743 1743 83 21 2 76
fdnu1760 1760 80 22 2 96
fdnu1840 1840 80 23 2 116
fdnu1920 1920 80 24 2 100
๐ 3.5 inch extra-density device files ๐
slay, look at that capacity:
Name Capacity Cyl. Sect. Heads Base
KiB minor #
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
fdnu2880 2880 80 36 2 32
fdnCompaQ 2880 80 36 2 36
fdnu3200 3200 80 40 2 104
fdnu3520 3520 80 44 2 108
fdnu3840 3840 80 48 2 112
โจ DESCRIPTION โจ
fd special files access the floppy disk drives in raw mode. and the following ioctl(2) calls are supported by fd devices. let's get into it:
FDCLRPRMโ clears the media information of a drive (aka the geometry of the disk in the drive). bye bye disk info ๐ซถFDSETPRMโ sets the media information of a drive. heads up: the media information will be lost when the media is changed. it's giving temporary.FDDEFPRMโ sets the media information of a drive (geometry of disk in drive), and this time the media information will not be lost when the media is changed. but plot twist: this disables autodetection. if you want autodetection back, you have to issue anFDCLRPRM. you gotta commit to the bit. ๐FDGETDRVTYPโ returns the type of a drive (thenameparameter). for formats which work in several drive types,FDGETDRVTYPreturns a name which is appropriate for the oldest drive type which supports this format. respect your elders. ๐ตFDFLUSHโ invalidates the buffer cache for the given drive. flush it, periodt. ๐ฝFDSETMAXERRSโ sets the error thresholds for reporting errors, aborting the operation, recalibrating, resetting, and reading sector by sector.FDSETMAXERRSโ gets the current error thresholds. (yes, the manpage really does sayFDSETMAXERRShere again. i'm just the messenger, bestie, i keep every detail exactly as it is ๐ญ)FDGETDRVTYPโ gets the internal name of the drive.FDWERRORCLRโ clears the write error statistics. fresh start energy โจ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. almost. ๐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. small nap, big difference ๐ดFDSETDRVPRMโ sets various drive parameters.FDGETDRVPRMโ reads these parameters back. reciprocity! ๐FDGETDRVSTATโ gets the cached drive state (disk changed, write protected et al.)FDPOLLDRVSTATโ polls the drive and return its state. (going to the source directly, love that for us)FDGETFDCSTATโ gets the floppy controller state.FDRESETโ resets the floppy controller under certain conditions. certain conditions. mysterious. ๐ซ๏ธFDRAWCMDโ sends a raw command to the floppy controller. raw. unfiltered. no notes. ๐ฅ
For more precise information, consult also the <linux/fd.h> and <linux/fdreg.h> include files, as well as the floppycontrol(1) manual page. iykyk ๐
๐ FILES ๐
/dev/fd*
๐ NOTES ๐
The various formats permit reading and writing many types of disks. however โ and this is a big 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. a few seconds!! to access one (1) track!! to prevent this, use interleaved formats. consider yourself warned. ๐
It is not possible to read floppies which are formatted using GCR (group code recording), which is used by Apple II and Macintosh computers (the 800k disks). so those are just cute little bricks to us, unfortunately. ๐
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. ancient history, bestie, we don't do that here. ๐๏ธ
๐ SEE ALSO ๐
chown(1), floppycontrol(1), getfdprm(1), mknod(1), superformat(1), mount(8), setfdprm(8)
and that's the whole page, bestie!! ๐ this was fd(4) from the Linux man-pages, version 6.20, dated 2026-02-08. go forth and format responsibly, don't give your drive more tracks than it can handle, and remember: no warranty is given for that. mwah ๐ซถโจ๐
๐ฆ where this page comes from
- arch rolling: man-pages 6.20-1 ยท BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages 6.20
- ๐ the page's license: GPL-2.0-or-later
- Copyright 1994-1995, Alain Knaff <Alain.Knaff@imag.fr>
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms