[ Table Of Contents ][ Answer Guy Current Index ] greetings   Meet the Gang   1   2   3   4   5   6   7 [ Index of Past Answers ]


(?) The Answer Gang (!)


By Jim Dennis, Ben Okopnik, Dan Wilder, Breen, Chris, and... (meet the Gang) ... the Editors of Linux Gazette... and You!
Send questions (or interesting answers) to The Answer Gang for possible publication (but read the guidelines first)


(?) Mandrake 8.1 fd0 unknown device, and downloading pictures from a digital camera

Questions From F F, Mike "Iron" Orr

Answered By Chris Gianakopoulos, Ben Okopnik, Mike "Iron" Orr, Heather Stern

I can't read the FLoPPY disk! both cd roms works properly, but there's no way to access the flp! (Yeah, it is! in the drive)

Does someone have the solution?

(!) [Chris G] I know that this question might sound silly, but, is your floppy drive one of those LS-120 drives? If the answer is yes, then, it looks like an IDE hard drive, and you mount it like a hard drive.
If it is a regular floppy, and you know that the floppy works, I would check the bios settings on your computer and see if the floppy controller is enabled.
Also type "dmesg" and see if a floppy controller has been detected. If the floppy controller was detected, I would check the cables to the floppy drive and its power connector.
The last resort -- swap the floppy drive with another known good drive.
I hope that this helps.
(!) [Ben] I guess it depends on whether the querent is running Linux, Chris; if so, he hasn't mentioned it. In case he is, a simple "mount" command might help.
Hmm. I'm going to try something that might be useful here. The idea behind this is "how would I phrase the querent's question if I was having this kind of a problem?" The question, when properly phrased, should contain the solution - as they very often do. Perhaps modeling clueful behavior may be a useful thing...

...............

Dear Answer Gang,
I am having a problem reading a floppy that I made under Wind*ws; I'm running Mandrake 8.1.
I can see the files on that same floppy under Wind*ws, using the same machine and drive, so I know the hardware itself is OK.
I've issued a "mount -t vfat /dev/fd0 /floppy" command to mount it (there were no errors when I did), have made sure that I do have a "/floppy" directory, and am using "ls -l /floppy" to check it;
(A reference to exactly which command coughed up the complaint "fd0 unknown device" would fit here nicely.)
I get no output other than "total 0" (an empty directory). I've made sure that the drive light comes on when I try to read it, so it seems like the drive is being accessed - but I still can't see any of the files.
Any help would be appreciated.

...............

