Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
udev, 2.6.7-gentoo-r11, and usb card reader troubles
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
warthog
Tux's lil' helper
Tux's lil' helper


Joined: 11 Aug 2003
Posts: 82
Location: Seattle (Eastside)

PostPosted: Sun Jul 25, 2004 6:32 am    Post subject: udev, 2.6.7-gentoo-r11, and usb card reader troubles Reply with quote

OK, so I've been pulling my hair out for a couple of days trying to get this to work. I've searched the forums for hours, trying different things. I've read the UDEV primer and the UDEV rules howto document, both which are excellent. BUT, for some reason I'm having trouble getting my usb card reader to work. Here are the details:

My hardware: USB 11-in-1 card reader (it worked fine previously with 2.4.22-gentoo-rXX running devfs)
The card: Fuji xD card from my digital camera

I performed a fresh install of gentoo 2004.2 on new hard-drive, running gentoo-dev-sources (with the necessary kernel options), and configured udev per the gentoo documentation (although I don't believe it's a 'pure' udev setup)

I know USB is working because my usb webcam (pwc) works fine.

I can tell the device is being detected from the dmesg output:

Code:
usb 1-4: new high speed USB device using address 2
scsi0 : SCSI emulation for USB Mass Storage devices
  Vendor: AFT PRO   Model: - 9 CF            Rev: 0822
  Type:   Direct-Access                      ANSI SCSI revision: 02
Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0
Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0,  type 0


my addition to '/etc/udev/rules.d/50-udev.rules' (taken from Writing udev rules -- do I need the KERNEL part?)
Code:

BUS="usb", SYSFS{product}="PRO-IX", NAME{all_partitions}="usbcard" SYMLINK="usbcard-%n"


So I end up with /dev/sda, which I cannot mount:
Code:
# mount -t vfat /dev/sda /mnt/removable
mount: No medium found


With devfs and 2.4.22, I always had a /dev/sda1, but I don't have that now. It seems to me that I should have something like /dev/usbcard if my udev rule was working right. In any case, I ran some udev investigation commands:

is this bad?
Code:
# udevinfo -q path /dev/sda
unable to open udev database


here's the info I based the above 'rules' command from:
Code:

# udevinfo -a -p /sys/block/sda/
<...>
 looking at the device chain at '/sys/devices/pci0000:00/0000:00:02.2/usb1/1-4':
    BUS="usb"
    ID="1-4"
    SYSFS{bConfigurationValue}="1"
    SYSFS{bDeviceClass}="00"
    SYSFS{bDeviceProtocol}="00"
    SYSFS{bDeviceSubClass}="00"
    SYSFS{bMaxPower}="500mA"
    SYSFS{bNumConfigurations}="1"
    SYSFS{bNumInterfaces}=" 1"
    SYSFS{bcdDevice}="0005"
    SYSFS{bmAttributes}="80"
    SYSFS{detach_state}="0"
    SYSFS{devnum}="2"
    SYSFS{idProduct}="6787"
    SYSFS{idVendor}="11b0"
    SYSFS{manufacturer}="Atech Flash."
    SYSFS{maxchild}="0"
    SYSFS{product}="PRO-IX"
    SYSFS{serial}="399600212137"
    SYSFS{speed}="480"
    SYSFS{version}=" 2.00"
<...>


I don't know what else to try. Did I miss something? Please, please, tell me if you have any ideas or if you can point me to the appropriate thread. Thanks!!! :wink:
Back to top
View user's profile Send private message
warthog
Tux's lil' helper
Tux's lil' helper


Joined: 11 Aug 2003
Posts: 82
Location: Seattle (Eastside)

PostPosted: Sun Jul 25, 2004 5:47 pm    Post subject: more information Reply with quote

This might shed some light on my udev problems: I tried connecting my usb hp deskjet printer, and I noticed that a device node got created at /dev/usb/lp0. I wanted it to be created as /dev/usblp0 instead, so I modified the udev rule as follows:

original
Code:
BUS="usb", KERNEL="lp[0-9]*",  NAME="usb/%k"

modified
Code:
BUS="usb", KERNEL="lp[0-9]*",   NAME="usb%k"


however, upon rebooting, I noticed that the device node is still being created as /dev/usb/lp0. So assuming I've got the udev rule modified correctly, this tells me that my rules file isn't getting read for some reason. Do I not have udev configured properly? I've even tried passing 'gentoo=nodevfs' to the kernel upon boot. I've reviewed the Gentoo udev Guide several times now, and I just don't understand where I've gone wrong. Please help!
Back to top
View user's profile Send private message
riprjak
Tux's lil' helper
Tux's lil' helper


