View previous topic :: View next topic |
Author |
Message |
TerranAce007 Apprentice
Joined: 13 Dec 2004 Posts: 281 Location: Texas
|
Posted: Mon Jan 31, 2005 3:36 am Post subject: SD Flash cards or USB key howto? |
|
|
I have a 3 in 1 card reader in my laptop, and my digital camera uses SD memory cards. Right now I have to reboot in windows xp everytime I need to access the pictures I take from the card, then boot back into gentoo to use the gimp. How do I go about setting up the SD card reader?
Also, if I want to use a USB flash key, how would I mount it? Where would the device node be created? /dev/hde? _________________ It's all funny until someone gets hurt.
Then it's hilarious. |
|
Back to top |
|
|
jbain n00b
Joined: 24 Mar 2004 Posts: 53
|
Posted: Mon Jan 31, 2005 3:38 am Post subject: |
|
|
/dev/sda i believe |
|
Back to top |
|
|
adsmith Veteran
Joined: 26 Sep 2004 Posts: 1386 Location: NC, USA
|
Posted: Mon Jan 31, 2005 4:18 am Post subject: |
|
|
you just need udev or devfs to load the usb-storage module -- which should all be automatic if you haven't changed anything. it considers it to be a SCSI disk, so if you have no other SCSI disks, it will be /dev/sda(1).
my /etc/fstab entry is this:
Code: |
/dev/sda1 /mnt/usbmem vfat user,sync,noauto,noatime 0 0
|
|
|
Back to top |
|
|
TerranAce007 Apprentice
Joined: 13 Dec 2004 Posts: 281 Location: Texas
|
Posted: Sat Feb 12, 2005 9:05 pm Post subject: |
|
|
when I insert the sd flash card, /dev/sda1 doesn't work, but that's what it should be. I did an ls /dev/ and see no /dev/sdaX devices. Do I need a special kernel config option? _________________ It's all funny until someone gets hurt.
Then it's hilarious. |
|
Back to top |
|
|
adsmith Veteran
Joined: 26 Sep 2004 Posts: 1386 Location: NC, USA
|
Posted: Sat Feb 12, 2005 9:06 pm Post subject: |
|
|
This is a funtion of the following things working properly:
udev or devfsd
hotplug
your usb kernel support (run lsmod and look for uhci-hcd and usb-storage) |
|
Back to top |
|
|
douglas_slac Tux's lil' helper
Joined: 29 Aug 2003 Posts: 89
|
Posted: Sat Feb 12, 2005 9:37 pm Post subject: |
|
|
If it is a multi-card reader then it might not be /dev/sda, the different slots of the multi-card reader are usualy defined as /dev/sda, /dev/sdb, /dev/sdc...
You should take the card, put it in the card reader, and verify that the usb_storage module has loaded, i.e.:
Code: |
douglas # lsmod | grep usb
usb_storage 28160 1
usblp 11136 0
usbhid 29888 0
usbcore 103544 7 usb_storage,usblp,ohci_hcd,uhci_hcd,usbhid,ehci_hcd
|
(Since I was just trying to read my CF card right now, I can just post what I have done...) Then you need to see that the usb_storage module has created the devices for the multi-card reader, by looking at the dmesg output.
Code: |
douglas # dmesg | tail -n 38
Initializing USB Mass Storage driver...
scsi4 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 5
usb-storage: waiting for device to settle before scanning
scsi5 : SCSI emulation for USB Mass Storage devices
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
usb-storage: device found at 4
usb-storage: waiting for device to settle before scanning
Vendor: USB2.0 Model: SMARTMEDIA/XD Rev:
Type: Direct-Access ANSI SCSI revision: 00
Vendor: EPSON Model: SP 825 Storage Rev: 1.10
Type: Direct-Access ANSI SCSI revision: 02
Attached scsi removable disk sda at scsi4, channel 0, id 0, lun 0
Attached scsi generic sg0 at scsi4, channel 0, id 0, lun 0, type 0
Vendor: USB2.0 Model: CompactFlashCard Rev:
Type: Direct-Access ANSI SCSI revision: 00
Attached scsi removable disk sdb at scsi5, channel 0, id 0, lun 0
Attached scsi generic sg1 at scsi5, channel 0, id 0, lun 0, type 0
usb-storage: device scan complete
SCSI device sdc: 2014992 512-byte hdwr sectors (1032 MB)
sdc: assuming Write Enabled
sdc: assuming drive cache: write through
SCSI device sdc: 2014992 512-byte hdwr sectors (1032 MB)
sdc: assuming Write Enabled
sdc: assuming drive cache: write through
/dev/scsi/host4/bus0/target0/lun1: p1
Attached scsi removable disk sdc at scsi4, channel 0, id 0, lun 1
Attached scsi generic sg2 at scsi4, channel 0, id 0, lun 1, type 0
Vendor: USB2.0 Model: SD/MMC card Rev:
Type: Direct-Access ANSI SCSI revision: 00
Attached scsi removable disk sdd at scsi4, channel 0, id 0, lun 2
Attached scsi generic sg3 at scsi4, channel 0, id 0, lun 2, type 0
Vendor: USB2.0 Model: MemoryStick Card Rev:
Type: Direct-Access ANSI SCSI revision: 00
Attached scsi removable disk sde at scsi4, channel 0, id 0, lun 3
Attached scsi generic sg4 at scsi4, channel 0, id 0, lun 3, type 0
usb-storage: device scan complete
|
So, the usb_strorage driver has found the mutli-card reader, created a number of scsi devices for each card slot, and it has seen my GB CF card,
and this is at /dev/sdb.
So from now on I can ut the /dev/sdb1 entry in the fstab for mounting.
I hope this helps.
If you don't see these message, then you need to re-compile the kernel and be careful of the usb driver part. There is a flag for "probe all luns of devices", in the gentoo kernels this is usually off, and only the first card slot of the device will get created. You need to check this flag, and re-compile (or at least I did after I got the multi-card reader, not sure why this flag is not set, I mean why don't you want to probe all lun of a device. I have the device, but I don't really want to be able to use it all?).
Anyway, hope this helps good luck. There really should be no reason to go back to XP, but Gentoo does take a little setting up. The bonus is once it is setup, you can keep upgrading forever and things still work, you won't have to do this again. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|