Need help writing automount rules for USB floppy drive

Questions about hardware,drivers and peripherals
Forum rules
Before you post please read how to get help

Need help writing automount rules for USB floppy drive

Postby blendenzo on Sun Nov 16, 2008 2:16 am

I am using Linux Mint 5 r1

I have a Bytecc BT-144 USB external floppy disk drive. It is detected as MITSUMI USB FDD 061M. I've been able to successfully mount and write to floppy disks by using dmesg to identify the most recently detected USB device, then by mounting with the following command:

Code: Select all
sudo mount -t auto -o rw,user,snyc /dev/sdb /media/usbfloppy

For some reason, even though I use the "rw" option, I can still only write to the disk using sudo. Other than that, this method works, but I'd prefer to be able to automate the process. From what I understand, I will either need to write a custom udev rule or edit an existing one to include instructions for this device. Could someone a bit more knowledgeable than I am please offer me some assistance in this area?

To clarify what I'm looking for:
- I would like the device to be added to the "computer:///" menu in Nautilus as "usbfloppy" and to have the same options that "floppy0" has (i.e. the "Format" and "Mount Volume" options).
- I would like "usbfloppy" to run the "Mount Volume" command when double-clicked and mount the disk to /media/usbfloppy. "usbfloppy" should then show as a mounted floppy diskette in Nautilus.

I appreciate any help that can be offered in this area. (Also, please let me know if I'm asking too much or if I would be better suited to ask somewhere else.)
blendenzo
Level 1
Level 1
 
Posts: 16
Joined: Tue Jul 17, 2007 2:16 pm

Linux Mint is funded by ads and donations.
 

Re: Need help writing automount rules for USB floppy drive

Postby Husse on Sun Nov 16, 2008 10:38 am

Get a USB pen drive...
The only thing a USB floppy does is irritate :)
I can't see any use for it unless you have to transfer files to a really old computer but such an old computer is no more than an annoyance today...
Anyway
Your mount command seems OK except snyc - whats that? Typo for sync I believe, but I think it's not needed
After a successful mount open /etc/mtab
The line for the floppy can be added to /etc/fstab to achieve your goals
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19703
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Re: Need help writing automount rules for USB floppy drive

Postby blendenzo on Sun Nov 16, 2008 3:01 pm

Thanks for the reply, Husse. I have my reasons for buying the USB floppy drive, and I do have plenty of pendrives :). Anyway, I was hoping to find this solution so that hardware support for USB floppy drives could be added to Linux. As it is now, if you plug in the drive with a disk already in it, Linux tries to mount the disk unsuccessfully and ends up corrupting it. Obviously that is not desirable.

As for the "snyc" option, you are correct, that was a typo for sync which I only made in my post, not in my actual command. If you have a foppy drive on your computer, you can check the /etc/fstab and see that they are all set to sync. This is necessary because changes need to be written to the disks as they are made instead of being held in queue and written at a later time. If the disk is not set it to sync, it will very likely become corrupted, since it will most likely be unmounted before the full queue is written to it and Linux will no longer be able to mount it.

Anyway, thanks again for the reply. I'll look at the etc/mtab file like you suggested.
blendenzo
Level 1
Level 1
 
Posts: 16
Joined: Tue Jul 17, 2007 2:16 pm

Re: Need help writing automount rules for USB floppy drive

Postby Husse on Sun Nov 16, 2008 6:38 pm

Ok I respect your reasons for a floppy but
so that hardware support for USB floppy drives could be added to Linux

that is something that rather is to be removed than added. The number of USB floppies is small (but probably not quite insignificant) but there will be no new ones and the number is dwindling rapidly
But I think the mtab fstab method works and you are absolutely right about sync :)
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19703
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden


Return to Hardware Support

Who is online

Users browsing this forum: No registered users and 19 guests