* [gentoo-user] udev-197 and /etc/udev/rules.d/ @ 2013-01-22 3:56 »Q« 2013-01-22 6:07 ` [gentoo-user] " Hartmut Figge ` (2 more replies) 0 siblings, 3 replies; 6+ messages in thread From: »Q« @ 2013-01-22 3:56 UTC (permalink / raw To: gentoo-user udev-197-r3 gave me this postinstall warning: Upstream has removed the persistent-cd rules generator. If you need persistent names for these devices, place udev rules for them in /etc/udev/rules.d. Well, I have had such a rule for a long time, and it worked ok until I installed udev-197, which seems to be ignoring it. I'm at a loss to see what's wrong. Here's /etc/udev/rules.d/12-opticaldrive.rules, just one line: KERNEL=="sr0", SUBSYSTEM=="block", NAME="opticaldrive", SYMLINK+="%k", SYMLINK+="cdrom", SYMLINK+="cdrw", SYMLINK+="dvd", SYMLINK+="dvdrom", SYMLINK+="dvdrw" And here's the first part of udevadm info for the device: looking at device '/devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0/block/sr0': KERNEL=="sr0" SUBSYSTEM=="block" DRIVER=="" ATTR{ro}=="0" ATTR{size}=="4" ATTR{stat}==" 0 0 0 0 0 0 0 0 0 0 0" ATTR{range}=="1" ATTR{discard_alignment}=="0" ATTR{events}=="media_change eject_request" ATTR{ext_range}=="1" ATTR{events_poll_msecs}=="-1" ATTR{alignment_offset}=="0" ATTR{inflight}==" 0 0" ATTR{removable}=="1" ATTR{capability}=="119" ATTR{events_async}=="" ^ permalink raw reply [flat|nested] 6+ messages in thread
* [gentoo-user] Re: udev-197 and /etc/udev/rules.d/ 2013-01-22 3:56 [gentoo-user] udev-197 and /etc/udev/rules.d/ »Q« @ 2013-01-22 6:07 ` Hartmut Figge 2013-01-22 8:55 ` [gentoo-user] " Marc Joliet 2013-01-22 14:23 ` Neil Bothwick 2 siblings, 0 replies; 6+ messages in thread From: Hartmut Figge @ 2013-01-22 6:07 UTC (permalink / raw To: gentoo-user »Q«: >udev-197-r3 gave me this postinstall warning: > > Upstream has removed the persistent-cd rules generator. If you need > persistent names for these devices, place udev rules for them > in /etc/udev/rules.d. > >Well, I have had such a rule for a long time, and it worked ok until I >installed udev-197, which seems to be ignoring it. I was bitten by that too. >I'm at a loss to see what's wrong. If that can be solved, i may reconsider going back to udev-171. ;) Hartmut -- Usenet-ABC-Wiki http://www.usenet-abc.de/wiki/ Von Usern fuer User :-) ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-user] udev-197 and /etc/udev/rules.d/ 2013-01-22 3:56 [gentoo-user] udev-197 and /etc/udev/rules.d/ »Q« 2013-01-22 6:07 ` [gentoo-user] " Hartmut Figge @ 2013-01-22 8:55 ` Marc Joliet 2013-01-22 14:23 ` Neil Bothwick 2 siblings, 0 replies; 6+ messages in thread From: Marc Joliet @ 2013-01-22 8:55 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 2402 bytes --] Am Mon, 21 Jan 2013 21:56:00 -0600 schrieb »Q« <boxcars@gmx.net>: > udev-197-r3 gave me this postinstall warning: > > Upstream has removed the persistent-cd rules generator. If you need > persistent names for these devices, place udev rules for them > in /etc/udev/rules.d. > > Well, I have had such a rule for a long time, and it worked ok until I > installed udev-197, which seems to be ignoring it. I'm at a loss to > see what's wrong. > > Here's /etc/udev/rules.d/12-opticaldrive.rules, just one line: > > KERNEL=="sr0", SUBSYSTEM=="block", NAME="opticaldrive", SYMLINK+="%k", SYMLINK+="cdrom", SYMLINK+="cdrw", SYMLINK+="dvd", SYMLINK+="dvdrom", SYMLINK+="dvdrw" > > And here's the first part of udevadm info for the device: > > looking at device '/devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0/block/sr0': > KERNEL=="sr0" > SUBSYSTEM=="block" > DRIVER=="" > ATTR{ro}=="0" > ATTR{size}=="4" > ATTR{stat}==" 0 0 0 0 0 0 0 0 0 0 0" > ATTR{range}=="1" > ATTR{discard_alignment}=="0" > ATTR{events}=="media_change eject_request" > ATTR{ext_range}=="1" > ATTR{events_poll_msecs}=="-1" > ATTR{alignment_offset}=="0" > ATTR{inflight}==" 0 0" > ATTR{removable}=="1" > ATTR{capability}=="119" > ATTR{events_async}=="" Well, I did the udev upgrade, and the following rules in /etc/udev/rules.d/70-persistent-cd.rules still work: KERNEL=="sr0", SYMLINK+="cdrom", ENV{GENERATED}="1" KERNEL=="sr0", SYMLINK+="cdrw", ENV{GENERATED}="1" KERNEL=="sr0", SYMLINK+="dvd", ENV{GENERATED}="1" KERNEL=="sr0", SYMLINK+="dvdrw", ENV{GENERATED}="1" I don't really think it's that the symlinks are spread out over four lines, but you can try it anyway. The ENV{GENERATED} bit is left over from the auto-generated rule; I have my doubts regarding its necessity. [ Luckily for me, I had no problems upgrading udev, save for a change in the naming scheme of the files in /dev/input/by-id/, which screwed up my pulseaudio settings (I use the volume keys on my keyboard), which took all of 1 minute to fix after I noticed pulseaudio wasn't starting. ] HTH -- Marc Joliet -- "People who think they know everything really annoy those of us who know we don't" - Bjarne Stroustrup [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-user] udev-197 and /etc/udev/rules.d/ 2013-01-22 3:56 [gentoo-user] udev-197 and /etc/udev/rules.d/ »Q« 2013-01-22 6:07 ` [gentoo-user] " Hartmut Figge 2013-01-22 8:55 ` [gentoo-user] " Marc Joliet @ 2013-01-22 14:23 ` Neil Bothwick 2013-01-22 17:51 ` Marc Joliet 2 siblings, 1 reply; 6+ messages in thread From: Neil Bothwick @ 2013-01-22 14:23 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 591 bytes --] On Mon, 21 Jan 2013 21:56:00 -0600, »Q« wrote: > Here's /etc/udev/rules.d/12-opticaldrive.rules, just one line: > > KERNEL=="sr0", SUBSYSTEM=="block", NAME="opticaldrive", SYMLINK+="%k", > SYMLINK+="cdrom", SYMLINK+="cdrw", SYMLINK+="dvd", SYMLINK+="dvdrom", > SYMLINK+="dvdrw" ISTR a change in udev that prevented renaming devices. Put it all as symlinks instead of renaming and trying to symlink back to %k. It seems that all the replies with working examples do it this way too. -- Neil Bothwick Not one shred of evidence supports the notion that life is serious. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-user] udev-197 and /etc/udev/rules.d/ 2013-01-22 14:23 ` Neil Bothwick @ 2013-01-22 17:51 ` Marc Joliet 2013-01-23 2:29 ` [gentoo-user] " »Q« 0 siblings, 1 reply; 6+ messages in thread From: Marc Joliet @ 2013-01-22 17:51 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 1934 bytes --] Am Tue, 22 Jan 2013 14:23:57 +0000 schrieb Neil Bothwick <neil@digimed.co.uk>: > On Mon, 21 Jan 2013 21:56:00 -0600, »Q« wrote: > > > Here's /etc/udev/rules.d/12-opticaldrive.rules, just one line: > > > > KERNEL=="sr0", SUBSYSTEM=="block", NAME="opticaldrive", SYMLINK+="%k", > > SYMLINK+="cdrom", SYMLINK+="cdrw", SYMLINK+="dvd", SYMLINK+="dvdrom", > > SYMLINK+="dvdrw" > > ISTR a change in udev that prevented renaming devices. Put it all as > symlinks instead of renaming and trying to symlink back to %k. It seems > that all the replies with working examples do it this way too. I was interested enough to look this up. I looked through the git log of my /etc/udev/rules.d/ and found that in early October 2012 I committed a change to that effect, so something did change at some point. However, I can't find any reference to that in the udev changelog. In fact, it actually looks like it's a kernel change and that udev is really just "obeying" the kernel [0] [1]. But I did find out that this is in fact documented in the udev(7) man page: NAME The name to use for a network interface. The name of a device node cannot be changed by udev, only additional symlinks can be created. So currently you can only change network interface names, and nothing else. [0] I haven't searched extensively, but found a related Email from Greg K-H (search for "rename") that points out that device node renaming has problematic/fragile behaviour: http://lkml.indiana.edu/hypermail/linux/kernel/1010.1/00427.html. [1] https://www.kernel.org/doc/htmldocs/device-drivers/API-device-rename.html (documentation generated from linux-3.0-rc7). Relevant quote: "Device nodes are not renamed at all, there isn't even support for that in the kernel now." HTH -- Marc Joliet -- "People who think they know everything really annoy those of us who know we don't" - Bjarne Stroustrup [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* [gentoo-user] Re: udev-197 and /etc/udev/rules.d/ 2013-01-22 17:51 ` Marc Joliet @ 2013-01-23 2:29 ` »Q« 0 siblings, 0 replies; 6+ messages in thread From: »Q« @ 2013-01-23 2:29 UTC (permalink / raw To: gentoo-user On Tue, 22 Jan 2013 18:51:59 +0100 Marc Joliet <marcec@gmx.de> wrote: > Am Tue, 22 Jan 2013 14:23:57 +0000 > schrieb Neil Bothwick <neil@digimed.co.uk>: > > > ISTR a change in udev that prevented renaming devices. Put it all as > > symlinks instead of renaming and trying to symlink back to %k. It > > seems that all the replies with working examples do it this way too. That works, thanks. [snip] > So currently you can only change network interface names, and nothing > else. > > [0] I haven't searched extensively, but found a related Email from > Greg K-H (search for "rename") that points out that device node > renaming has problematic/fragile behaviour: > http://lkml.indiana.edu/hypermail/linux/kernel/1010.1/00427.html. > > [1] > https://www.kernel.org/doc/htmldocs/device-drivers/API-device-rename.html > (documentation generated from linux-3.0-rc7). Relevant quote: "Device > nodes are not renamed at all, there isn't even support for that in > the kernel now." Thanks for the discussion (snipped) and the links. Something Greg K-H said about kernel names reminded me that I've been meaning to stop using them in fstab as well. I've been a Gentoo user for twelve years, and I've learned a lot -- including some bad habits, heh. ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-01-23 2:29 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-01-22 3:56 [gentoo-user] udev-197 and /etc/udev/rules.d/ »Q« 2013-01-22 6:07 ` [gentoo-user] " Hartmut Figge 2013-01-22 8:55 ` [gentoo-user] " Marc Joliet 2013-01-22 14:23 ` Neil Bothwick 2013-01-22 17:51 ` Marc Joliet 2013-01-23 2:29 ` [gentoo-user] " »Q«
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox