Author Topic: Floppy disk problem  (Read 2461 times)

0 Members and 1 Guest are viewing this topic.

Offline Keith

  • Sr. Member
  • ****
  • Posts: 456
  • Karma: 10
  • Gender: Male
  • Linux Novice
    • View Profile
    • Awards
Floppy disk problem
« on: February 02, 2013, 12:37:25 pm »
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:
  • 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.
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)

Offline SeZo

  • Hero Member
  • *****
  • Posts: 1505
  • Karma: 119
  • Gender: Male
    • View Profile
    • Awards
Re: Floppy disk problem
« Reply #1 on: February 02, 2013, 12:46:31 pm »
The kernel drivers might not be running:
Code: [Select]
sudo modprobe floppy
Then try with disk inserted

Offline Keith

  • Sr. Member
  • ****
  • Posts: 456
  • Karma: 10
  • Gender: Male
  • Linux Novice
    • View Profile
    • Awards
Re: Floppy disk problem
« Reply #2 on: February 02, 2013, 12:53:27 pm »
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.

Offline SeZo

  • Hero Member
  • *****
  • Posts: 1505
  • Karma: 119
  • Gender: Male
    • View Profile
    • Awards
Re: Floppy disk problem
« Reply #3 on: February 02, 2013, 01:00:52 pm »
Try adding your username in the floppy group:
Code: [Select]
sudo adduser $USER floppy

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 13592
  • Karma: 339
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Floppy disk problem
« Reply #4 on: February 02, 2013, 01:03:22 pm »
DON'T DO THAT
WARNING: You are logged into reality as 'root'

logging in as 'insane' is the only safe option.

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 13592
  • Karma: 339
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Floppy disk problem
« Reply #5 on: February 02, 2013, 01:06:03 pm »
My mistake .. it's "usermod" that needs the -aG (a for append) option  :-[

It seems udisks 1.x is broken in Ubuntu, try:
Code: [Select]
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

--
« Last Edit: February 02, 2013, 01:08:51 pm by Mark Greaves (PCNetSpec) »
WARNING: You are logged into reality as 'root'

logging in as 'insane' is the only safe option.

Offline Keith

  • Sr. Member
  • ****
  • Posts: 456
  • Karma: 10
  • Gender: Male
  • Linux Novice
    • View Profile
    • Awards
Re: Floppy disk problem
« Reply #6 on: February 02, 2013, 01:23:12 pm »
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.......

Offline Keith

  • Sr. Member
  • ****
  • Posts: 456
  • Karma: 10
  • Gender: Male
  • Linux Novice
    • View Profile
    • Awards
Re: Floppy disk problem
« Reply #7 on: February 02, 2013, 01:28:22 pm »
Sadly, still no response in Nautilus.
Can I upgrade to udisks 2.x?

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 13592
  • Karma: 339
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Floppy disk problem
« Reply #8 on: February 02, 2013, 01:32:37 pm »
2 secs I think I've found a solution .. but first, what's the output from:
Code: [Select]
groups
WARNING: You are logged into reality as 'root'

logging in as 'insane' is the only safe option.

Offline Keith

  • Sr. Member
  • ****
  • Posts: 456
  • Karma: 10
  • Gender: Male
  • Linux Novice
    • View Profile
    • Awards
Re: Floppy disk problem
« Reply #9 on: February 02, 2013, 01:42:11 pm »
keith@desktop-1:~$ groups
keith adm cdrom floppy sudo dip plugdev lpadmin sambashare

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 13592
  • Karma: 339
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Floppy disk problem
« Reply #10 on: February 02, 2013, 01:42:46 pm »
Try this ..

Open /lib/udev/rules.d/80-udisks.rules for editing:
Code: [Select]
sudo gedit /lib/udev/rules.d/80-udisks.rules

Find the section that reads:-

Code: [Select]
# 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:-

Code: [Select]
# 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:
Code: [Select]
sudo invoke-rc.d udev restart
or
Code: [Select]
sudo service udev restart
(or reboot)

Does the floppy work now ?



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

--
« Last Edit: February 02, 2013, 01:51:58 pm by Mark Greaves (PCNetSpec) »
WARNING: You are logged into reality as 'root'

logging in as 'insane' is the only safe option.

Offline Keith

  • Sr. Member
  • ****
  • Posts: 456
  • Karma: 10
  • Gender: Male
  • Linux Novice
    • View Profile
    • Awards
Re: Floppy disk problem
« Reply #11 on: February 02, 2013, 02:01:21 pm »
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.

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 13592
  • Karma: 339
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Floppy disk problem
« Reply #12 on: February 02, 2013, 02:02:17 pm »
Great :)

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.

--
« Last Edit: February 02, 2013, 02:16:20 pm by Mark Greaves (PCNetSpec) »
WARNING: You are logged into reality as 'root'

logging in as 'insane' is the only safe option.

Offline Keith

  • Sr. Member
  • ****
  • Posts: 456
  • Karma: 10
  • Gender: Male
  • Linux Novice
    • View Profile
    • Awards
Re: Floppy disk problem
« Reply #13 on: February 02, 2013, 02:29:47 pm »
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?

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 13592
  • Karma: 339
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Floppy disk problem
« Reply #14 on: February 02, 2013, 02:31:17 pm »
OK .. another option seems to be to DOWNgrade udisks.

Can you post the output from:
Code: [Select]
uname -a
WARNING: You are logged into reality as 'root'

logging in as 'insane' is the only safe option.

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal