LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   COMPACTFLASH Reader setup (https://www.linuxquestions.org/questions/debian-26/compactflash-reader-setup-208745/)

doctorwebbox 07-23-2004 10:59 AM

COMPACTFLASH Reader setup
 
We've just swtiched from Mandrake10.0 to Debian at work. We had problems with using our flashcard reader through Mandrake but muddled through. When we upgraded from Mandrake 9.2 to 10.0 the card reader wasn't picked up anymore so we left one machine on our network running 9.2 just so we could still use the card reader.

When it works - we just plug it in and it appeared as /mnt/memory-card, we just mounted it and copied the files from it.

How do I get at it in debian? I've plugged it in and looked in the /mnt folder - nothing.

I've tried mount -t vfat /dev/sda1 /mnt/memory-card but it says mount: /dev/sda1 is not a valid block device"

Any ideas?

Dead Parrot 07-23-2004 12:39 PM

What's the output of the following commands in your Debian box?

uname -r
cat /etc/debian_version
dpkg -l | grep hotplug

(Notice that the option in the last command is small L, not big i.)

doctorwebbox 07-24-2004 11:09 AM

Thanks for getting back to me, this is the output from those commands:

staff@mainbox:~$ uname -r
2.6.7-1-686
staff@mainbox:~$ cat /etc/debian_version
testing/unstable
staff@mainbox:~$ dpkg -l | grep hotplug
ii hotplug 0.0.20040329-1 Linux Hotplug Scripts
staff@mainbox:~$

Dead Parrot 07-24-2004 01:35 PM

So, you've got Debian testing/unstable with 2.6 kernel and hotplug. This means that the device should work OK. However, there's no automounting in Debian (or if there is, I don't know how to make it work). For mounting the device manually, just create a directory where you want to mount it and then see this thread for further info:

http://www.linuxquestions.org/questi...hreadid=208780

And also this thread:

http://www.linuxquestions.org/questi...hreadid=209142

doctorwebbox 07-25-2004 05:14 AM

Still no good - I've tried all the suggestions but I keep getting "mount: /dev/sda1 is not a valid block device". What could I be doing wrong?

Dead Parrot 07-25-2004 05:42 AM

If running the following command:

dpkg -l | grep discover

indicates that you've got discover installed, you could try just plugging the flashcard reader in and rebooting and seeing if it is noticed during bootup and the proper device (/dev/sda1) is automatically created. If you haven't got the discover package installed, then install it first.

If this doesn't work, you might have to create /dev/sda1 manually, using mknod. See

man mknod

to get more info. If the man page seems too difficult to understand, you may (if you're in luck) find more pragmatic advices by doing a google search for "mknod /dev/sda1". Hope this helps. :)

David the H. 07-25-2004 09:28 AM

When you succeed in getting the thing to mount, check out autofs to set up automounting again.

David the H. 07-26-2004 08:02 AM

Doctorwebbox, I just managed to get my compact flash reader working thanks to the steps outlined in this page:

http://www.cs.sfu.ca/%7Eggbaker/personal/cf-linux

It took the better part of a day and two kernel recompiles for me to get it going, but I did it. I think that your problem is that you just don't have the kernel set up for proper usb support. That was one of my big problems. You need to have plug n play enabled, and all of the modules listed in the link above. Get them all running and you should be able to access the device.

I discovered one thing that the site above doesn't mention. The sg_map command for me listed /dev/sda as my device, but when I tried to mount it, I kept getting an "unsupported file system" error. I finally tracked it down on Google though. Because there's already a valid file system on the card, you don't want to access the device itself, but the (first and only) partition on the file system. Changing the device to /dev/hda1 did the trick. Now it's working perfectly for me and I can work to set up automounting via autofs...

Edit: Here are a couple of pages about configuring autofs:

http://tldp.org/HOWTO/Automount.html
http://www.greenfly.org/tips/autofs.html

Dead Parrot 07-26-2004 08:38 AM

Umm... I just noticed that I've been discussing how to make USB memory cards work under Debian while you've been asking information on how to make USB memory card READERS work. Sorry about the confusion, all my fault.

Luckily, David the H. points you to the more appropriate information.

David the H. 07-26-2004 10:36 AM

And ironically, it was this thread and another similar one I read just afterward that got me interested in getting my own flash reader to work, resulting in my ability to provide the above information. :D


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