On Sun, Nov 29, 2009 at 14:04, Kay Sievers <kay.sievers@xxxxxxxx> wrote: > On Sat, Nov 28, 2009 at 23:52, Chris Dellin <cdellin@xxxxxxxxx> wrote: >> I'm having some trouble recently with my installation of udev. I >> expect it to create symlinks for a few devices, but no symlinks are >> created. For example: >> >> udev should create a symlink, as per the rule below: >> $ grep agpgart /etc/udev/rules.d/50-udev.rules >> KERNEL=="agpgart", NAME="misc/%k", SYMLINK+="%k" >> >> However, on boot, no symlink exists (although the /dev/misc/agpgart >> device is properly created). >> >> Once booted, the symlink does exist in the udev database: >> # udevadm info --export-db | grep -A 8 'P: /devices/virtual/misc/agpgart' >> P: /devices/virtual/misc/agpgart >> N: misc/agpgart >> S: agpgart >> E: UDEV_LOG=3 >> E: DEVPATH=/devices/virtual/misc/agpgart >> E: MAJOR=10 >> E: MINOR=175 >> E: DEVNAME=/dev/misc/agpgart >> E: DEVLINKS=/dev/agpgart >> >> I don't quite know how to interpret the results from udevtest, but the >> results are here: >> http://dellin.net/static/temp/udevtest_output.txt >> >> A few other notes: >> - The system is running a recent copy of Gentoo Linux. >> - This started happening when I upgraded my kernel from 2.6.29.5 to 2.6.31.6. >> - The /dev/video0 symlink has the same problem; it should be linked >> to /dev/v4l/video0, which is created correctly. >> >> Any ideas? > > You should not swap kernel node names with symlink names. The primary > name in /dev should always match the name in /sys. In general, on > recent kernels, almost all rules with NAME= should be removed and the > kernel-provided names not be overwritten by userspace config, and only > symlinks (which do no clash with kernel names) added. > > Kay OK; in this case, the path in /sys is /sys/devices/virtual/misc/agpgart, while the "kernel name" is "agpgart". So the primary /dev device should just be /dev/agpgart (and not /dev/misc/agpgart). Does this mean that the documentation examples, such as this: KERNEL=="hdb", NAME="my_spare_disk" should be replaced with: KERNEL=="hdb", SYMLINK+="my_spare_disk" ? Does this mean that use of NAME should be discouraged outright? In that case, I'll file this as a bug with Gentoo, as these are all distribution-default rules. Thanks again, - Chris -- To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html