USB floppy drive detection
June 08, 2008 —
BarryK
My relative has an external USB floppy drive, and I have been testing it with Puppy.
Testing on my relative's PC
On my relative's desktop PC, Puppy detects the floppy drive ok. If I bootup wihout a diskette inserted, then for 4.1alpha2 I get a "flash pen drive" icon on the desktop, whereas I want a "floppy diskette" icon. So I added an extra test into /sbin/probdisk2:
#find out if a usb floppy drive...
if [ -e /sys/block/${ONEDRV}/size ];then
[ "`cat /sys/block/${ONEDRV}/size`" = "2880" ] && MEDIA="floppy"
fi
#if the floppy diskette not inserted, try this fallback test...
if [ -e /sys/block/${ONEDRV}/device/model ];then
[ "`grep ' FDD ' /sys/block/${ONEDRV}/device/model`" != "" ] && MEDIA="floppy"
fi
The 'size' file has '0' in it if the diskette not inserted, so I added a fallback to look at the 'model' file. However, the text in the 'model' file is going to vary with different drives from different manufacturers. I Have a Mitsumi drive and the full content of 'model' is:
USB FDD 061M
So, I have a question. Is there anyone reading this who has a USB floppy drive? If so, running any version of Puppy you can do this:
# probedisk <<<<to find out what /dev/sda,b,c it is. let's say it's sda:
# cat /sys/block/sda/device/vendor
# cat /sys/block/sda/device/model
I need to know how that string differs in the 'model' file for other vendors.
Testing on my laptop
Now things get sad. The floppy does not work on my laptop. Not at all, and I have no idea why. At bootup, the kernel detects and recognises the usb floppy as /dev/sdb. Fine, but as soon as I put in a diskette and try to read it there is an error message that it cannot be read (in /var/log/messages) and the kernel drops 'sdb', /sys/block/sdb disappears. Unplugging and replugging the usb cable makes no difference. If I boot with the floppy drive unplugged, then plug it in after bootup, the same scenario repeats -- initially the /dev/sdb is recognised, but then gets removed as soon as I try to access a diskette. But, exactly the same Puppy version works in my relative's PC.
Both computers are using uhci_hcd, ehci_hcd and usb_storage modules.
Comments
USB floppy detectionUsername: BarryK
A bit of a search with google, results from 'dmesg': Vendor: NEC Model: USB UF000x Rev: 1.50 umass0: Sony USB Floppy Drive, rev 1.10/5.01, addr 2 da0: <SONY USB-FDU 5.01> Removable Direct Access SCSI-0 device I'm guessing that part of this is the product string, so I have modified my test: [ "`grep -E ' FDD| UF000x|Floppy|USB\-FDU' /sys/block/${ONEDRV}/device/model`" != "" ] && MEDIA="floppy"
Toshiba USB Floppy
Username: pakt
"This is from a Toshiba PA3109U-1FDD USB drive (actually a re-badged TEAC as shown below): # probedisk /dev/hda|disk|HTS541080G9AT00 /dev/hdc|cdrom|HL-DT-STCD-RW/DVD DRIVE GCC-4241N /dev/sda|Direct-Access|TEAC FD-05PUB # # cat /sys/block/sda/device/vendor TEAC # # cat /sys/block/sda/device/model FD-05PUB #
Re: TEAC floppy
Username: BarryK
"pakt, Thanks for the info, I've added that to the test. One good thing, as time goes on there will probably be less manufacturer product strings to detect. SouthPaws, Yes, I wonder? I'll take a look at it later.
NEC floppy
Username: groo
"Puppy 4.0 installed on a USB flash drive. on the laptop: # probedisk /dev/sda|Direct-Access|ATA ST910021AS /dev/sdb|Direct-Access|Generic USB Flash Disk /dev/sdc|Direct-Access|NEC USB UF000x /dev/hdc|cdrom|Slimtype DVDRW SSM-8515S # cat /sys/block/sdc/device/vendor NEC # cat /sys/block/sdc/device/model USB UF000x # No floppy drive appeared in pmount. Put a floppy disk in, hit refresh and mounted with pmount. Could see the files on the floppy. Tried the same thing on a desktop. Unlike the laptop, the empty floppy drive showed up in pmount. Put in a floppy disk and the first time i tried to mount the floppy, it gave an error message. Took the floppy out of the drive, hit refresh on pmount, the floppy drive disappeared from pmount. Put the floppy back in the drive and hit refresh and it reappeared in pmount. Then it mounted fine.
RE: Compaq Floppy
Username: strappe
"Hi Barry, Running Puppy 4.0 on a Shuttle X, with a HP/Compaq USB drive cradle (can host either a CD-ROM drive or a Floppy drive). Here are the reports: # probedisk /dev/sda|Direct-Access|SMSC USB 2 HS-CF /dev/sdb|Direct-Access|COMPAQ USB EXT FLOPPY /dev/sdc|Direct-Access|SMSC USB 2 HS-MS /dev/sdd|Direct-Access|SMSC USB 2 HS-SM /dev/sde|Direct-Access|SMSC USB 2 HS-SD/MMC /dev/sdf|Direct-Access|Sony Storage Media /dev/hda|disk|ST380021A /dev/hdc|cdrom|SONY DVD RW DRU-510A /dev/hdd|floppy|LS-120 CSMO 05 UHD Floppy # cat /sys/block/sdb/device/vendor COMPAQ # cat /sys/block/sdb/device/model USB EXT FLOPPY #
More Floppy Feedback & BIOS
Username: pakt
"Barry, a bit more feedback with the floppy on my Acer TravelMate 6291 laptop this time. Booted 4.02a2 from a USB device (no save file): # probedisk /dev/sda|Direct-Access|ATA ST9120822AS /dev/sdb|Direct-Access| USB DISK 2.0 /dev/sdc|Direct-Access|TEAC FD-05PUB /dev/sr0|cdrom|SlimtypeDVD A DS8A1P # # cat /sys/block/sdc/device/vendor TEAC # # cat /sys/block/sdc/device/model FD-05PUB # Drive plugged in without diskette: "usb stick" icon shows. Clicking it, Pmount opens but does not show a tab for the drive, which is correct. Inserted a diskette: no change in icon until I click on it and mount it in Pmount (note that I need to manually change the tab from "usbdrv" to "floppy" first) . Then the icon changes to a floppy with green MNTD. No problem looking at contents or unmounting the floppy. Unmounted icon remains a floppy. So, the floppy works on my Acer laptop. There is no setting in the BIOS for the floppy, but in the BIOS under "Boot", it does list "USB Floppy" as a choice to boot from. Btw, have you updated to the latest BIOS version? I've updated mine twice already - and I bought my Acer laptop after you did ;-)
IBM Thinkpad USB floppy
Username: jeffrey
"# probedisk /dev/sdb|Direct-Access|TEAC FD-05PUB # cat /sys/block/sdb/device/vendor TEAC # cat /sys/block/sdb/device/model FD-05PUB The diskette seems to work fine. Didn't try writing to it, but I guess that would work too. Good job!
Mitsumi USB Floppy
Username: 8-bit
"My Imation USB Floppy (Mitsumi) shows this: # probedisk /dev/sda|Direct-Access|ATA WDC WD3200AAJS-6 /dev/sdb|Direct-Access|ATA Maxtor 6L200P0 /dev/sdc|Direct-Access|IOMEGA ZIP 250 /dev/sdd|Direct-Access|Canon MP Memory Card /dev/sde|Direct-Access|MITSUMI USB FDD /dev/sr0|cdrom|HL-DT-STDVD-RAM GH10L # cat /sys/block/sde/device/vendor MITSUMI # cat /sys/block/sde/device/model USB FDD #
USB floppy
Username: BarryK
"8-bit, 'probedisk' is deprecated, use 'probedisk2'. Are you having a problem with USB Floppy recognition?
Tags: puppy