Friday, June 12, 2009

No Floppy? No!

When was the last time you used the floppy disk drive on your box? Oh, you don't have one? Well, I do have a floppy disk drive on my aging laptop. And I'm quite sure that the only use I had for it was when I first installed Debian on it.

Yup! I actually installed Debian/Etch from floppies! that was my only option at the time, because the optical drive on this box is busted, and it doesn't boot from USB. As I said, it's an old box. I've since upgraded to Debian/Lenny and recently to Squeeze, and it seems that installation from floppies is no longer supported. It's kinda sad.

Now, you'd think that if you don't need something it's unlikely to cause any trouble. Well, think again.

Lately, I tried to launch my virtual Window$ PC, after more than a month of not using it, in an attempt to open a Word document inside Micro$oft Word. I was presented with an error message:
The floppy controller cannot attach to the floppy drive (VERR_FILE_NOT_FOUND).
Unknown error creating VM (VERR_FILE_NOT_FOUND)

This was something new. I assumed that the problem was with VirtualBox. And since I only read the second line in the error message at first, I found myself going through the VirtualBox documentation, rummaging through its various directories and files and methodically going through all of its configuration options and menus. No luck.

Finally, after more than an hour of futzing around, I got back to the error message and realized my original sin. I then searched for the error message on the Net, and found a short thread on, that suggested that the floppy disk drive should be disabled in the machine settings.

I tried it and it did the trick - I managed to launch my virtual Window$ PC and finish my original business.

But it continued to bother me. The floppy drive exists, so maybe it's just a permissions issue? I tried
ls -l /dev/fd0
and was surprised to find that it doesn't actually exist. WTF?

Time for some more Net searching. I found a thread at the Debian Forums site, and another thread at, which seemed rather relevant. Both suggested that the floppy module (device driver) was not loaded, that this is intentional (since floppy disk drives are pretty rare), and that manually loading the floppy module would fix the problem.

I tried
lsmod | grep floppy
as root, and got nothing. Indeed, the floppy module wasn't loaded. I manually loaded the module
modprobe floppy
(again as root) and verified that /dev/fd0 appeared. I then re-enabled the physical floppy drive in VirtualBox, and was able to start the Window$ virtual PC.

Finally, I added the module to /etc/modules in order to ensure that it'll be loaded on the next reboot:
echo floppy >> /etc/modules

Still, I wasn't satisfied. The floppy disk drive never gave me trouble before, so this must be a recent regression. I hate it when things break down like this. I hate it even more when all I can do about it is a workaround and not a solution. But I'm making progress, and am willing to accept workarounds. Sometimes.

In any case, I finally managed to find the root cause of the floppy failure. It's described in Debian bug #521520.

I'm now curious to know if the floppy disk drive works at all, but I don't have any floppy disk to test it with...

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.