View previous topic :: View next topic |
Author |
Message |
der bastler Apprentice
Joined: 13 Apr 2003 Posts: 257
|
Posted: Sun Apr 13, 2003 7:27 pm Post subject: USB CF-Reader/SCSI-emulation |
|
|
Hello,
this is my first post after sucessfully installing gentoo on my ASUS L3500D laptop named "Defiant". It was hard to find a laptop not infected by XP, but I kept on searching and finally found it (behaving defiant ).
The Installation Guide and several other docs helped alot, but now even this forum provided no solutions. Guess I've to ask:
I have an usb reader for compact flash cards. I've included the necessary Modules for USB, USB-HID, USB-storage, SCSI-emulation (complete list: refer to x86 installation guide, cd-r note; haven't tested the burner yet), SCSI-disk support, multiple LUNs in my kernel. Kernel's working.
My optical usb-mouse -part of the laptop package- is functioning perfectly, hotplugging included. If I plug in the CF-card reader it is detected and I can find entries in /proc/scsi/scsi and /proc/bus/usb/devices and /dev/scsi/... but no entries /dev/sdx (x = 0..n)? Because it's a CF-I and CF-II reader, two LUNs are detected.
But: If I unplug the reader, the corresponding entries are not deleted. If I replug the reader, new entries are created. Former being device scsi0, the reader becomes scsi1, then scsi2 etc. Mounting seems nearly impossible. What's wrong? _________________ Tempus fugit.
@frank@troet.cafe |
|
Back to top |
|
|
snkmoorthy Guru
Joined: 19 Nov 2002 Posts: 376
|
Posted: Mon Apr 14, 2003 7:56 pm Post subject: |
|
|
how about "mount -t vfat /dev/sda1 /mnt/cf"
assuming you have vfat FS in the card and a mount point called /mnt/cf |
|
Back to top |
|
|
ronmon Veteran
Joined: 15 Apr 2002 Posts: 1043 Location: Key West, FL
|
Posted: Mon Apr 14, 2003 11:44 pm Post subject: |
|
|
This might sound like a silly question, but do you have a CF card in the reader? A /dev/sd* device will not show up until you do.
Here are the fstab entries for my mp3 player and camera (both CF):
Code: |
/dev/sdc1 /home/diva vfat rw,noauto,users,uid=1000,gid=100 0 0
/dev/sdd1 /home/cpx vfat rw,noauto,users,uid=1000,gid=100 0 0
|
This avoids the issue of the musical scsi devices. |
|
Back to top |
|
|
der bastler Apprentice
Joined: 13 Apr 2003 Posts: 257
|
Posted: Wed Apr 16, 2003 1:41 am Post subject: solution? |
|
|
1.) The main problem was that new devices were created with every re-plug. First you have scsi1, then scsi2, etc. Entries in /dev/s* are duplicated, too.
2.) A card was inserted, but /dev/sd*-entries are only created with existent SCSI disk support --which was missing or mis-loaded(?)...
Ok, I fixed this problem with the help of this thread!
The multiple-devices-problem is solved with yannick's script: simply unload the scsi-modules! I don't know why they are not unloaded automatically. The /dev/sd*-problem is solved by loading the SCSI disk support module after hotplug detected the usb-storage-device (see the script below).
I created a directory /var/run/usb and a file /etc/hotplug/usb/usb-storage:
Code: |
#!/bin/bash
# Frank Abelbeck
# April 2003
#
# Skript für Transcend Card Reader
insmod sd_mod
echo "#!/bin/bash" > $REMOVER
echo "rmmod usb-storage sd_mod scsi_mod" >> $REMOVER
chmod a+x $REMOVER
|
These two lines were added to the /etc/fstab-file:
Code: |
/dev/sda1 /mnt/smartcard vfat rw,noauto,user 0 0
/dev/sdb1 /mnt/flashcard vfat rw,noauto,user 0 0
|
and finally there must be two additional mount-points:
/mnt/smartcard
/mnt/flashcard
[It's a Transcend 3-in-1-card-reader: CompactFlash I, CompactFlash II (e.g. IBM Microdrive) and SmartMedia. I only own CF I cards (from my camera) and I can access them in LUN1, i.e. sdb1. CF I and CF II use the same connector (size is the only difference between them, imho). Thus SM-cards ought to be accessible in LUN0, or sda.]
Configuration:
Hotplug is up and running (remember, my optical mouse is functioning),
SCSI-Emulation and other necessary stuff is compiled as kernel module.
ide-scsi, scsi_mod, sr_mod and sg are listed in my /etc/modules.autoload (I've not tested the CD-R/RW-part of my combo drive yet, but to be prepared...). And, of course, SCSI disk support (sd_mod) is needed as module --it's installed if hotplug detects an usb-storage (and calls the script above)
gentoo ... a real bastler-system *sigh*
_________________ Tempus fugit.
@frank@troet.cafe |
|
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
|
|