Skip to contentSkip to conversation

Is a new udev version planned to go with linux 2.6.1 ? (rules don't work anymore)

DISCUSSION Remco 2 participants 3 messages Jan 9, 2004

lore
Share & tools
lore

Remco

author
#0 lore raw

I updated to kernel 2.6.1 today and noticed that none of the udev rules got applied. All device nodes created by udev have their standard (kernel) values.

I noticed two different cases in my logs, one using a callout rule (case 1), the other using a replace rule (case 2).

It seems that now all devices are affected by the problem where the device link has not yet appeared in sysfs. (before this only happened to USB storage as was mentioned in the mailing list)

I wondered maybe this was all planned and a new udev version lies waiting to go with linux 2.6.1. I'm currently using udev-012.

=>
=> case 1
=> # IDE - hd* (CD and HD) devices
=> CALLOUT, BUS="ide", PROGRAM="/home/remco/udev/ide-devfs.sh %k %b %n", ID="hd*", NAME="%2c" #, SYMLINK="%1c"
=>

Jan  9 16:21:09 vp6 udev[2899]: main: version 012
Jan  9 16:21:09 vp6 udev[2899]: get_dirs: sysfs_path='/sys'
Jan  9 16:21:09 vp6 udev[2899]: parse_config_file: reading '/etc/udev/udev.conf' as config file
Jan  9 16:21:09 vp6 udev[2899]: main: called by hotplug
Jan  9 16:21:09 vp6 udev[2899]: udev_hotplug: looking at '/block/hdb/hdb6'
Jan  9 16:21:09 vp6 udev[2899]: namedev_init_rules: reading '/etc/udev/udev.rules' as rules file
Jan  9 16:21:09 vp6 udev[2899]: namedev_init_permissions: reading '/etc/udev/udev.permissions' as permissions file
Jan  9 16:21:09 vp6 udev[2899]: sleep_for_dev: looking for '/sys/block/hdb/hdb6/dev'
Jan  9 16:21:09 vp6 udev[2899]: get_class_dev: looking at '/sys/block/hdb/hdb6'
Jan  9 16:21:09 vp6 udev[2899]: get_class_dev: class_dev->name='hdb6'
Jan  9 16:21:09 vp6 udev[2899]: get_major_minor: dev='3:70 '
Jan  9 16:21:09 vp6 udev[2899]: get_major_minor: found major=3, minorp
Jan  9 16:21:09 vp6 udev[2899]: get_sysfs_device: filename = /sys/block/hdb/hdb6
Jan  9 16:21:09 vp6 udev[2899]: get_sysfs_device: temp2 = 
Jan  9 16:21:09 vp6 udev[2899]: get_sysfs_device: looking for '/sys/block/hdb/device'
Jan  9 16:21:10 vp6 udev[2899]: get_sysfs_device: really is a partition
Jan  9 16:21:10 vp6 udev[2899]: get_sysfs_device: class_dev_parent->name='hdb'
Jan  9 16:21:10 vp6 udev[2899]: sysfs_path_is_link: stat() failed 
Jan  9 16:21:10 vp6 udev[2899]: sysfs_path_is_link: stat() failed 
Jan  9 16:21:10 vp6 udev[2899]: namedev_name_device: sysfs_device->path='/sys/devices/pci0000:00/0000:00:07.1/ide0/0.1'
Jan  9 16:21:10 vp6 udev[2899]: namedev_name_device: sysfs_device->bus_id='0.1'
Jan  9 16:21:10 vp6 udev[2899]: namedev_name_device: sysfs_device->bus='ide'
Jan  9 16:21:10 vp6 udev[2899]: wait_for_device_to_initialize: looking for file 'detach_state' on bus 'ide'
Jan  9 16:21:10 vp6 udev[2899]: namedev_name_device: kernel_number='6'
Jan  9 16:21:10 vp6 udev[2899]: do_callout: dev->bus='scsi' sysfs_device->bus='ide'
Jan  9 16:21:10 vp6 udev[2899]: do_label: dev->bus='usb' sysfs_device->bus='ide'
Jan  9 16:21:10 vp6 last message repeated 2 times
Jan  9 16:21:10 vp6 udev[2899]: do_number: dev->bus='pci' sysfs_device->bus='ide'
Jan  9 16:21:10 vp6 udev[2899]: do_number: dev->bus='pci' sysfs_device->bus='ide'
Jan  9 16:21:10 vp6 udev[2899]: do_topology: dev->bus='usb' sysfs_device->bus='ide'
Jan  9 16:21:10 vp6 last message repeated 2 times
Jan  9 16:21:10 vp6 udev[2899]: do_replace: compare name 'ttyUSB1' with 'hdb6'
Jan  9 16:21:10 vp6 udev[2899]: do_replace: compare name 'ttyUSB0' with 'hdb6'
Jan  9 16:21:10 vp6 udev[2899]: namedev_name_device: name, 'hdb6' is going to have owner='', group='', mode = 0600
Jan  9 16:21:10 vp6 udev[2899]: udev_add_device: name='hdb6'
Jan  9 16:21:10 vp6 udev[2899]: create_node: mknod(/udev/hdb6, 060600, 3, 70)
Jan  9 16:21:10 vp6 udev[2899]: create_node: chmod(/udev/hdb6, 060600)

=>
=> case 2
=> # tty devices
=> REPLACE, KERNEL="tty[0-9]*", NAME="vc/%n"
=>

Jan  9 16:23:40 vp6 udev[3247]: main: version 012
Jan  9 16:23:40 vp6 udev[3247]: get_dirs: sysfs_path='/sys'
Jan  9 16:23:40 vp6 udev[3247]: parse_config_file: reading '/etc/udev/udev.conf' as config file
Jan  9 16:23:40 vp6 udev[3247]: main: called by hotplug
Jan  9 16:23:40 vp6 udev[3247]: udev_hotplug: looking at '/class/tty/ttyS7'
Jan  9 16:23:40 vp6 udev[3247]: namedev_init_rules: reading '/etc/udev/udev.rules' as rules file
Jan  9 16:23:40 vp6 udev[3247]: namedev_init_permissions: reading '/etc/udev/udev.permissions' as permissions file
Jan  9 16:23:40 vp6 udev[3247]: sleep_for_dev: looking for '/sys/class/tty/ttyS7/dev'
Jan  9 16:23:40 vp6 udev[3247]: get_class_dev: looking at '/sys/class/tty/ttyS7'
Jan  9 16:23:40 vp6 udev[3247]: get_class_dev: class_dev->name='ttyS7'
Jan  9 16:23:40 vp6 udev[3247]: get_major_minor: dev='4:71 '
Jan  9 16:23:40 vp6 udev[3247]: get_major_minor: found major=4, minorq
Jan  9 16:23:40 vp6 udev[3247]: get_sysfs_device: filename = /sys/class/tty/ttyS7
Jan  9 16:23:40 vp6 udev[3247]: get_sysfs_device: looking for '/sys/class/tty/ttyS7/device'
Jan  9 16:23:41 vp6 udev[3247]: get_sysfs_device: looking for '/sys/class/tty/ttyS7/device'
Jan  9 16:23:42 vp6 udev[3247]: get_sysfs_device: Timed out waiting for device symlink, continuing on anyway...
Jan  9 16:23:42 vp6 udev[3247]: namedev_name_device: class_dev->name = 'ttyS7'
Jan  9 16:23:42 vp6 udev[3247]: namedev_name_device: kernel_number='7'
Jan  9 16:23:42 vp6 udev[3247]: do_replace: compare name 'ttyUSB1' with 'ttyS7'
Jan  9 16:23:42 vp6 udev[3247]: do_replace: compare name 'ttyUSB0' with 'ttyS7'
Jan  9 16:23:42 vp6 udev[3247]: namedev_name_device: name, 'ttyS7' is going to have owner='', group='', mode = 0600
Jan  9 16:23:42 vp6 udev[3247]: udev_add_device: name='ttyS7'
Jan  9 16:23:42 vp6 udev[3247]: create_node: mknod(/udev/ttyS7, 020600, 4, 71)
Jan  9 16:23:42 vp6 udev[3247]: create_node: chmod(/udev/ttyS7, 020600)

-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software. Perforce is the Fast Software Configuration Management System offering advanced branching capabilities and atomic changes on 50+ platforms. Free Eval! http://www.perforce.com/perforce/loadprog.html
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#1 lore raw
Quoted 3 lines · Remco

I updated to kernel 2.6.1 today and noticed that none of the udev rules got applied. All device nodes created by udev have their standard (kernel) values.

Nothing changed in 2.6.1 to stop udev from working that I can see. It works fine for me here.

Quoted 4 lines

=>
=> case 1
=> # IDE - hd* (CD and HD) devices
=> CALLOUT, BUS="ide", PROGRAM="/home/remco/udev/ide-devfs.sh %k %b %n", ID="hd*", NAME="%2c" #, SYMLINK="%1c"

What's that '#' doing in there? That will break the rule, comments can't go in the middle of a line, sorry.

And as per your log, it doesn't even show up as a rule.

Quoted 9 lines

=> case 2
=> # tty devices
=> REPLACE, KERNEL="tty[0-9]*", NAME="vc/%n"
=>

Jan  9 16:23:40 vp6 udev[3247]: main: version 012
Jan  9 16:23:40 vp6 udev[3247]: get_dirs: sysfs_path='/sys'
Jan  9 16:23:40 vp6 udev[3247]: parse_config_file: reading '/etc/udev/udev.conf' as config file
Jan  9 16:23:40 vp6 udev[3247]: main: called by hotplug
Jan  9 16:23:40 vp6 udev[3247]: udev_hotplug: looking at '/class/tty/ttyS7'

ttyS7 does not match up with your rule, so it is not applied. If it was tty7, it would, and it does work on 2.6.1, I just tested it.

thanks,

greg k-h

-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software. Perforce is the Fast Software Configuration Management System offering advanced branching capabilities and atomic changes on 50+ platforms. Free Eval! http://www.perforce.com/perforce/loadprog.html
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

author
#2 lore raw
In reply to Remco

Op vrijdag 09 januari 2004 21:11, schreef u:

Quoted 8 lines · Remco
Quoted 3 lines

I updated to kernel 2.6.1 today and noticed that none of the udev rules got applied. All device nodes created by udev have their standard (kernel) values.

Nothing changed in 2.6.1 to stop udev from working that I can see. It works fine for me here.

I've been stupid, I accidentilly replaced my udev.conf with the default one without noticing it. My rules which are located in non-default files were no longer recognised.

I confirm that udev works for kernel 2.6.1 like it did for 2.6.0.

Sorry for wasting your time.

Quoted 11 lines
Quoted 5 lines

=>
=> case 1
=> # IDE - hd* (CD and HD) devices
=> CALLOUT, BUS="ide", PROGRAM="/home/remco/udev/ide-devfs.sh %k %b %n",
ID="hd*", NAME="%2c" #, SYMLINK="%1c"

What's that '#' doing in there? That will break the rule, comments can't go in the middle of a line, sorry.

And as per your log, it doesn't even show up as a rule.

I don't like the symlink so I commented it out intentionally. I also switched the %1c and %2c parameters.
(no hda,hda1,hda2,hdb,hdb1,... in one flat directory for me)

-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software. Perforce is the Fast Software Configuration Management System offering advanced branching capabilities and atomic changes on 50+ platforms. Free Eval! http://www.perforce.com/perforce/loadprog.html
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel