Longstanding bug in Linux kernel floppy handling fixed
Good news, everyone! Er, someone. Anyone? Bueller?
Linux kernel 6.2 should contain fixes for some problems handling floppy disks, a move which shows that someone somewhere is still using them.
This isn't the only such fix in recent years. As a series of articles on Phoronix details, there has been a slow but steady flow of fixes for the kernel's handling of floppy drives since at least kernel 5.17, as The Reg mentioned when it came out. Which implies that there are still people actively using floppy diskettes on machines with fairly current Linux kernels on them. If you are one of them, do let us know.
Back in July 2016, SUSE kernel developer Jiři Kosina submitted a patch. The problem arose because this change broke something else and later got reverted, and so the problem hung around.
In July last year, he sent in a new patch that fixed it again for the 5.12 kernel, and was later back-ported to 5.10, an LTS version, and again into kernel 5.15 – another an LTS version, and the one you're running today if you're on the current Ubuntu LTS release, or something built from it such as Linux Mint 21.
- Microsoft realizes it hasn't updated list of banned dodgy Windows 10 drivers in years
- 'Last man standing in the floppy disk business' reckons his company has 4 years left
- 512 disk drives later, Floppotron computer hardware orchestra hits v3.0
- Boffins demonstrate a different kind of floppy disk: A legless robot that hops along a surface
Yet another fix was new for kernel 5.17, a year ago: this one fixed a situation where the computer is trying to read from a damaged floppy and the user removes the diskette. That worked, but it exposed a new problem, and the somewhat brute-force response to this for kernel 5.18 was just to disable raw access to the floppy disk controller.
Normally you don't need that to read and write to diskettes: it's only for things like handling floppies with formats other than the basic PC- and Mac- 1.4MB "high-density" format, or handling copy-protected disks, and so on. This sort of stuff won't work if you use a USB floppy drive, anyway: their embedded controllers only understand standard formats, and so can't handle classic Mac or Amiga double-density disks from the 1980s.
Now, in December 2022, a new patch for the forthcoming kernel 6.2 fixes a memory leak that dates back to 5.11 or before.
Floppy diskettes seem to be like the Motorola 680x0 CPU architecture: a 1970s technology that just won't die. The odd thing is that they've survived so long despite not evolving.
The "high density" 1.4MB 3½" disk format was defined by the IBM PS/2 range in 1987. By 1990, this evolved into "extra-high density": 2.8MB floppies, used by IBM in the PS/2 Model 57, and more visibly, in the NeXTcube and NeXTstation, the 68040-based successors to the original NeXT Computer… but 2.8MB disks never took off on generic PCs. Through the 1990s, the floppy disk gradually evolved, with 21MB "floptical" disks, then 128MB SuperDisks, then Sony's 200MB HiFD.
None of these ever went mainstream: instead, the PC industry clung on to "DSHD" floppies – two sides, 80 tracks, 18 sectors per track – and it seems in some places that it still does. Perhaps it's a good thing for all of us. If later floppy disk tech had caught on, maybe they would have resisted the rise of writable CD-Rs, then rewritables, then DVD-R and DVD+R, and maybe we'd still have been using them when USB2 thumb drives finally came along. ®