(!) [Heather] Of course, if they knew enough to say all this, they probably wouldn't ask us anything... and it's much easier for an utter newbie to assume we will somehow know what he's talking about, since we've seen so much before. Bravo for answering in true Answer Guy style - if need be, use your own sense of autocompletion to upgrade an interesting question to readability, then answer the result. At least somebody will get a good answer from it :)
I have to remind the Answer Gang to read subjects as well as messages. though. It usually isn't much but every clue is something. :)
I note that if you have a bad /etc/mtab then just running 'mount' to ask the system what is mounted can provide strange and wrong results. To be sure you're getting the real info, ask the proc filesystem: cat /proc/mounts
(!) [Chirs G] Right you are, Ben! I have not answered any Answer Gang questions for a while, and, it would seem that I forgot how!! I don't know what was up in my mind. For some reason, I must have been looking at a previous Linux question, and I connected "F F"'s email with that question.
Thanks for that constructive input, Ben.
Congrats to Ben for an excellent answer. And maybe one that belongs in ask-the-gang.html somewhere. -- Mike
(!) [Ben] Thanks. I thought it might be a good way to model something useful; I don't know that there's a good way of adding it to "ATG", but I'll try doing it that way a few more times (I don't think we're going to run short of poorly-phrased queries anytime soon), and maybe the idea will get propagated just due to its exposure to the LG-reading crowd. I like the idea of folks being effective at asking questions; if I can contribute to even a small increase in cluefulness in the general population, I'm happy.
It's easy to assume the querent is having the same problem you've had before. And since I have used Linux exclusively for several years ... I forget what kind of assumptions Windows users make. So you are not the only one who answers an ambiguous question with a Linux answer and doesn't even realize it. -- Mike
(!) [Chris G] It's gotten automatic now. I used to use Microsoft Outlook for reading my email. Once I set up Sendmail and Mutt, I use Windows for playing network Doom with my kids. I remember, though, if the question is ambiguous, answer with a Linux solution. I like Ben's example, though.
I also forgot to suggest to the querent to try booting off of the floppy using a dos-based disk. I had a similar problem when helping a coworker install a SuSE distribution on a Compaq DeskPro computer. I noticed that the system would not boot from the floppy drive, and, upon closer inspection, I realized that the floppy drive was an LS-120 drive. As a result, the mtools stuff did not work. We went ahead and looked at /etc/fstab and saw an entry that corresponded to the LS-120 drive.
(!) [Ben] Hmm, that's odd. I've got an LS-120 in my desktop PC, and it boots just fine. However, you're right about "mtools" freaking out about it: that 120MB capacity fries its little brain... I was never able to find a combination of switches for "superformat" that would let me do anything with it, even to the extent of creating a 1.7MB floppy. :( Kinda sucky.
(!) [Chris G] Maybe there was something about the bios settings of the Compaq computer. I recall that we could not do anything with the bios setup because we did not have the password to the thing. Soooo..., you can boot off of an LS-120. Cool.
(!) [Heather] I have found that I could boot from LS-120s and as I recall I could work with 1.44 disks. What I don't remember, because it was a pain, is whether I could format them after some setup tweaks, or if I could dd them. I recall I could only do one and not the other, and I couldn't make 1.722 disks using the tomsrtbt setup. Very annoying, but possibly also the victim of Tom using an older floppy formatting program because it was smaller. I considered the whole thing fitful and use my trusty laptop to cough floppies. Except that it can't mount floppies directly very well, so I 'dd' images of the floppy off, and loopback mount them. Raw access works fine, it just seems to be a timing thing. But I'm not complaining, because the loopback mounted images are much faster than a floppy, anyway, and the diskette is safe from being scrambled unless I deliberately copy the image back out.


(?) Mandrake 8.1 fd0 unknown device, and digital camera

From Mike 'Iron' Orr

Answered By Ben Okopnik

And since I have used Linux exclusively for several years (except a few times a year to download pics from my digital camera), ...

(!) [Ben] I got myself a FlashPath "floppy" to bypass all that. Stick the SmartCard into the gadget, use the modified version of "mtools" to read it (standard "mtools" functionality plus FlashPath capability), and all is good. Besides, the various camera interface utils (GPhoto, etc.) are getting pretty darn hot these days.

(?) The camera is a Canon Elf S100, which uses compact flash memory. It was working with gphoto2 command-line mode at one point. Then the USB device entry disappeared in the middle of a download. Usually that meant the battery went dead and I try it again with a recharged battery. But the last time, it wouldn't acknowledge the device at all. Then in Windows it stopped recognizing the device too, so I figured the camera's USB interface was defective, because the card works fine in the camera.

So I bought one of those little USB card readers. Not only do you not have to worry about batteries, but supposedly the card shows up like a removable disk drive, with ordinary files, bypassing the ideosyncracies of each camera driver. But Windows wouldn't mount the card, it just said "invalid filesystem format" or something like that.

(!) [Ben] Right - despite the "ordinary files", etc. advertisements, it does not look like a standard floppy even to Wind*ws - a special driver is required (at least this is true for SmartDisk FlashPath 'floppies'.) The same is true for Linux; hence the special version of "mtools" (it's a binary-only driver - there is a source tarball, but I was unable to compile it, and the author himself says to use the RPM with the binary.)

(?) So I hooked up the camera to Windows again, and this time it recognized the camera. For software I had the Kodak Imaging program that came with the camera, and Photoshop. Photoshop's "import..." menu option was disabled for some unknown reason even though I had used it before. So I tried the Imaging program. But that program is too horrible to use. It takes a lot of clicks to download each picture, and I had 150 of them. And it kept trying to save in TIFF format, taking forever to save one image and insisting on using TIFF format, which is big, and somehow it used all 100 MB of free disk space and I had to kill the program, and every time I tried to save it did something similar. So that was useless.

So I downloaded kernel 2.4.18 and was delighted to see there's a USB driver for my card reader. I'm hoping when I try it out it will work, and that it will recognize the card's filesystem.

(!) [Ben] I suspect that it won't. :( The "tweaked mtools" author is a guy name of Jason McMullan (jmcmullan@linuxcare.com) (Jim, Heather - somebody you know?); the version that I have is "mtools-3.9.7-7fp.i386.rpm". I renamed it to "mtools-9.9.7-7fp.i386.rpm" before running alien; that way, the version info shows a high number and updating Debian doesn't overwrite my version.

(?) Is there a floppy reader for compact flash?

(!) [Ben] ISTR that SmartDisk makes one, but I'm not 100% certain. Worth looking into, though; I like my little gadget.

(?) I found gphoto and gphoto2 to be a total pain. My camera was only in gphoto2, which was an unreleased development version at the time so there was no Debian package. Of course, the usage instructions I had were for the old version, and the GUI front end had been replaced by something else that I think was missing something. Maybe it's better now. But having the images appear as files is really what I want to do anyway.

Update some time later

I finally got my pictures out. I compiled a new kernel with the basic USB stuff in, and used Debian's gphoto 2.0 final. To download all photos:

gphoto2 --camera "Canon PowerShot S100" --port usb --get-pictures
Or to download certain pictures by index number (starting at 1):
gphoto2 --camera "Canon PowerShot S100" --port usb --list-files >files
gphoto2 --camera "Canon PowerShot S100" --port usb --get-picture 5-10
Deiconifying the xconsole window helped too because it showed that the USB system was sending syslog messages. Often there was a timeout error but it would recover. But not infrequently it wouldn't recover, and I'd press the camera power switch a couple times but not get the message I get when it's successful. Then I'd have to reboot the computer and try again. (Perhaps if I'd compiled the USB as modules, I could have unloaded and reloaded the modules.)

I had less luck with the Lexar card reader although it did download some images. For this, you need not only the kernel USB support but also SCSI "generic device" support (not just SCSI disk support). You also need the USB Storage module. With all this in place, when you stick the Compact Flash card in the reader, it shows up as a SCSI disk, /dev/sda1, which you can mount as an msdos filesystem or use (the ordinary) mtools on. (The mtools configuration line is, 'drive c: file="/dev/sda1"'.) But the problem with this is that after twenty-five pictures at the beginning (or after three or even one picture later), the light on the card reader would go off and it would play dead. This isn't a battery problem because the reader gets its power from the USB bus. The processes would be in "D" state ("uninterruptable sleep" in the ps listing) so they can't be killed. Also, they make the system unable to shut down cleanly: 'halt', 'reboot' and the vulcan nerve pinch just hang at "Sending processes the TERM signal" until you ctrl-C and continue. So I have to do a cold boot with the power switch. To prevent disk corruption, I upgraded my ext2 partitions to ext3 (journalled):

tune2fs -j /dev/hdc10
then changing "ext2" to "ext3" in /etc/fstab. This hang, reboot, restart cycle went several times before I gave up on the card reader. Defective reader? Buggy USB drivers? I don't know.

But it was satisfying seeing my card reader more compatible with Linux than with Windows 2000/XP. Windows would try to mount the card reader and give up silently or say "invalid filesystem format". Take that, Windows!


This page edited and maintained by the Editors of Linux Gazette Copyright © 2002
Published in issue 80 of Linux Gazette July 2002
HTML script maintained by Heather Stern of Starshine Technical Services, http://www.starshine.org/


[ Table Of Contents ][ Answer Guy Current Index ] greetings   Meet the Gang   1   2   3   4   5   6   7 [ Index of Past Answers ]