FDCONTROL(8)
πΎ FDCONTROL(8) β the floppy driver whisperer, section 8 of the System Manager's Manual π
ok so bestie, buckle up, because we're talking about the System Manager's Manual today and this one is a whole vibe. It's called fdcontrol and it's your little remote control for how your floppy disk behaves at runtime. Yes, floppies. Yes, in this economy. Let's go. β¨
β¨ NAME β¨
fdcontrol β display and modify floppy disk parameters π¦
πΈ SYNOPSIS πΈ
fdcontrol [-F] [-d dbg] [-f fmt] [-s fmtstr] [-v] device
π DEPRECATION NOTICE π
Real talk first, because this matters: fdcontrol is deprecated and may not be present in FreeBSD 16.0 and later. So enjoy it while it's here, bestie. π
π DESCRIPTION π
The fdcontrol utility lets you modify the run-time behavior of the fdc(4) driver β but only for the device you name in device.
There are commands to query the current device density settings, to query the underlying device hardware as registered with the driver, to manipulate debugging levels, and to adjust the device density settings themselves. Important vibe check: every operation that messes with kernel settings is restricted to the superuser (enforced by the device driver itself), while all the inquiry requests only need read access to device. So you can peek as a normie, but you need the crown π to poke.
device should always be a full path name, e.g. /dev/fd0. Not a nickname, not an abbreviation. Full path. Periodt.
π Inquiry Commands π
If you run fdcontrol with none of the optional flags, it reports the drive type registered with the device driver. In its shortest form it just returns one single string describing the drive type β and the possible values are: β360Kβ, β1.2Mβ, β720Kβ, β1.44Mβ, β2.88Mβ, or βunknownβ. This form is primarily intended to be easily parsable by scripts, so it's giving "I was built for machines, not for you" π€.
Want some human-readable descriptive text instead? Add the -v flag and it gets chatty.
Add the -F flag and it reports the device's density settings in a form that's suitable as input to the -s fmtstr option (more on that below). And again, pair it with -v and you get extra text, including the total capacity of the density settings in kilobytes β such a flex. π
π οΈ Debug Control π οΈ
So the fdc(4) control utilities support two different ways to specify device density settings. Pick your fighter:
Form one: use -f fmt to specify the format of the medium in kilobytes. Depending on the underlying drive type, the value gets compared against a table of known commonly used device density settings for that drive, and if a match is found, those settings get used. Currently, these are the acceptable values for each respective drive type π
2.88M and 1.44M drives:
KB sectrac secsize ncyls speed heads flags
1721 21 2 (512) 82 500 2 MFM
1476 18 2 (512) 82 500 2 MFM
1440 18 2 (512) 80 500 2 MFM
1200 15 2 (512) 80 500 2 MFM
820 10 2 (512) 82 250 2 MFM
800 10 2 (512) 80 250 2 MFM
720 9 2 (512) 80 250 2 MFM
1.2M drives:
KB sectrac secsize ncyls speed heads flags
1200 15 2 (512) 80 500 2 MFM
1232 8 3 (1024) 77 500 2 MFM
1476 18 2 (512) 82 500 2 MFM
1440 18 2 (512) 80 500 2 MFM
1200 15 2 (512) 80 500 2 MFM
820 10 2 (512) 82 300 2 MFM
800 10 2 (512) 80 300 2 MFM
720 9 2 (512) 80 300 2 MFM
360 9 2 (512) 40 300 2 MFM,2STEP
640 8 2 (512) 80 300 2 MFM
720K drives:
KB sectrac secsize ncyls speed heads flags
720 9 2 (512) 80 250 2 MFM
360K drives:
KB sectrac secsize ncyls speed heads flags
360 9 2 (512) 40 250 2 MFM
Form two: specify a device density with -s fmtstr to spell out every parameter in detail. The fmtstr argument is a comma-separated list of values shaped like this:
sectrac,secsize,datalen,gap,ncyls,speed,heads,f_gap,f_inter,offs2,flags
Here's what each parameter actually means, no gatekeeping π
sectracβ the number of sectors per track.secsizeβ the sector size code.0= 128 bytes (or less),1= 256 bytes,2= 512 bytes,3= 1024 bytes.datalenβ the actual sector size if the size code is0, or the (ignored) value0xFFfor larger size codes.gapβ the length of the gap 3 parameter for read/write operations.ncylsβ the number of cylinders.speedβ the transfer speed in kilobytes per second. Can be250,300,500, or1000, but each drive type only supports a subset of these values. Know your limits, bestie.headsβ the number of heads.f_gapβ the length of the gap 3 when formatting media.f_interβ the sector interleave to be applied when formatting.0means no interleave,1means 1:1 etc.offs2β the offset of the sector numbers on side 2 (i.e., head number1). Normally, sector numbering on both sides starts with1.flagsβ a list from one of these flag values:+mfmβ use MFM encoding.-mfmβ use FM (single-density) encoding.+2stepβ use 2 steps per each cylinder (for accessing 40-cylinder media in 80-cylinder drives).-2stepβ do not use 2 steps per cylinder, i.e., access each physical cylinder of the drive.+perpendβ use perpendicular recording (for 2.88 MB media, currently not supported).-perpendβ use longitudinal recording.
For any missing parameter, the current value will be used, so you only have to specify the actual changes. Which is so convenient of it. π«Ά But heads up: to turn off a flag bit (like +mfm, which is the default for all drive types), you must explicitly use the form with a leading minus sign. No silent unsetting, you have to say it out loud.
π EXAMPLES π
A simple inquiry about the drive type. She's short, she's sweet, she's parseable:
$ fdcontrol /dev/fd0
1.44M
Same as above, but with verbose output. Note that the result is about the drive type, as opposed to a device density, so it is independent from the actual subdevice being used for device:
$ fdcontrol -v /dev/fd0
/dev/fd0: 1.44M drive (3.5" high-density)
Inquiry about the density settings:
$ fdcontrol -F /dev/fd0
18,512,0xff,0x1b,80,500,2,0x6c,1,0,+mfm
The verbose flag makes this human readable π :
/dev/fd0: 1440 KB media type
Format: 18,512,0xff,0x1b,80,500,2,0x6c,1,0,+mfm
Sector size: 512
Sectors/track: 18
Heads/cylinder: 2
Cylinders/disk: 80
Transfer rate: 500 kbps
Sector gap: 27
Format gap: 108
Interleave: 1
Side offset: 0
Flags <MFM>
As indicated, trailing commas in the parameter list may be omitted. Yes queen, leniency. π
In order to access archaic 160 KB single-density (FM encoded) 5.25 media in a modern 1.2M drive, something like the following definition would be needed. (Note that not all controller hardware is actually capable of handling FM encoding at all β so this is a maybe slay, depending on your hardware.)
# fdcontrol -s 16,128,0x80,0x2,40,300,,0x10,,,-mfm,+2step /dev/fd1.1
It is still possible to hook up 8" drives to most modern floppy controllers, given the right cable magic. (On PC hardware, tell the BIOS that it is a 5.25" drive.) The classical 128/26/2/77 format can be read with this entry:
fdcontrol -s 26,128,0x80,0x2,77,500,2,0x10,,,-mfm /dev/fd0
π¦ SEE ALSO π¦
β HISTORY β
The fdcontrol utility appeared in FreeBSD 2.0, and was vastly overhauled in FreeBSD 5.0. A glow-up for the ages, honestly. β¨
π AUTHORS π
The program and this man page was contributed by JΓΆrg Wunsch, Dresden. Iconic of him, fr fr. π
ok that's the whole page, bestie β every flag, every table row, every byte of detail, all intact. no cap. π«Ά
this page came from the Debian edition of the manual, dated November 16, 2025 β mwah, thanks for reading, ilysm, go format a floppy π
π¦ where this page comes from
- freebsd 15.1: base 15.1
- Copyright (C) 1994, 2001 by Joerg Wunsch, Dresden
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms