Finally! A fix for an annoying floppy disk bug in Ubuntu / Debian Linux – Updated

Posted · 31 Comments

Despite what you may think, floppy disks aren’t dead, at least yet! I still use them, as do millions of others world-wide.

Why, in the year 2011, would anyone still be using floppy disks? In my case, I have a large investment in older test equipment (e.g. HP/Agilent 8510C microwave vector network analyser) that use them as a primary means of storing test data. Test instruments like these cost several hundred thousand dollars and have service lives that last decades. As a result they are not retired nearly as quickly as computers and cell phones which are obsolete in a matter of only a few years. As a result, there are a lot of engineers and technicians still using floppies.

Through my use of floppies, I encountered an annoying bug in recent versions of Ubuntu Linux. I believe it also affects other recent Linux distributions as well. The bug was introduced during an upgrade of a software package known as udisks, which, among other things, is used for probing hardware and detecting which disks are connected to the system. In short, the developers were aiming to cut boot times with new computers (that don’t use floppies) but inadvertently broke the automatic detection of floppy drives on systems that do have them. As a result, the desktop Floppy Drive icons in Ubuntu / Debian Gnome desktops were rendered useless for graphically mounting and manipulating data on floppy disks. See Bug #441835 on Launchpad for all the details.

While there was a command line work around available, I and many others have hoped for a fix. This morning I believe the fix finally arrived. According to Post #344 on Launchpad:

Edit “/lib/udev/rules.d/80-udisks.rules” and search for the lines
——-——-——-——-——-——-——-——-——-——-——-——-——-——-——-——-——-——-
# PC floppy drives
#
KERNEL==”fd*”, ENV{ID_DRIVE_FLOPPY}=”1″

# USB floppy drives
#
SUBSYSTEMS==”usb”, ATTRS{bInterfaceClass}==”08″, ATTRS{bInterfaceSubClass}==”04″, ENV{ID_DRIVE_FLOPPY}=”1″
——-——-——-——-——-——-——-——-——-——-——-——-——-——-——-——-——-——-

Replace those “1″ (ones) with “0″ (zeros). That’s all the magic.
Now restart the udev daemon by typing “invoke-rc.d udev restart”

You’re done. It should work now.

I tried this fix on two of my Ubuntu 11.04 machines this morning. One uses a motherboard based floppy controller. The other uses an external USB floppy drive. In both instances the desktop floppy drive icons now seem to work for mounting and unmounting the floppy disks. I have posted my results to Launchpad but have yet to hear confirmation from others. Let me emphasise that this is NOT AN OFFICIAL FIX so don’t blame me or any of the other contributors to Launchpad if it doesn’t work for you! If you have been affected by this bug you should continue to monitor Launchpad until a final resolution is made. Given how easy this fix seems, I’m still a bit wary to think of it as a permanent fix. It is certainly progress in the right direction though!

Update May 8, 2012

I have confirmed that the above fix also works on XUbuntu 12.04. If you attempt to restart the udev daemon using the above instructions you will get a message that udev has been converted to an upstart job. Just follow the directions and you should be fine.

 

