LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Mounting a USB Floppy drive? (https://www.linuxquestions.org/questions/linux-hardware-18/mounting-a-usb-floppy-drive-536423/)

SlowCoder 03-10-2007 09:53 PM

Mounting a USB Floppy drive?
 
I have the NEC UF0002 external floppy drive. I plugged it into my usb port and the drive activated (light came on for a couple of seconds). I don't know how to mount it so I can access the data.

I'm working with Wine to try to run some old DOS/Windows educational games for my kids. I believe the disks are formatted FAT12 (DOS).

fukawi2 03-11-2007 04:32 AM

You will first need to find out what the device name is...
[code]dmesg | tail[/tail]

See what shows up there when you plug the drive in - for example, my USB hard drives pop up at sda / sdb

Then, using the mount command:
Code:

mount -t fat /dev/<device> /mnt/floppy
Replace <device> with whatever dmesg gives you, and you may need to create /mnt/floppy if it doesn't already exist

donnied 03-11-2007 05:07 AM

problems mounting a usb floppy drive
 
I'm having troubles mounting/reading/formatting my usb floppy drive.
lsusb tells me:
Code:

Bus 001 Device 007: ID 03ee:6901 Mitsumi SmartDisk FDD
dmesg |tail
originally told me:
Code:

[17182848.096000] usb 1-2: new full speed USB device using uhci_hcd and address 3
[17182848.220000] usb 1-2: device descriptor read/64, error -71
[17182849.220000] usb 1-2: new full speed USB device using uhci_hcd and address 5
[17182849.628000] usb 1-2: device not accepting address 5, error -71

If I try
Code:

mount -t vfat /dev/sde /mnt/floppy
 mount -t msdos /dev/sde /mnt/floppy

it tells me "can't read superblock"
and after trying to mount as msdos it tells me:
Code:

[17213821.932000] sd 1:0:0:3: SCSI error: return code = 0x8000002
[17213821.932000] sdd: Current: sense key: Medium Error
[17213821.932000]    Additional sense: Cannot read medium - unknown format
[17213821.932000] end_request: I/O error, dev sdd, sector 0
[17213821.932000] FAT: unable to read boot sector

Also /dev/fd is a directory with device files so:
Code:

mount /dev/fd0 /mnt/floppy
mount: special device /dev/fd0 does not exist

How do I find / identify the floppy? what should I see / look for/ write in /etc/mtab or /etc/fstab? I just want to format the floppies. I don't care about reading them. It would be nice but not essential.
Thank you for your time.

dracolich 03-11-2007 08:44 AM

Because it's usb it's going to get a scsi device name instead of fd0 or fd1, just like a flash drive. So, after inserting a disk, if your drive is sda and your mount point is /mnt/floppy, it would mount like this:

mount -t vfat /dev/sda /mnt/floppy

Donnied, you're getting medium error and boot sector errors. Do you have a [good] disk inserted into the floppy drive? That could explain those. When I get the "device not accepting..." errors with mine I have to move it to a different usb port. One more thing: is uhci correct for your usb controller?

donnied 03-11-2007 09:41 PM

Thank you for the info. It suddenly started (somewhat) working.
Yeah, most of the disks I had weren't very good. So I bought some new ones. They work better but it takes a long time to mount them.

the usb floppy is somewhat working. three questions:
1. every diskette brings up about 5 floppies in /media/ floppy-1, floppy-5.
I'm guessing this is because of the partitions. Is there any neat way to have it appear as just /media/floppy?
(does /mnt/floppy represent all the partitions on the floppy)

2. I'm trying to set up an install of tiny linux (a slackware derivative). I have bare.i. I used
'dd if=bare of=/media/floppy-1/bare.i' to write it to a floppy. So far it's only produced disks that give me a non-system disk or disk error message.
Should this produce a floppy that I can boot from to continue installation?

dmesg | tail now gives me
Code:

unable to read partition table
[17185716.852000] ldm_parse_privhead(): Cannot find PRIVHEAD structure. LDM database is corrupt. Aborting.

I'll check on the UHCI.

donnied 03-11-2007 09:49 PM

All my other usb devices work fine. This is working somewhat. It does write and read files. Just not well. Could it be because it's not the greatest usb > floppy?
would it be worth investing more?

archtoad6 03-12-2007 08:25 AM

Quote:

Originally Posted by fukawi2
... dmesg | tail[/tail]

You might want to edit that "[/tail]" to "[/code]" -- the appearance is confusing.

Also, if you run this before plugging in the USB device, doesn't tail need an "-f" option?:
Code:

dmesg  | tail -f

dracolich 03-12-2007 10:18 AM

Quote:

1. every diskette brings up about 5 floppies in /media/ floppy-1, floppy-5.
I'm guessing this is because of the partitions. Is there any neat way to have it appear as just /media/floppy?
I'm not very familiar with Ubuntu, but I would think that these are created automatically with the detection of devices, regardless of how many physically exist. Unless you've partitioned the floppy disk it should be just the floppy-1.

Quote:

I used 'dd if=bare of=/media/floppy-1/bare.i' to write it to a floppy. So far it's only produced disks that give me a non-system disk or disk error message.
dd = duplicate disk - creates or restores an uncompressed image.

Code:

dd if=/dev/floppy-1 of=~/floppy_backup.img
Use the cp command instead.

donnied 03-12-2007 10:56 AM

Any ideas on how to fix/diagnose the appearance of multiple floppies?


I'm using dd because I'm writing a disk image to boot from. I thought I couldn't use cp for that.

Thank you for your time.

SlowCoder 03-13-2007 05:57 PM

Thank you. I didn't see anything in the dmesg, but I guessed at the /dev/sda and was able to mount.

I appreciate the help.


All times are GMT -5. The time now is 08:39 PM.