Joined: 26 Apr 2003
Posts: 116
Location: Adelaide, Au

PostPosted: Sat Jul 31, 2004 12:34 am    Post subject: Reply with quote

Your problem would seem to be similar to mine...

Quote:
# udevinfo -q path /dev/sda
unable to open udev database


If you check /etc/udev/udev.conf, you will see that udev needs a location to place its database and the default is /dev/.udev.tdv

However, I have the problem that this file does not exist (and, therefore, devices are not being created other than in /dev/scsi/.....).

Unfortunately I dont have a solution to offer yet; but if we solve the problem with database creation, all other things will fall into place.

EDIT: Are you using a bootsplash and genkernel; it seems that when I build a bzImage manually (not using genkernel) and disable my bootsplash initrd, then udev is properly enabled; yet if I use genkernel and its initrd, it fscks up the udev database creation in /dev.

err!
jak
_________________
---
$> cd /pub
$> more beer > /home/riprjak/.mouth
Back to top
View user's profile Send private message
warthog
Tux's lil' helper
Tux's lil' helper


Joined: 11 Aug 2003
Posts: 82
Location: Seattle (Eastside)

PostPosted: Mon Aug 02, 2004 4:26 am    Post subject: Reply with quote

Very interesting... I am indeed using genkernel with bootsplash, and I agree that the udev database is obviously not being created properly. But why? I have a feeling it has something to do with Gentoo's partial udev/devfs setup. I followed the Gentoo instructions to the letter, so I don't know what else it could be...
_________________
Gentoo Linux 2.6.7-gentoo-r11 running Gnome 2.6
Asus nForce2
AthlonXP 3000 Barton
1GB Corsair DDR TwinX
Back to top
View user's profile Send private message
riprjak
Tux's lil' helper
Tux's lil' helper


Joined: 26 Apr 2003
Posts: 116
Location: Adelaide, Au

PostPosted: Tue Aug 03, 2004 12:44 am    Post subject: Reply with quote

warthog wrote:
Very interesting... I am indeed using genkernel with bootsplash, and I agree that the udev database is obviously not being created properly. But why? I have a feeling it has something to do with Gentoo's partial udev/devfs setup. I followed the Gentoo instructions to the letter, so I don't know what else it could be...


I havent finished testing; but it would appear that the initrd greated by genkernel does something odd to udev... whilst udevd is running; the init output doesnt print "managing devices with udev" as it does for a boot from a vanilla kernel with no bootsplash.

hmmmm
err!
jak
_________________
---
$> cd /pub
$> more beer > /home/riprjak/.mouth
Back to top
View user's profile Send private message
Nadhor
n00b
n00b


Joined: 03 Feb 2003
Posts: 58
Location: Germany

PostPosted: Tue Aug 03, 2004 8:18 am    Post subject: Reply with quote

I'm not sure, but I don't hink the problem lies with genkernel or initrd. I'm using 2.6.7-r5 and -r11, but no genkernel or initrd, and have seemingly similar troubles with my cardreader. I didn't change anything with udev and this file in /dev doesn't exist either.
I have a 6-in-1 Cardreader and only load the modul usb-storage if needed. But it seems to be some gamble, if linux will create an /dev/sda1 or not. Sometimes it does, sometimes not. Sometimes it only creates /dev/sda, sometimes not even this. But nearly always not even a rmmod -f usb-storage does unload the module.
An USB-Stick I have works just fine.
Someone was of the oppinion, it could have something to do with a too standard conform implementation of the usb stack in linux and therefore devices which stretch these standards a ltttle aren't handled properly.
Or something is borked in the interaction between scsi with Multiple-LUN support, as needed by most X-in-1 Cardreaders, and the usb modules.
Back to top
View user's profile Send private message
riprjak
Tux's lil' helper
Tux's lil' helper


Joined: 26 Apr 2003
Posts: 116
Location: Adelaide, Au

PostPosted: Wed Aug 04, 2004 2:01 am    Post subject: Reply with quote

hmmm...

this is beginning to smell like a bug. Anyone else not getting their udev database created??

err!
jak.
_________________
---
$> cd /pub
$> more beer > /home/riprjak/.mouth
Back to top
View user's profile Send private message
reptile
Guru
Guru


Joined: 19 Nov 2002
Posts: 363

PostPosted: Wed Aug 11, 2004 1:46 pm    Post subject: Reply with quote

hi folks,

inspired by your ideas regarding udev and persistent file names (and the need to just copy something off of a cf card), i played around a bit with udev and the tutorial.

i have indeed managed to mount the cards, but not via BUS="usb", but BUS="scsi".

so my rules file looks like this:

Code:


bash-2.05b# cat /etc/udev/rules.d/10-local.rules
BUS="scsi", SYSFS{model}="CF Card       CF", SYSFS{vendor}="ICSI    ", NAME="cardreader/cfcard"
BUS="scsi", SYSFS{model}="SD Card   MMC/SD", SYSFS{vendor}="ICSI    ", NAME="cardreader/sdcard"
BUS="scsi", SYSFS{model}="              SM", SYSFS{vendor}="ICSI    ", NAME="cardreader/smartmedia"
BUS="scsi", SYSFS{model}="MS Card       MS", SYSFS{vendor}="ICSI    ", NAME="cardreader/mstick"




<EDIT>
i forgot, of course, the node files are in /dev/cardreader/{sdcard,smartmedia,...}.

i also like submount doing the automatted mounting for me. especially useful in conjunction with the mount option sync, so you can copy something over, and when the copy process has completed (e.g. in kde or gnome), you can safely pull the card out.
</EDIT>

<EDIT 2>
my /etc/fstab entries for submount:
Code:


/dev/cardreader/cfcard  /mnt/cfcard     subfs   fs=floppyfss,ro,umask=0,sync    0 0
/dev/cardreader/sdcard  /mnt/sdcard     subfs   fs=floppyfss:vfat,ro,umask=0,sync       0 0
/dev/cardreader/smartmedia      /mnt/smartmedia subfs   fs=floppyfss:vfat,ro,umask=0,sync       0 0
/dev/cardreader/mstick  /mnt/mstick     subfs   fs=floppyfss:vfat,ro,umask=0,sync       0 0



</EDIT 2>

hth, reptile
Back to top
View user's profile Send private message
darkangael
Tux's lil' helper
Tux's lil' helper


Joined: 04 Jul 2003
Posts: 132

PostPosted: Tue Aug 17, 2004 2:36 pm    Post subject: Reply with quote

my db isnt being made either using genkernel. Gonna try without the initrd.
Back to top
View user's profile Send private message
darkangael
Tux's lil' helper
Tux's lil' helper


Joined: 04 Jul 2003
Posts: 132

PostPosted: Tue Aug 17, 2004 3:09 pm    Post subject: Reply with quote

not using the initrd from genkernel fixed it. I am using bootsplash btw.
Back to top
View user's profile Send private message
sog
Guru
Guru


Joined: 04 Apr 2004
Posts: 356

PostPosted: Fri Oct 15, 2004 3:32 am    Post subject: Reply with quote

anybody ever get a definitive answer on this? my db is apparently not being created, and i'm not using genkernel or initrd.

i'm trying to get info on my USB key to make the automounting work, but when i get this similar to everyone else.
Code:

# udevinfo -q path /dev/sda
unable to open udev database

_________________
------------------------------------------------
(blog) http://www.redmonk.com/sogrady/
Back to top
View user's profile Send private message
deadmoo
n00b
n00b


Joined: 02 Feb 2004
Posts: 55
Location: MD

PostPosted: Fri Oct 15, 2004 3:48 am    Post subject: Reply with quote

i don't know if this is going to help any but as just a reminder. if you are using a 6in1 or 8in1 or other *in1 card reader you should enable the the "probe all luns" option in the SCSI section of the kernel config.
Back to top
View user's profile Send private message
sog
Guru
Guru


Joined: 04 Apr 2004
Posts: 356

PostPosted: Fri Oct 15, 2004 4:07 am    Post subject: Reply with quote

i'm sorry, but i'm not sure what reader you're referring to. basically i'm just trying to get my standard USB ports to mount an USB key (and digital camera, but one step at a time).

is the reader something i'm just not familiar with?
_________________
------------------------------------------------
(blog) http://www.redmonk.com/sogrady/
Back to top
View user's profile Send private message
cnot
n00b
n00b


Joined: 17 Dec 2003
Posts: 16

PostPosted: Tue Nov 09, 2004 4:10 am    Post subject: Reply with quote

i'm having the same problem with the database not being created. In grub.conf I added gentoo=nodevfs otherwise I haven't recompiled the kernel (I checked all the required things were included in the kernel though).

What is it that will create the database?
Back to top
View user's profile Send private message
russryder
Tux's lil' helper
Tux's lil' helper


Joined: 28 Aug 2002
Posts: 133

PostPosted: Mon Nov 29, 2004 12:37 am    Post subject: Reply with quote

