LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 11-30-2002, 02:11 PM   #1
mindcry
Member
 
Registered: Nov 2002
Distribution: Libranet 2.8 Debian Solaris 9
Posts: 118

Rep: Reputation: 15
compact flash card reader


I have a sandisk compact flash card reader and I was wondering how I can access it in linux.
 
Old 11-30-2002, 07:00 PM   #2
finegan
LQ Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 72
It should be a USB mass storage device, which should be as easy as:

modprobe usb-storage

Then assuming that you haven't got any exciting SCSI devices already in your system... yeah basically everything in Linux that is a weird device is emulted as a SCSI device:

Make a Directory for everything to be mounted to:

mkdir /mnt/flash (you could call it bob if you like, flash is just a suggestion)

Now mount the puppy:

mount -t vfat /dev/sda1 /mnt/flash

At this point the directory should be browsable. To make it so it comes up on boot, add this to the bottom of /etc/fstab

/dev/sda1 /mnt/flash vfat noauto,user,fat=12 0 0

This of course, may not work, post back where you get stuck and what hiccups.

Cheers,

Finegan
 
Old 12-31-2002, 07:16 PM   #3
riddlebox80
CL volunteer
 
Registered: Jul 2002
Location: illinois
Distribution: Collegelinux and Libranet
Posts: 105

Rep: Reputation: 15
check this link out it helped me bigtime and its funny too

http://www.machineofthemonth.org/art...216/page4.html
 
Old 01-19-2003, 11:53 AM   #4
loozoid
LQ Newbie
 
Registered: Jan 2003
Distribution: mandrake and redhat
Posts: 3

Rep: Reputation: 0
Question

Hey finegan,

I was having trouble getting my cfcard reader set up and then I found your instructions here at linuxquestions.org. I followed them exactly as you said and everything worked perfect.

However, because of reasons I will not elaborate on, I had to re-install rh8.0. Then I went back to your instructions on mounting/setting up the cfcard reader but now I get this error message:

[root mnt]# mount -t vfat /dev/sda1 /mnt/cfcard

mount: /dev/sda1 is not a valid block device

I'm sure there is an obvious fix to this problem but I cannot find it. Any ideas?
thanx.
 
Old 01-19-2003, 12:19 PM   #5
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
When you plug in your cfcard reader type this into an xterm first:
tail -f /var/log/messages

This will show you what the device is being called. If you have questions after doing that, post up what it brings up, and maybe also some relevant sections in dmesg and your /etc/fstab.

Cool
 
Old 01-19-2003, 01:21 PM   #6
loozoid
LQ Newbie
 
Registered: Jan 2003
Distribution: mandrake and redhat
Posts: 3

Rep: Reputation: 0
Hi. Sorry, this is a lot of stuff but here is goes. The light on my card reader is lit so I assume the drivers are loaded. Thanks.

from # tail -f /var/log/messages:

Jan 19 10:01:02 kernel: Attached scsi CD-ROM sr0 at scsi1, channel 0, id 0, lun 0
Jan 19 10:01:02 kernel: sr0: scsi3-mmc drive: 40x/40x writer cd/rw xa/form2 cdda tray
Jan 19 10:01:02 kernel: Uniform CD-ROM driver Revision: 3.12
Jan 19 10:14:59 kernel: Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0
Jan 19 10:15:00 kernel: SCSI device sda: 1001952 512-byte hdwr sectors (513 MB)
Jan 19 10:15:00 kernel: sda: test WP failed, assume Write Enabled
Jan 19 10:15:00 kernel: sda: sda1
Jan 19 10:58:24 kernel: usb.c: USB disconnect on device 2
Jan 19 10:58:34 kernel: hub.c: USB new device connect on bus1/1, assigned device number 4
Jan 19 10:58:37 /etc/hotplug/usb.agent: Setup usb-storage for USB product 7af/6/100


from demesg:

