Skip to content
Blog Remove debian udev persistent-net-rules

Remove debian udev persistent-net-rules

Debian has a customization to udev that will keep network interface names persistent after hardware changes and reboots. Normally this is what you want and you will not care about this, but there are cases where this can be very annoying and we just have to disable it. I am speaking about situations when you will copy the files from a system and use them to recreate a new system, or when using some virtualization tools and cloning your vm; these situations will always result in network problems caused by the udev persistent rules.

If this is an isolated issue you can obviously just edit the udev rule generated and fix it (normally we want to have eth0 the existing interface and not something crazy like eth8, for ex.); this is found inside /etc/udev/rules.d/z25_persistent-net.rules

To completely disable this feature and no longer try to keep a static name for each device (in this case a static name for each mac address) we just have to remove the existing rules files(z25_persistent-net.rules) and also the generator rules that updates the rules file (z45_persistent-net-generator.rules):
rm -f /etc/udev/rules.d/z25_persistent-net.rules
rm -f /etc/udev/rules.d/z45_persistent-net-generator.rules

Note: since z45_persistent-net-generator.rules is just a link to the real file/etc/udev/persistent-net-generator.rules if you ever want to enable this back, you just have to recreate this link back and on the first boot the rules will be regenerated.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.