**BUMP**
same problem here....still no answer??
_________________
System Specs
Athlon XP 2500+
1.5g ram
GeForce FX 5700 Ultra
Soundblaster Live
200gb hdd
gentoo-dev-sources 2.6.9 r4
screenshot http://russbox.sytes.net/screenshot.png
Back to top
View user's profile Send private message
farid
n00b
n00b


Joined: 06 Jul 2003
Posts: 12

PostPosted: Mon Nov 29, 2004 6:05 pm    Post subject: Reply with quote

Kernel 2.6.9
baselayout 1.11.6-r1
no bootsplash but using genkernel:

devfsd will be used until i drop it from kernel config but then
my bootup stops cause it does not find me SATA disk

only once the last 20 kernel builds i saw the the genkernel-compile-message that
it was compiling udev support into initrd:
of course i used --udev as option to genkernel all the time.
All other times the bootup gives me:
"You wanted udev but support for it was not available!"

hmm...
Back to top
View user's profile Send private message
russryder
Tux's lil' helper
Tux's lil' helper


Joined: 28 Aug 2002
Posts: 133

PostPosted: Mon Nov 29, 2004 6:20 pm    Post subject: Reply with quote

from my experience it's hard to get UDev to work properly with genkernel. have you tried compiling w/o genkernel to see if that fixes your problem? Compiling my own kernel fixed my main udev problems.
_________________
System Specs
Athlon XP 2500+
1.5g ram
GeForce FX 5700 Ultra
Soundblaster Live
200gb hdd
gentoo-dev-sources 2.6.9 r4
screenshot http://russbox.sytes.net/screenshot.png
Back to top
View user's profile Send private message
farid
n00b
n00b


Joined: 06 Jul 2003
Posts: 12

PostPosted: Mon Nov 29, 2004 6:43 pm    Post subject: Reply with quote

no, i have not tried it yet...
and since i am not really in need of using genkernel
and initrd i will give it a try: so back to the roots! :-)
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3424

PostPosted: Tue Nov 30, 2004 2:27 pm    Post subject: genkernel and udev Reply with quote

russryder wrote:
from my experience it's hard to get UDev to work properly with genkernel. have you tried compiling w/o genkernel to see if that fixes your problem? Compiling my own kernel fixed my main udev problems.


I recently migrated to udev, and it wasn't without it's problems. I used the "--udev" switch with genkernel, and still didn't see the /dev/.udev.??? database being created. I tried the "nodevfs" switch in the grub command line, and was unable to boot, because it couldn't find my hard disk. Reading through the initscripts it appeared that if udev was invoked, devfs would not be. But in my case it looked like both udevd and devfsd were running.