usb.c: registered new driver usbdevfs
usb.c: registered new driver hub
usb-ohci.c: USB OHCI at membase 0xde849000, IRQ 11
usb-ohci.c: usb-00:02.2, Silicon Integrated Systems [SiS] 7001
usb.c: new USB bus registered, assigned bus number 1
hub.c: USB hub found
hub.c: 3 ports detected
usb-ohci.c: USB OHCI at membase 0xde84b000, IRQ 11
usb-ohci.c: usb-00:02.3, Silicon Integrated Systems [SiS] 7001 (#2)
usb.c: new USB bus registered, assigned bus number 2
hub.c: USB hub found
hub.c: 3 ports detected
usb.c: registered new driver hiddev
usb.c: registered new driver hid
hid-core.c: v1.8.1 Andreas Gal, Vojtech Pavlik <vojtech@suse.cz>
hid-core.c: USB HID support drivers
mice: PS/2 mouse device common for all mice
hub.c: USB new device connect on bus1/1, assigned device number 2
usb.c: USB device 2 (vend/prod 0x7af/0x6) is not claimed by any active driver.
EXT3 FS 2.4-0.9.18, 14 May 2002 on ide0(3,5), internal journal
hub.c: USB new device connect on bus1/2, assigned device number 3
usb.c: USB device 3 (vend/prod 0x5a9/0xa511) is not claimed by any active driver
Initializing USB Mass Storage driver...
usb.c: registered new driver usb-storage
scsi0 : SCSI emulation for USB Mass Storage devices
Vendor: Model: Rev:
Type: Direct-Access ANSI SCSI revision: 02
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 2
USB Mass Storage support registered.
Linux video capture interface: v1.00
usb.c: registered new driver ov511
ov511.c: USB OV511+ camera found
ov511.c: model: Creative Labs WebCam 3
ov511.c: Sensor is an OV7620
ov511.c: Device registered on minor 0
ov511.c: v1.50 for Linux 2.4 : OV511 USB Camera Driver


from /etc/fstab:

# more /etc/fstab
LABEL=/1 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
LABEL=/home /home ext3 defaults 1 2
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
LABEL=/usr1 /usr ext3 defaults 1 2
LABEL=/var1 /var ext3 defaults 1 2
/dev/hdb3 swap swap defaults 0 0
/dev/hda6 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,kudzu,ro 0
0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
 
Old 01-19-2003, 03:18 PM   #7
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
It truly looks like it should be registering as /dev/sda1

How exactly are you mounting it, and as what user? Try this as root:
mount -t vfat /dev/sda1 /mnt/wherever

Make sure /mnt/wherever exists.

Cool
 
Old 01-19-2003, 03:37 PM   #8
loozoid
LQ Newbie
 
Registered: Jan 2003
Distribution: mandrake and redhat
Posts: 3

Rep: Reputation: 0
Thumbs up oops!

It works. I guess I wasn't doing it under root. I thought I was. I think I better lay off the smoke. Thanks for your help.
 
Old 01-19-2003, 04:08 PM   #9
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
he he he, the smoke

You can mount it as a regular user if you add it to your /etc/fstab and place the "users" entry in the options column.

Cool
 
Old 01-21-2003, 10:31 PM   #10
X-dazed
LQ Newbie
 
Registered: Dec 2002
Location: FL
Distribution: RH 7.3, Mandrake 9.0
Posts: 18

Rep: Reputation: 0
hi, i posted this in the "newbie" forum but didn't really much help. i have a combo memory stick / cf card reader, can i follow the above directions to mount it/them? under windows it shows as 2 separate drives. btw, the light on my reader is currently lit if this important. thanks.
 
Old 01-21-2003, 11:14 PM   #11
finegan
LQ Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 72
This should work, if it registered right as a scsi device then one of the ports is probably /dev/sda1 and the other /dev/sdb1, give us the last 15 or so lines from dmesg and we can tell you for sure... or even if it got found correctly.

Cheers,

Finegan
 
Old 01-22-2003, 02:00 AM   #12
X-dazed
LQ Newbie
 
Registered: Dec 2002
Location: FL
Distribution: RH 7.3, Mandrake 9.0
Posts: 18

Rep: Reputation: 0
Well, here goes from dmesg (sorry it's so long, not sure all is needed):


Adding Swap: 1044216k swap-space (priority -1)
usb.c: registered new driver usbdevfs
usb.c: registered new driver hub
usb-uhci.c: $Revision: 1.275 $ time 07:48:41 Apr 18 2002
usb-uhci.c: High bandwidth mode enabled
PCI: Found IRQ 11 for device 00:07.2
PCI: Sharing IRQ 11 with 00:07.3
PCI: Sharing IRQ 11 with 00:08.0
usb-uhci.c: USB UHCI at I/O 0xd400, IRQ 11
usb-uhci.c: Detected 2 ports
usb.c: new USB bus registered, assigned bus number 1
hub.c: USB hub found
hub.c: 2 ports detected
PCI: Found IRQ 11 for device 00:07.3
PCI: Sharing IRQ 11 with 00:07.2
PCI: Sharing IRQ 11 with 00:08.0
usb-uhci.c: USB UHCI at I/O 0xd800, IRQ 11
usb-uhci.c: Detected 2 ports
usb.c: new USB bus registered, assigned bus number 2
hub.c: USB hub found
hub.c: 2 ports detected
usb-uhci.c: v1.275:USB Universal Host Controller Interface driver
usb-ohci.c: USB OHCI at membase 0xe08cf000, IRQ 9
usb-ohci.c: usb-02:08.0, NEC Corporation USB
usb.c: new USB bus registered, assigned bus number 3
hub.c: USB hub found
hub.c: 3 ports detected
hub.c: USB new device connect on bus1/2, assigned device number 2
usb.c: USB device 2 (vend/prod 0x781/0x820) is not claimed by any active driver.
usb-ohci.c: USB OHCI at membase 0xe0904000, IRQ 10
usb-ohci.c: usb-02:08.1, NEC Corporation USB (#2)
usb.c: new USB bus registered, assigned bus number 4
hub.c: USB hub found
hub.c: 2 ports detected
ehci-hcd.c: $Revision: 1.1 $ USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-hcd.c: block sizes: qh 96 qtd 96 itd 160 sitd 64
hcd.c: ehci-hcd @ 02:08.2, PCI device 1033:00e0 (NEC Corporation)
hcd.c: irq 11, pci mem e092e000
usb.c: new USB bus registered, assigned bus number 5
ehci-dbg.c: ehci_start hcs_params 0x2395 dbg=0 cc=2 pcc=3 ports=5
ehci-dbg.c: 02:08.2: ehci_start portroute 1 0 1 0 0
ehci-dbg.c: ehci_start hcc_params 0x0002 caching 0 uframes 256/512/1024
ehci-hcd.c: reset 80002 cmd (park)=0 ithresh=8 period=1024 Reset HALT
ehci-hcd.c: init 10000 cmd (park)=0 ithresh=1 period=1024 HALT
ehci-hcd.c: USB 2.0 support enabled, EHCI rev 0.95
hcd.c: 02:08.2 root hub device address 1
hub.c: USB hub found
hub.c: 5 ports detected
hub.c: connect-debounce failed, port 1 disabled
ehci-hub.c: GetStatus port 2 status 0x1803 POWER speed=2 CSC CONNECT
ehci-hub.c: 02:08.2 port 2 full speed, give to companion, 0x1801
ehci-hub.c: GetStatus port 2 status 0x3801 OWNER POWER speed=2 CONNECT
ehci-hcd.c: 02:08.2: free_config devnum 0
hub.c: USB new device connect on bus4/1, assigned device number 2
usb.c: USB device 2 (vend/prod 0x4b8/0x11d) is not claimed by any active driver.
SCSI subsystem driver Revision: 1.00
Initializing USB Mass Storage driver...
usb.c: registered new driver usb-storage
scsi0 : SCSI emulation for USB Mass Storage devices
Vendor: SanDisk Model: Imagemate CF-MS1 Rev: 0100
Type: Direct-Access ANSI SCSI revision: 02
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 2
USB Mass Storage support registered.
EXT3 FS 2.4-0.9.17, 10 Jan 2002 on ide0(3,67), internal journal
kjournald starting. Commit interval 5 seconds
EXT3 FS 2.4-0.9.17, 10 Jan 2002 on ide0(3,65), internal journal
EXT3-fs: mounted filesystem with ordered data mode.
scsi1 : SCSI host adapter emulation for IDE ATAPI devices
Vendor: YAMAHA Model: CRW2200E Rev: 1.0D
Type: CD-ROM ANSI SCSI revision: 02
hdc: DMA disabled
parport0: PC-style at 0x378 [PCSPP,EPP]
parport_pc: Via 686A parallel port: io=0x378
ip_conntrack (4095 buckets, 32760 max)
Linux Tulip driver version 0.9.15-pre10 (Mar 8, 2002)
PCI: Found IRQ 11 for device 00:08.0
PCI: Sharing IRQ 11 with 00:07.2
PCI: Sharing IRQ 11 with 00:07.3
eth0: ADMtek Comet rev 17 at 0xe0901000, 00:03:6D:1E:2D:8C, IRQ 11.
Linux agpgart interface v0.99 (c) Jeff Hartmann
agpgart: Maximum main memory to use for agp memory: 439M
agpgart: Detected Via Apollo Pro KT133 chipset
agpgart: AGP aperture is 64M @ 0xe8000000
[drm] AGP 0.99 on VIA Apollo KT133 @ 0xe8000000 64MB
[drm] Initialized radeon 1.1.1 20010405 on minor 0
Creative EMU10K1 PCI Audio Driver, version 0.18, 07:49:07 Apr 18 2002
PCI: Found IRQ 5 for device 00:09.0
emu10k1: EMU10K1 rev 7 model 0x8061 found, IO at 0xe000-0xe01f, IRQ 5
ac97_codec: AC97 Audio codec, id: 0x8384:0x7608 (SigmaTel STAC9708)
emu10k1: SBLive! 5.1 card detected
Attached scsi CD-ROM sr0 at scsi1, channel 0, id 0, lun 0
sr0: scsi3-mmc drive: 40x/40x writer cd/rw xa/form2 cdda tray
Uniform CD-ROM driver Revision: 3.12
Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0
sda : READ CAPACITY failed.
sda : status = 1, message = 00, host = 0, driver = 08
Info fld=0x0, Current sd00:00: sense key Not Ready
Additional sense indicates Medium not present
sda : block size assumed to be 512 bytes, disk size 1GB.
sda: I/O error: dev 08:00, sector 0
I/O error: dev 08:00, sector 0
unable to read partition table
sda : READ CAPACITY failed.
sda : status = 1, message = 00, host = 0, driver = 08
Info fld=0x0, Current sd00:00: sense key Not Ready
Additional sense indicates Medium not present
sda : block size assumed to be 512 bytes, disk size 1GB.
sda: Write Protect is off
sda: I/O error: dev 08:00, sector 0
I/O error: dev 08:00, sector 0
unable to read partition table

Last edited by X-dazed; 01-22-2003 at 02:05 AM.
 
Old 01-22-2003, 02:50 AM   #13
finegan
LQ Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 72
Odd, there's two reads there on the same block, did you pull it and then plug it back in? Regardless, yeah man it sees the thing, sees its a mass storage divice, nothing was plugged into it at the time right?

The above directions should more or less work.

Cheers,

Finegan
 
Old 01-22-2003, 08:05 PM   #14
X-dazed
LQ Newbie
 
Registered: Dec 2002
Location: FL
Distribution: RH 7.3, Mandrake 9.0
Posts: 18

Rep: Reputation: 0
Yeah. My hardware: I've got an Adaptec Duoconnect PCI card (USB 2.0/firewire), which I currently have a scanner connected to the usb port, and the card reader is currently connected to mobo usb port. In future I will also have a printer hooked up (waiting for my usb cable ). Will need more help on scanner, printer, and camcorder (firewire port) later .

From above:

Quote:
modprobe usb-storage
is that a command line I type into the Konsole, and the make a new directory? Sorry for all the questions, extreme newbie here.
 
Old 01-22-2003, 08:10 PM   #15
finegan
LQ Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 72
From your dmesg it doesn't even look like you need to modprobe usb-storage, that got done automagically for you when uhci saw that something was connected to it. Just make a directory to mount it to, like: /mnt/bobstoy and then add an entry in /etc/fstab like:

/dev/sda1 /mnt/bobstoy vfat noauto,user,fat=12 0 0

Then after you pop a card in, all you have to type is:

mount /mnt/bobstoy

And then the stuff should be there.

Cheers,

Finegan
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
USB Compact flash card reader with XANDROS dkunjeer Linux - Distributions 2 08-08-2004 07:43 AM
USB Compact flash card reader with XANDROS dkunjeer Linux - Newbie 1 08-03-2004 03:07 PM
USB Compact flash card reader with XANDROS dkunjeer Linux - Hardware 1 08-03-2004 02:35 PM
Transfer from USB compact flash card reader used to be faster... Cadmium Mandriva 17 07-15-2004 10:24 AM
sandisk compact flash card reader and filesystem type esteeven Linux - Hardware 6 05-13-2004 02:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 12:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration