Bug 756130 - No apparent way to disable persistent-net-generator
Summary: No apparent way to disable persistent-net-generator
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: udev
Version: 16
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: udev-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-22 19:07 UTC by Andrew McNabb
Modified: 2011-11-23 18:14 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-11-22 23:21:22 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Andrew McNabb 2011-11-22 19:07:42 UTC
In Fedora 15, I could disable the persistent-net-generator rules with "chkconfig udev-post off". However, in Fedora 16, no such service is available, and I can't find any way to permanently disable renaming of ethernet devices.  Due to an unfortunate interaction, this means that the "biosdevname=0" option is not always honored.

Comment 1 Kay Sievers 2011-11-22 21:53:44 UTC
"chkconfig udev-post off" only works if you are lucky, and only for devices
which are all available during bootup already.

You can 'mask' the rules file in /lib with an empty file in /etc, so the
generator rules will never be read:
  ln -s /dev/null /etc/udev/rules.d/75-persistent-net-generator.rules

Biosdevname you can just "rpm -e".

Comment 2 Andrew McNabb 2011-11-22 22:16:10 UTC
(In reply to comment #1)
> You can 'mask' the rules file in /lib with an empty file in /etc, so the
> generator rules will never be read:
>   ln -s /dev/null /etc/udev/rules.d/75-persistent-net-generator.rules

I didn't realize that the rules files could be shadowed like that. This is way better than disabling udev-post, and it seems a lot more future-proof, too. I wonder where this could be documented (a lot of people on forums and mailing lists seem very confused).

Comment 3 Kay Sievers 2011-11-22 22:35:56 UTC
It's in the udev man page:

"However, files in /etc/udev/rules.d/ take precedence over files
with the same name in /lib/udev/rules.d/; this can be used to ignore a
default rules file if needed."

I might just add an additional sentence ...

Comment 5 Andrew McNabb 2011-11-23 01:10:53 UTC
I just realized that my sentence was ambiguous. I wasn't trying to say that the udev documentation about masking was missing (that was just me not having spent enough time in the udev docs). Rather, on a high level, it would be nice to document to Fedora users that "rm /etc/udev/rules.d/70-persistent-net.rules; ln -s /dev/null /etc/udev/rules.d/75-persistent-net-generator.rules" disables device renaming. There seem to be a lot of users in mailing lists and forums who are confused about how to control the magical process of device renaming.

Comment 6 Kay Sievers 2011-11-23 02:16:42 UTC
Yeah, true. In Fedora 17 the automagic renaming that writes out rules files is
gone anyway. We rely on biosdevname or static configuration created by the
admin or admin tools. There will be no rules created on-the-fly.

Comment 7 Andrew McNabb 2011-11-23 18:14:43 UTC
(In reply to comment #6)
> Yeah, true. In Fedora 17 the automagic renaming that writes out rules files is
> gone anyway. We rely on biosdevname or static configuration created by the
> admin or admin tools. There will be no rules created on-the-fly.

That will be a very welcome simplification. Thank you for your work on this and for answering my questions so helpfully.


Note You need to log in before you can comment on or make changes to this bug.