Floppy disk problem

Yes, yes; I know! I ought to join the 20th Century. But apart from the obvious advantage of floppy disks (impossible to lose, unlike USB sticks) they are rather mechanical and subject to all that entails. Anyway; I have some files that I want to recover.
I am confident that there is no mechanical problem because:

[ol]- I have checked it’s physical installation (honestly!).

  • All four desktops on which I have installed Ubuntu have non-working floppy drives that were functional in XP before the installation. [/ol]

I attach the output from the sudo lshw -C disk command that lists the DVD and HDD but no floppy, so it is clearly not being recognised – unless there is another command for listing it.
I am running Ubuntu V12.
Any ideas? (Actually, I haven’t yet checked that there is power on the power leads)

The kernel drivers might not be running:

sudo modprobe floppy

Then try with disk inserted

Done that. Then when I right-clicked on Floppy Drive in Nautilus, there was a ‘click’ from the drive, but no listing.
I have since discovered some udisks commands and I attach the outputs from those which might help.

Try adding your username in the floppy group:

sudo adduser $USER floppy

DON’T DO THAT

My mistake … it’s “usermod” that needs the -aG (a for append) option :-[

It seems udisks 1.x is broken in Ubuntu, try:

udisks --mount /dev/fd0

after addding yourself to the floppy group and rebooting.

Quite why 12.04 is still using udisks 1.x is beyond me … pretty much all other distros are now using udisks 2.x

The adduser command had no effect:
keith@desktop-1:~$ sudo adduser $USER floppy
[sudo] password for keith:
Adding user keith' to group floppy’ …
Adding user keith to group floppy
Done.

…but the udisks command:
keith@desktop-1:~$ udisks --mount /dev/fd0
Mounted /org/freedesktop/UDisks/devices/fd0 at /media/floppy0

produced the attached warning that I had once before. But still no response in Nautilus.

[EDIT] Ah! didn’t reboot…

Sadly, still no response in Nautilus.
Can I upgrade to udisks 2.x?

2 secs I think I’ve found a solution … but first, what’s the output from:

groups

keith@desktop-1:~$ groups
keith adm cdrom floppy sudo dip plugdev lpadmin sambashare

Try this …

Open /lib/udev/rules.d/80-udisks.rules for editing:

sudo gedit /lib/udev/rules.d/80-udisks.rules

Find the section that reads:-

# 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"

And change the two 1’s to 0’s … so it reads:-

# PC floppy drives
#
KERNEL=="fd*", ENV{ID_DRIVE_FLOPPY}="0"

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

SAVE the file

Now restart udev by running:

sudo invoke-rc.d udev restart

or

sudo service udev restart

(or reboot)

Does the floppy work now ?


Source:
http://www.securitybeacon.com/?p=1110

Ran the commands but nothing, then rebooted and Voila! The floppy works! (on read, anyway)
I shall try the same trick on my second desktop and let you know the result.

Thank you so much.

Great :slight_smile:

Does that mean you CAN’T write to the floppy … or just that you haven’t tried it yet ?

[EDIT]

I’m wondering if it would be best to create a custom udev rule with a higher number, such as 81-floppy.rules and make the changes in there … so any updates that revert 80-udisks.rules to it original state won’t stop the floppy drive from working.

Or you could just do the above again if the floppy ever stops working.

Well - almost great.
I can’t eject the disk safely, only “unmount”, which crashes Nautilus.
If I try just inserting another disk, it doesn’t recognise it.
I can copy a file to it, but there’s no way of exiting without crashing Nautilus, and the file is not there when I restart.
I can at least recover my old files, which was the object of the exercise, but it would be nice to get it working properly - or am I being too demanding?

Sorry: I don’t understand your final words - could you elaborate?

OK … another option seems to be to DOWNgrade udisks.

Can you post the output from:

uname -a

keith@desktop-1:~$ uname -a
Linux desktop-1 3.2.0-37-generic-pae #58-Ubuntu SMP Thu Jan 24 15:51:02 UTC 2013 i686 i686 i386 GNU/Linux

OK, run these commands in sequence (no need to change those 0’s back to 1’s as 80-udisks.rules will get replaced anyway):

mkdir ~/udisks-downgrade

then

cd ~/udisks-downgrade

then

wget https://launchpad.net/ubuntu/+source/udisks/1.0.1-1build1/+build/1689624/+files/udisks_1.0.1-1build1_i386.deb

then

sudo dpkg -i *.deb

Now REBOOT and test the floppy drive.

DO NOT run any updates, as if it works we need to lock the udisks version in Synaptic first … just check if it works and let me know.

The command:
keith@desktop-1:~/udisks-downgrade$ sudo dpkg -i *.deb yielded an error:
dpkg: error processing *.deb (–install):
cannot access archive: No such file or directory
Errors were encountered while processing:
*.deb

…and the same problems are there.

Sorry that was my mistake … I created the udisks-downgrade directory as root … fixed in the above posting now.

So run:

sudo rm -r ~/udisks-downgrade

then do my last posting again.

There is no response at all from the floppy except the warning message, attached