Eventually, just thrashing around trying various things, I finally noticed that the /dev/.udev.??? database really did exist, and only udevd was running, not devfsd. At that point, I was able to add the "gentoo=nodevfs" flag (note that it wasn't "nodevfs", and I'm not sure if that's significant, I read more documentation between attempts.) and am booting purely udev, now.

It appears to me that this really is an issue that requires multiple reboots to solve, in order for the initscripts to clear out evidence of devfs and start putting the udev stuff into place. But that's only a guess. At this point, I've got a stable system, and on my next kernel upgrade I'm going to remove all traces of devfs. (emerge -C)

But the immediate problem is that I got a flash reader yesterday, and can't seem to read anything. That's how I found this thread. I get:
/dev/sg0 /dev/sda
/dev/sg1 /dev/sdb
/dev/sg2 /dev/sdc
/dev/sg3 /dev/sdd
But I can't actually access any of those devices, nor do I find partitions. That's what got me to this thread. At least now I have some more ideas to pursue, but thought I could add a few words about my recent udev conversion. Since I have a k6-3 (rather slow) I haven't been in a big hurry to take on the "emerge -e world" that will be needed if/when I convert to NPTL, as suggested in the 2.6 migration guide. OpenOffice alone took about 48 hours.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
russryder
Tux's lil' helper
Tux's lil' helper


Joined: 28 Aug 2002
Posts: 133

PostPosted: Tue Nov 30, 2004 3:27 pm    Post subject: Reply with quote

Quote:
depontius wrote
But the immediate problem is that I got a flash reader yesterday, and can't seem to read anything. That's how I found this thread. I get:
/dev/sg0 /dev/sda
/dev/sg1 /dev/sdb
/dev/sg2 /dev/sdc
/dev/sg3 /dev/sdd
But I can't actually access any of those devices, nor do I find partitions. That's what got me to this thread. At least now I have some more ideas to pursue, but thought I could add a few words about my recent udev conversion. Since I have a k6-3 (rather slow) I haven't been in a big hurry to take on the "emerge -e world" that will be needed if/when I convert to NPTL, as suggested in the 2.6 migration guide. OpenOffice alone took about 48 hours.


check out this link....it helped me out w/ my cardreader:
http://www.reactivated.net/writing_udev_rules.html#example-camera
_________________
System Specs
Athlon XP 2500+
1.5g ram
GeForce FX 5700 Ultra
Soundblaster Live
200gb hdd
gentoo-dev-sources 2.6.9 r4
screenshot http://russbox.sytes.net/screenshot.png
Back to top
View user's profile Send private message
farid
n00b
n00b


Joined: 06 Jul 2003
Posts: 12

PostPosted: Tue Nov 30, 2004 7:41 pm    Post subject: tested without genkernel Reply with quote

and the basic things worked out of the box - if i can say so...:
bootup, network and sound... but

my PS/2 mouse is not recognized anymore
therefore X11 does not start and in the end:
i have a RADEON 9800Pro (with ATI Drivers!)
- i think the outlay is two big: all that worked with
devfsd does not without it ( and with udev )

allready back to devfsd...
Back to top
View user's profile Send private message
russryder
Tux's lil' helper
Tux's lil' helper


Joined: 28 Aug 2002
Posts: 133

PostPosted: Tue Nov 30, 2004 8:10 pm    Post subject: Reply with quote

farid said:
Quote:
my PS/2 mouse is not recognized anymore
therefore X11 does not start and in the end:



Just change your XF86Config to update the udev location of the mouse

Code:
Option "Device"      "/dev/misc/psaux"


That worked for me, if you have a usb mouse it may be a little different, but don't give up on something as simple as that. Udev is so much better than devfs once it you have it setup properly.
_________________
System Specs
Athlon XP 2500+
1.5g ram
GeForce FX 5700 Ultra
Soundblaster Live
200gb hdd
gentoo-dev-sources 2.6.9 r4
screenshot http://russbox.sytes.net/screenshot.png
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3424

PostPosted: Wed Dec 01, 2004 2:40 am    Post subject: usb reader problems Reply with quote

russryder wrote:
Quote:
depontius wrote
But the immediate problem is that I got a flash reader yesterday, and can't seem to read anything. That's how I found this thread. I get:
/dev/sg0 /dev/sda
/dev/sg1 /dev/sdb
/dev/sg2 /dev/sdc
/dev/sg3 /dev/sdd
But I can't actually access any of those devices, nor do I find partitions. That's what got me to this thread. At least now I have some more ideas to pursue, but thought I could add a few words about my recent udev conversion. Since I have a k6-3 (rather slow) I haven't been in a big hurry to take on the "emerge -e world" that will be needed if/when I convert to NPTL, as suggested in the 2.6 migration guide. OpenOffice alone took about 48 hours.


check out this link....it helped me out w/ my cardreader:
http://www.reactivated.net/writing_udev_rules.html#example-camera


Nothing so sophisticated. Shall we say... mechanical problems.
It's a rather cheap "corporate gift" 4-socket reader, and I could read neither the memory stick from my camera, nor the SD card I bought to go with roCA. (Bootable Knoppix Certificate Authority CD using tinyCA) Eventually I found I wasn't seating the memory stick properly, and was able to read my photos. Much later I found that my SD card *was* preformatted, but it had to plug into the socket upside-down, compared to the memory stick. I looked at it and said, "If I was making something *this cheap* I would put all the metal in the middle. Sure enough it worked. This was after a much more painful MESS on my Win98SE box, getting drivers properly installed. MUCH worse than rebuilding a kernel to get the multiple LUNs thing fixed.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
farid
n00b
n00b


Joined: 06 Jul 2003
Posts: 12

PostPosted: Tue Dec 07, 2004 6:39 pm    Post subject: Re: tested without genkernel Reply with quote

farid wrote:
and the basic things worked out of the box - if i can say so...:
bootup, network and sound... but

my PS/2 mouse is not recognized anymore
therefore X11 does not start and in the end:
i have a RADEON 9800Pro (with ATI Drivers!)
- i think the outlay is two big: all that worked with
devfsd does not without it ( and with udev )

allready back to devfsd...


i got i working last night! even without saving the /dev.. tar.bz2
at shutdown. so it's a really udev-only system now...

- updated baselayout to 1.11.7-r2
- changed the the udev-version to 046 in /etc/genkernel.conf (was 039! - but have 046 installed) - but that did not the trick
- kompiled the kernel without genkernel and without devfs (not only without the "mount at boot" option but completely without devfs

and works great! even with my ATI
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
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