Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
udev problems
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
FishB8
l33t
l33t


Joined: 17 Mar 2003
Posts: 820

PostPosted: Mon Aug 09, 2004 9:58 pm    Post subject: udev problems Reply with quote

Ok, I'm a little new to udev so some of these "problems" may be to misconceptions rather than real problems.

First, when I insert a usb pen drive, /dev/sda1 is created like expected and I can mount it. However I'm wondering why there isn't also a /dev/scsi/host0/bus0/target0/lun0/part1 created as well. For that matter, there isn't even a /dev/scsi directory.

Similarly, there isn't a /dev/ieee1394 directory either. I have raw1394 compiled into the kernel but there is no /dev/raw1394, even though
Code:

$ dmesg | grep raw1394
ieee1394: raw1394: /dev/raw1394 device initialized


/sys/bus/ieee1394/drivers/raw1394 is showing up just fine. The same is true for each of dv1394, sbp2, and video1394

I'm using gentoo-dev-sources-2.6.7-r11, the latest hotplug, and everything concerning scsi and ieee1394 is compiled statically in the kernel. This isn't a udev rules issue is it?
_________________
"...as we enjoy great advantages from the inventions of others, we should be glad of an opportunity to serve others by any invention of ours, and this we should do freely and generously." -Benjamin Franklin
Back to top
View user's profile Send private message
FishB8
l33t
l33t


Joined: 17 Mar 2003
Posts: 820

PostPosted: Tue Aug 10, 2004 1:27 am    Post subject: Reply with quote

Ok I think this is a udev rules issue. I've added rules so that scsi gets mapped the way it did with devfs by adding

Code:

BUS="scsi", KERNEL="sd*", PROGRAM="/etc/udev/scripts/scsi-devfs.sh sd %b %n", NAME="%c{1}", SYMLINK="%c{2} %k %c{3} %c{4}"
BUS="scsi", KERNEL="sr*", PROGRAM="/etc/udev/scripts/scsi-devfs.sh sr %b %n", NAME="%c{1}", SYMLINK="%c{2} %k %c{3} %c{4}"
BUS="scsi", KERNEL="st*", PROGRAM="/etc/udev/scripts/scsi-devfs.sh st %b %n", NAME="%c{1}", SYMLINK="%c{2} %k %c{3} %c{4}"
BUS="scsi", KERNEL="sg*", PROGRAM="/etc/udev/scripts/scsi-devfs.sh sg %b %n", NAME="%c{1}", SYMLINK="%c{2} %k %c{3} %c{4}"


to my rules.


Getting things like /dev/raw1394 /dev/dv1394 and /dev/video1394 seem like they might be a little harder. I can't find any corrosponding dev files within /sys/bus or /sys/class that I can use for mapping these nodes.

Anybody have any ideas?

This web site helps:
http://www.reactivated.net/udevrules.php
_________________
"...as we enjoy great advantages from the inventions of others, we should be glad of an opportunity to serve others by any invention of ours, and this we should do freely and generously." -Benjamin Franklin
Back to top
View user's profile Send private message
FishB8
l33t
l33t


Joined: 17 Mar 2003
Posts: 820

PostPosted: Tue Aug 10, 2004 2:24 am    Post subject: Reply with quote

Apparently udev doesn't support mapping the device nodes for firewire drivers properly yet so you have to map them by hand. :roll:

Code:

mknod -m 666 /dev/video1394/0 c 171 16
mknod -m 666 /dev/raw1394 c 171  0
mknod -m 666 /dev/dv1394 c 171 32


yuck. Does anybody know of a more elegant way of doing this with udev?
_________________
"...as we enjoy great advantages from the inventions of others, we should be glad of an opportunity to serve others by any invention of ours, and this we should do freely and generously." -Benjamin Franklin
Back to top
View user's profile Send private message
swingarm
l33t
l33t


Joined: 08 Jun 2002
Posts: 627
Location: Northern Colorado

PostPosted: Tue Aug 10, 2004 6:06 am    Post subject: Reply with quote

Here's a site on how to write udev rules:

http://www.reactivated.net/udevrules.php


I used it with both my usb pen drives and external firewire hard drive.
Back to top
View user's profile Send private message
FishB8
l33t
l33t


Joined: 17 Mar 2003
Posts: 820

PostPosted: Tue Aug 10, 2004 5:44 pm    Post subject: Reply with quote

thanks swingarm, but you might notice I already mentioned that url in my second post. :wink:

I found a more "elegant solution" by first turning off the RC_DEVICE_TARBALL option so that all those extra nodes that I don't need get trashed (I had already done that) but then I turned it back on and created the firewire nodes I wanted to show up. This way thay are restored when I boot up without all the extra device nodes hogging space in the /dev directory.

The only downside to this is that there are no corrosponding entries generated within /proc I think it will work for now, but those missing /proc entries may cause problems. :(

Code:

mknod -m 666 /dev/raw1394 c 171 0
mknod -m 666 /dev/video1394/0 c 171 16
mknod -m 666 /dev/ieee1394/dv/host0/NTSC/in c 171 32
mknod -m 666 /dev/ieee1394/dv/host0/NTSC/out c 171 33
mknod -m 666 /dev/ieee1394/dv/host0/PAL/in c 171 34
mknod -m 666 /dev/ieee1394/dv/host0/PAL/out c 171 35

_________________
"...as we enjoy great advantages from the inventions of others, we should be glad of an opportunity to serve others by any invention of ours, and this we should do freely and generously." -Benjamin Franklin


Last edited by FishB8 on Mon Aug 16, 2004 11:15 pm; edited 1 time in total
Back to top
View user's profile Send private message
swingarm
l33t
l33t


Joined: 08 Jun 2002
Posts: 627
Location: Northern Colorado

PostPosted: Wed Aug 11, 2004 6:52 am    Post subject: Reply with quote

FishB8 wrote:
thanks swingarm, but you might notice I already mentioned that url in my second post. :wink:


Oops, thats what I get for not reading the whole thread. ;)
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