compact flash card reader
I have a sandisk compact flash card reader and I was wondering how I can access it in linux.
|
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 |
check this link out it helped me bigtime and its funny too :D
http://www.machineofthemonth.org/art...216/page4.html |
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. :newbie: |
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 |
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 |
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 |
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.
|
he he he, the smoke :D
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 |
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.
|
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 |
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 |
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 |
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:
|
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 |
All times are GMT -5. The time now is 07:00 PM. |