Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
04-10-2007, 12:22 AM
|
#1
|
Member
Registered: Dec 2004
Distribution: Debian Wheezy
Posts: 444
Rep:
|
Udev rules not holding for device
I have udev running with the 2.6.16.9 kernel on Slackware 11.0. I have a scsi camera device that takes discs from a camera and reads them. The serial for the device is "0000186202," and appears in /dev as sda and sda1. I want to rename these to camera and camera1. The rule I have written looks like this
Code:
BUS="usb", SYSFS{serial}="0000186202", NAME="camera/%n"
This was placed in a file a created called 10-local.rules in /etc/udev/rules.d/. Can you tell me why my camera isn't being named camera or camera1 yet? Thanks.
|
|
|
04-10-2007, 01:41 AM
|
#2
|
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908
|
The answer probably requires information from your hardware. What output do you get when you run 'udevinfo -a -p /sys/block/sda' (without quotes).
The problem may lie with mixing lines from the BUS="scsi" and BUSS="usb" blocks of output in your local rule.
|
|
|
04-10-2007, 02:38 AM
|
#3
|
Member
Registered: Dec 2004
Distribution: Debian Wheezy
Posts: 444
Original Poster
Rep:
|
Multi-Card Reader is the device I'm configuring.
bobby@Joes:~$ udevinfo -a -p /sys/block/sda
Udevinfo starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.
looking at device '/block/sda':
KERNEL=="sda"
SUBSYSTEM=="block"
DRIVER==""
SYSFS{stat}==" 10 11 168 128 0 0 0 0 0 128 128"
SYSFS{size}=="501760"
SYSFS{removable}=="1"
SYSFS{range}=="16"
SYSFS{dev}=="8:0"
looking at parent device '/devices/pci0000:00/0000:00:1f.2/usb4/4-1/4-1:1.0/host0/target0:0:0/0:0:0:0':
ID=="0:0:0:0"
BUS=="scsi"
DRIVER=="sd"
SYSFS{ioerr_cnt}=="0x0"
SYSFS{iodone_cnt}=="0x17"
SYSFS{iorequest_cnt}=="0x17"
SYSFS{iocounterbits}=="32"
SYSFS{timeout}=="30"
SYSFS{state}=="running"
SYSFS{rev}=="0128"
SYSFS{model}=="STORAGE DEVICE "
SYSFS{vendor}=="Generic "
SYSFS{scsi_level}=="3"
SYSFS{type}=="0"
SYSFS{queue_type}=="none"
SYSFS{queue_depth}=="1"
SYSFS{device_blocked}=="0"
SYSFS{max_sectors}=="240"
looking at parent device '/devices/pci0000:00/0000:00:1f.2/usb4/4-1/4-1:1.0/host0/target0:0:0':
ID=="target0:0:0"
BUS==""
DRIVER==""
looking at parent device '/devices/pci0000:00/0000:00:1f.2/usb4/4-1/4-1:1.0/host0':
ID=="host0"
BUS==""
DRIVER==""
looking at parent device '/devices/pci0000:00/0000:00:1f.2/usb4/4-1/4-1:1.0':
ID=="4-1:1.0"
BUS=="usb"
DRIVER=="usb-storage"
SYSFS{modalias}=="usb:v05DCpB018d0128dc00dsc00dp00ic08isc06ip50"
SYSFS{bInterfaceProtocol}=="50"
SYSFS{bInterfaceSubClass}=="06"
SYSFS{bInterfaceClass}=="08"
SYSFS{bNumEndpoints}=="02"
SYSFS{bAlternateSetting}==" 0"
SYSFS{bInterfaceNumber}=="00"
looking at parent device '/devices/pci0000:00/0000:00:1f.2/usb4/4-1':
ID=="4-1"
BUS=="usb"
DRIVER=="usb"
SYSFS{configuration}==""
SYSFS{serial}=="0000186202"
SYSFS{product}=="Multi-Card Reader"
SYSFS{manufacturer}=="Lexar Media "
SYSFS{maxchild}=="0"
SYSFS{version}==" 2.00"
SYSFS{devnum}=="2"
SYSFS{speed}=="12"
SYSFS{bMaxPacketSize0}=="64"
SYSFS{bNumConfigurations}=="1"
SYSFS{bDeviceProtocol}=="00"
SYSFS{bDeviceSubClass}=="00"
SYSFS{bDeviceClass}=="00"
SYSFS{bcdDevice}=="0128"
SYSFS{idProduct}=="b018"
SYSFS{idVendor}=="05dc"
SYSFS{bMaxPower}=="500mA"
SYSFS{bmAttributes}=="80"
SYSFS{bConfigurationValue}=="1"
SYSFS{bNumInterfaces}==" 1"
looking at parent device '/devices/pci0000:00/0000:00:1f.2/usb4':
ID=="usb4"
BUS=="usb"
DRIVER=="usb"
SYSFS{configuration}==""
SYSFS{serial}=="0000:00:1f.2"
SYSFS{product}=="UHCI Host Controller"
SYSFS{manufacturer}=="Linux 2.6.16.9 uhci_hcd"
SYSFS{maxchild}=="2"
SYSFS{version}==" 1.10"
SYSFS{devnum}=="1"
SYSFS{speed}=="12"
SYSFS{bMaxPacketSize0}=="64"
SYSFS{bNumConfigurations}=="1"
SYSFS{bDeviceProtocol}=="00"
SYSFS{bDeviceSubClass}=="00"
SYSFS{bDeviceClass}=="09"
SYSFS{bcdDevice}=="0206"
SYSFS{idProduct}=="0000"
SYSFS{idVendor}=="0000"
SYSFS{bMaxPower}==" 0mA"
SYSFS{bmAttributes}=="c0"
SYSFS{bConfigurationValue}=="1"
SYSFS{bNumInterfaces}==" 1"
looking at parent device '/devices/pci0000:00/0000:00:1f.2':
ID=="0000:00:1f.2"
BUS=="pci"
DRIVER=="uhci_hcd"
SYSFS{modalias}=="pci:v00008086d00002442sv00000E11sd00000083bc0Csc03i00"
SYSFS{local_cpus}=="1"
SYSFS{irq}=="11"
SYSFS{class}=="0x0c0300"
SYSFS{subsystem_device}=="0x0083"
SYSFS{subsystem_vendor}=="0x0e11"
SYSFS{device}=="0x2442"
SYSFS{vendor}=="0x8086"
looking at parent device '/devices/pci0000:00':
ID=="pci0000:00"
BUS==""
DRIVER==""
bobby@Joes:~$
Last edited by binarybob0001; 04-10-2007 at 02:43 AM.
|
|
|
04-10-2007, 02:45 AM
|
#4
|
Member
Registered: Dec 2004
Distribution: Debian Wheezy
Posts: 444
Original Poster
Rep:
|
Lexar Media Multi Card Reader is the device I'm setting up.
|
|
|
04-12-2007, 11:51 PM
|
#5
|
Member
Registered: Dec 2004
Distribution: Debian Wheezy
Posts: 444
Original Poster
Rep:
|
Can anyone give me more help?
|
|
|
04-14-2007, 03:08 PM
|
#6
|
Member
Registered: Dec 2004
Distribution: Debian Wheezy
Posts: 444
Original Poster
Rep:
|
I still can't figure out these rules. Please help.
|
|
|
04-14-2007, 04:04 PM
|
#7
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
Do you even need to configure udev rules for the card-reader? Why won't the regular usb storage device rules work ?
Try running udevmonitor before plugging in the device. Do you have the "halmount" program? If so, and a device node is created, try "halmount /dev/<node>".
You lost me transitioning from a usb camera to a storage device.
|
|
|
All times are GMT -5. The time now is 05:16 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|