View previous topic :: View next topic |
Author |
Message |
James Wells n00b
Joined: 10 Sep 2004 Posts: 57
|
Posted: Thu Jun 29, 2006 4:20 pm Post subject: [Heads Up] udev-94 requires a few fixes |
|
|
Greetings,
For those who run on the ~x86 branch, the most recent udev update, updates udev to 094, which is a bit more strict in rule processing.
With the new udev in place, you will recieve errors that state 'invalid KERNEL operation' and will refer to a line in one or more of the udev rules. The most common will be in 30-svgalib.rules, which looks like so;
Code: | KERNEL="svga*", NAME="%k", MODE="0660", GROUP="video" |
To correct the file, you will need to add a single equal sign (=) between KERNEL and "svga". The corrected file will look like this;
Code: | KERNEL=="svga*", NAME="%k", MODE="0660", GROUP="video" |
The new udev uses C-like syntax for assignment (=) and comparison (==). Because of this, you will need to modify all of your custom rules to ensure that when you are doing a comparison, that you use the == and when you perform an assignment, you use the =
EDIT: DOH!!!. Thanx for catching that Cerebus.
Last edited by James Wells on Fri Jun 30, 2006 3:43 am; edited 1 time in total |
|
Back to top |
|
|
cerebus_k Apprentice
Joined: 20 Jun 2003 Posts: 173 Location: Flower Mound, Texas
|
Posted: Fri Jun 30, 2006 12:58 am Post subject: |
|
|
After finding your bug https://bugs.gentoo.org/show_bug.cgi?id=138531 I fugured out that your example of the correct line should have read
Code: |
KERNEL=="svga*", NAME="%k", MODE="0660", GROUP="video"
|
(you didn't add the extra = in your "the corrected file will look like this" example)
At least I think that's what I figured out.
Thanks for the heads up.
bill _________________ Gettin old isn't for wimps |
|
Back to top |
|
|
golding Apprentice
Joined: 07 Jun 2005 Posts: 232 Location: Adelaide / South Australia
|
Posted: Fri Jun 30, 2006 7:59 am Post subject: Re: [Heads Up] udev-94 requires a few fixes |
|
|
James Wells wrote: | Greetings,
The new udev uses C-like syntax for assignment (=) and comparison (==). Because of this, you will need to modify all of your custom rules to ensure that when you are doing a comparison, that you use the == and when you perform an assignment, you use the =
|
Comparisons include BUS and SYSFS{xx}, i.e Code: | BUS=="scsi", SYSFS{model}=="C5110A ", KERNEL=="sg[0-9]*", NAME="%k", SYMLINK+="scanner", GROUP="scanner" |
as I found out after my scanner refused to work and MUCH hair pulling _________________ Regards, Robert
..... Some people can tell what time it is by looking at the sun, but I have never been able to make out the numbers. |
|
Back to top |
|
|
rolypoly Tux's lil' helper
Joined: 30 Nov 2003 Posts: 143
|
Posted: Tue Jul 04, 2006 10:37 am Post subject: |
|
|
Hi,
Even following the advice here, I still can't get udev to create the correct symlinks in /dev
Here is my /etc/udev/rules.d/55-custom.rules file
Code: |
BUS=="scsi", SYSFS{vendor}=="Apple*", SYSFS{model}=="iPod*", KERNEL="sd?2", SYMLINK+="ipod", GROUP="plugdev"
BUS=="scsi", SYSFS{vendor}=="IC25N040", SYSFS{model}=="ATCS04-0", KERNEL="sd?1", NAME="%k", SYMLINK+="usbdisk", GROUP="plugdev"
|
I have a iPod Nano that I'd like detected as /dev/ipod and I have a usb attached 40Gb hard drive that I'd like attached as /dev/usbdisk
This used to work before udev 094, so I've been looking around the forums to see what's up and I thought this thread was the solution (and maybe it will be? - gotta think positive, eh?)
On the SYMLINK part of the rules, is it meant to be += between SYMLINK and the dev name? Or is that a typo and it should either be == or = ?
At the moment, I plug in the iPod and it is recognised as /dev/sde2 and then the usbdisk is recognised as /dev/sdf1 and vice versa if they are plugged in in the other order.
Can anyone offer advice?
Thanks,
Roland. |
|
Back to top |
|
|
golding Apprentice
Joined: 07 Jun 2005 Posts: 232 Location: Adelaide / South Australia
|
Posted: Tue Jul 04, 2006 8:05 pm Post subject: |
|
|
rolypoly wrote: | Hi,
Even following the advice here, I still can't get udev to create the correct symlinks in /dev
Here is my /etc/udev/rules.d/55-custom.rules file
Code: |
BUS=="scsi", SYSFS{vendor}=="Apple*", SYSFS{model}=="iPod*", KERNEL="sd?2", SYMLINK+="ipod", GROUP="plugdev"
BUS=="scsi", SYSFS{vendor}=="IC25N040", SYSFS{model}=="ATCS04-0", KERNEL="sd?1", NAME="%k", SYMLINK+="usbdisk", GROUP="plugdev"
|
I have a iPod Nano that I'd like detected as /dev/ipod and I have a usb attached 40Gb hard drive that I'd like attached as /dev/usbdisk
This used to work before udev 094, so I've been looking around the forums to see what's up and I thought this thread was the solution (and maybe it will be? - gotta think positive, eh?)
On the SYMLINK part of the rules, is it meant to be += between SYMLINK and the dev name? Or is that a typo and it should either be == or = ?
At the moment, I plug in the iPod and it is recognised as /dev/sde2 and then the usbdisk is recognised as /dev/sdf1 and vice versa if they are plugged in in the other order.
Can anyone offer advice?
Thanks,
Roland. |
You need to put a double equal sign (==) in front of KERNEL, like this:and I don't know if it is needed or not, but I would add NAME="%k" to the ipod line as well. Another thing I would do differently is the use of * instead of ? as the variable.
The modified lines would be these: Code: | BUS=="scsi", SYSFS{vendor}=="Apple*", SYSFS{model}=="iPod*", KERNEL=="sd*2", NAME="%k", SYMLINK+="ipod", GROUP="plugdev"
BUS=="scsi", SYSFS{vendor}=="IC25N040", SYSFS{model}=="ATCS04-0", KERNEL=="sd*1", NAME="%k", SYMLINK+="usbdisk", GROUP="plugdev"
|
One more thing, make sure that SYSFS{model} & SYSFS{vendor} are character perfect, including any spaces, use udevinfo to check. As an example, my scanner is Code: | SYSFS{model}=="C5110A " | see the 10 spaces after the six digit # number.
Go to Writing Udev Rules for more info. _________________ Regards, Robert
..... Some people can tell what time it is by looking at the sun, but I have never been able to make out the numbers. |
|
Back to top |
|
|
rolypoly Tux's lil' helper
Joined: 30 Nov 2003 Posts: 143
|
Posted: Wed Jul 05, 2006 9:53 am Post subject: |
|
|
Robert,
Thanks for the advice, but it's still not working
I've had a look at the link you provided and that has helped with some other questions I had, but I'm still stumped as to what I should try next, other than waiting for the next release of udev.
Should have stuck with the working copy from a few months ago and not upgraded for the sake of it.
Roland. |
|
Back to top |
|
|
golding Apprentice
Joined: 07 Jun 2005 Posts: 232 Location: Adelaide / South Australia
|
Posted: Thu Jul 06, 2006 12:00 am Post subject: |
|
|
rolypoly wrote: | Should have stuck with the working copy from a few months ago and not upgraded for the sake of it. |
Try this, and use your original rules of course; Code: | emerge -av =sys-fs/udev-[version #] | and replace [version #] with the last one you had working.
This will get you up and running till you sort out the problems with the new version, OK
Other than that, to use the new version, your old rules should work! You should only need to fix the sintax errors with your original rule, the only changes I was aware of this time were to do with fixing it so udev was more pedantic with the rules sintax. I only had to change a couple of single equal signs to doubles _________________ Regards, Robert
..... Some people can tell what time it is by looking at the sun, but I have never been able to make out the numbers. |
|
Back to top |
|
|
rolypoly Tux's lil' helper
Joined: 30 Nov 2003 Posts: 143
|
Posted: Thu Jul 06, 2006 12:32 am Post subject: |
|
|
I think there was another package that required the update to udev, but I'm not 100% sure.
However, I've tried the same rules on my work laptop (also running gentoo with udev 094) and they work perfectly! Which would suggest there is something else wrong.
Guess I've got some digging to do now to work out what is different between my work laptop and my home PC
Thanks for your help. I know the rules work, now, so I'll keep looking elsewhere.
Cheers,
Roland. |
|
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
|
|