31 Responses to "Finally! A fix for an annoying floppy disk bug in Ubuntu / Debian Linux – Updated"
  1. Le says:

    This worked cool for 1 cycle then splat. I’m using Ubuntu 11.10 – a disastrous upgrade IMO.
    When I tried your fix I was dorking with the mount manager simultaneously – unsure of the interaction. lsusb is always correct but I can’t get the drive to mount again – many permutations tried but in an undisciplined fashion.
    Please, please, please, developers cease deprecating with such whim.

    • John Ross says:

      Thanks for the info. Sorry to hear it’s not working for you. I’ve installed 11.10 in a VM but not on hardware yet so so I can’t comment on the floppy fix for that version of the OS. I’ll try a fresh install sometime this week and get back with you.

  2. to says:

    I enjoy, result in I found exactly what I used to be having a look for. You’ve ended my four day lengthy hunt! God Bless you man. Have a nice day. Bye

  3. Didn’t work for me in Ubuntu 11.10. The disk is recognized in Windows 7 on the same machine, as I have a dual boot, so it can’t be a hardware problem.

  4. WacoJohn says:

    It ALMOST worked for me. I am a Linux newbie .. but here is how it went for me:

    Xubuntu 11.10.

    I edited /lib/udev/rules.d/80.udisks.rules and change the “1″ (ones) to zeros:

    # PC floppy drives
    #
    KERNEL==”fd*”, ENV{ID_DRIVE_FLOPPY}=”1″ <<<<<<<<<<<<

    # USB floppy drives
    #
    SUBSYSTEMS=="usb", ATTRS{bInterfaceClass}=="08", ATTRS{bInterfaceSubClass}=="04", ENV{ID_DRIVE_FLOPPY}="1" <<<<<<<<<<<

    Rebooted and inserted the diskette, opened terminal and mount:

    mount /dev/fd0

    and to my delight, a beautiful floppy disk icon appeared on the desktop.

    Now .. the problem(s)

    If I left click on the icon … it disappears … nothing else happens. I have to mount again to get the icon. If I mouse over, balloon says REMOVABLE VOLUME NOT MOUNTED YET (but I just mounted it in TERMINAL).

    If I RIGHT click on it, the choices are "OPEN", "MOUNT VOLUME', and "APPLICATIONS'. If I click OPEN, drive light comes on for a few seconds and icon disappears. Go to terminal and attempt another mount (to get the icon back) and it says already mounted. I do a umount .. mount … and icon is back.

    Right click, left click MOUNT and icon disappears.

    umount … mount …. icon is back. Open FILE MANAGER. FLOPPY DISK is right there. Same scenario there .. Right click "OPEN, OPEN IN NEW WINDOW, MOUNT VOLUME, EJECT VOLUME". Left click on any of those and FLOPPY DISK disappears from File Manager AND off DESKTOP. Cannot access diskette from File manager or desktop icon.

    umount … mount … icon and item in File Manager comes back.

    Open MOUSEPAD. click to open a file and within 'PLACES' is FLOPPY DISK. Click on it … it disappears but is replaced with floppy0 and Floppy Drive (as if this could not get any more CONFUSING).

    Click on Floppy Drive and it disappears, leaving only FLOPPY DISK again. Click on that, it disappears, floppy0 and Floppy Drive come back .. this time click floppy0 and damned if the files on the diskette list.

    Sooo, in a very goofy way, MOUSPAD can literally access the diskette .. nothing else (I have tried) will.

    One more thing before I forget .. when I opened 80.udisks.rules comment at the top of it

    # Do not edit this file, it will be overwritten on updates

    which is pretty discerning.

    I have a post up in the UBUNTU forums .. and hoping to get a (simple) answer. Happy Holidays to all.

  5. Ernesto says:

    It works for me; using Ubuntu 11.10

  6. Jack says:

    finally my usb floppy Works on 10.4 Lucid LTS
    Thank You!
    Unfortunately I get a similar bug from my DVD drive when I put a disc in it does not like.
    I have been disappointed with this so called LTS since the day it was released and wish I never left 8.04

    • JR says:

      Glad it works for you! I’m riding 10.04 LTS and 11.04 with the classic desktop right now. I’m going to evaluate 12.04 LTS beta soon. If it doesn’t measure up I’m thinking of jumping from the Ubuntu ship. Mint and Debian seem like reasonable options. I’ll keep you posted!

  7. Hank K says:

    It works for me on an old Dell C800 laptop that I resuscitated using Ubuntu 11.0. However to make it work, I right click on the diskette icon and select “Detect Media”. It then opens a new diskette icon from which I work with the diskette. Unrelated to this, I first had to modify the xorg.conf file to make the display on my C800 work properly. I’m a Linux newbie, so I’m delighted to find so much Linux information on the internet.

  8. Jim W says:

    Thanks for the tip. I had the same issue on my Zenwalk 7.0 running Gnome. I used your steps and all is good now with my USB floppy drive.

  9. Taylor Shin says:

    It seems working for me!! I spent like 5 hours to get this working…
    Anyway, I’ve made a custom rules file at /etc/udev/rules.d to prevent further hiccup caused by update. It seems the custom file overrides the original file defined in /lib/udev, if the heading # is larger.

    Thanks anyway.

  10. Tracy says:

    “Now restart the udev daemon by typing “invoke-rc.d udev restart”

    Type this…where?

    n00b

    • JR says:

      Type it in a terminal window. Unless you are logged in as root you need to use sudo as below:

      sudo invoke-rc.d udev restart

      After you hit enter it will prompt for your password. Hope that helps!

  11. Vijay says:

    I am not able to edit the 80-udisks.rules file as it is opening in read-only mode. What to do?

  12. smrtg says:

    Yep, it works, thank you very much! Ubuntu 12.04, old m/b Asus P5L-MX.
    Right, should use
    sudo service udev restart

  13. Knighthawk36 says:

    I realize this is a really old (almost a year) post, but I never run across problem until trying to solve a major problem that I have been having with my computer, but this worked famously for me on Linux Mint. Thank you so much for the advice!

  14. tenaz says:

    Nice fix! Should have been included in the updates long time ago.

  15. Mark says:

    I am a newbie to Ubuntu and am using Xubuntu 12.04 LTS. I have edited the 80-udisks.rules fileand tried to restart the daemon with the following output.

    markeal@markeal-Dimension-8250:~$ gedit /lib/udev/rules.d/80-udisks.rules
    markeal@markeal-Dimension-8250:~$ sudo invoke-rc.d udev restart
    Rather than invoking init scripts through /etc/init.d, use the service(8)
    utility, e.g. service udev restart

    Since the script you are attempting to invoke has been converted to an
    Upstart job, you may also use the stop(8) and then start(8) utilities,
    e.g. stop udev ; start udev. The restart(8) utility is also available.
    udev stop/waiting
    udev start/running, process 2251
    markeal@markeal-Dimension-8250:~$

    markeal@markeal-Dimension-8250:~$ service udev restart
    stop: Rejected send message, 1 matched rules; type=”method_call”, sender=”:1.50″ (uid=1000 pid=2489 comm=”stop udev “) interface=”com.ubuntu.Upstart0_6.Job” member=”Stop” error name=”(unset)” requested_reply=”0″ destination=”com.ubuntu.Upstart” (uid=0 pid=1 comm=”/sbin/init”)
    start: Rejected send message, 1 matched rules; type=”method_call”, sender=”:1.51″ (uid=1000 pid=2486 comm=”start udev “) interface=”com.ubuntu.Upstart0_6.Job” member=”Start” error name=”(unset)” requested_reply=”0″ destination=”com.ubuntu.Upstart” (uid=0 pid=1 comm=”/sbin/init”)
    markeal@markeal-Dimension-8250:~$

    The system has been restarted.

  16. Nice fix! Had older desktop motherboard crash and required a bios restore using floppy drive but my Ubuntu 12.04 laptop would not recognize my dell usb floppy drive to dowload a new bios to it…until these steps save the day.

  17. Honore says:

    I applied the fix but it didn’t work on my xubuntu 12.04.
    I have also winXP and Lubuntu 13.04 on the same desktop PC and I how no problem with the floppy drive on these two OSs.
    What shall I do? Thanks.

    • JR says:

      I’m sorry to hear that! While the fix has worked on all the machines I’ve tested with xubuntu 12.04 there is no guarantee that it will work on any particular system. I would recommend that you go back and check your work very carefully. If you’re convinced that you did it all correctly and it still doesn’t work then I’m at a loss on what the problem might be. You may just have to accept that the floppy isn’t going to work for you under 12.04.

      I do find it interesting however that Lubuntu 13.04 has no problems with the floppy. That’s good news! Hopefully we won’t need to hack something as basic as a floppy drive in future versions of the OS.

  18. Honore says:

    Thanks a lot for all your efforts. Regards.

  19. Rene Pit says:

    Thanks very much for the fix. It works fine with ubuntu 12.04 here. I had to copy a load of 3.5″ floppies with documentation on it, using a Dell usb floppy drive, from my previous laptop.

Leave a Reply