Bug 756130 - No apparent way to disable persistent-net-generator
No apparent way to disable persistent-net-generator
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: udev (Show other bugs)
16
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: udev-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-22 14:07 EST by Andrew McNabb
Modified: 2011-11-23 13:14 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-11-22 18:21:22 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Andrew McNabb 2011-11-22 14:07:42 EST
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 16:53:44 EST
"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 17:16:10 EST
(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 17:35:56 EST
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-22 20:10:53 EST
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-22 21:16:42 EST
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 13:14:43 EST
(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.