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.
>
Tags: Debian, networking, udev







1st September 2008, 19:18
And if one (me, that is) changes the moderboard and no longer is able to get the temperature information about the cpu? Can that be fixed in a similar way? If so, how?
2nd September 2008, 12:38
Bruno: why do you think this is related to udev? How do you gather this information currently?
2nd September 2008, 13:30
This article talks about udev and hardware changes. Well, I changed part of my hardware and ended up with a eth1 network interface. So I thought that the cpu temperature information could be related to this.
9th September 2008, 20:34
Bruno: I understand… I don’t think this is related to udev, and you probably take that data using lm-sensors. Maybe your new motherboard requires some different configurations on how you read the data from it (maybe a different module?). This can also depend on the type of motherboard, etc. though I am not the best person to talk about this as I have not used something like that for several years now.
15th January 2009, 05:48
Thank you very much for this solution.
25th October 2009, 17:47
[...] Oorspronkelijk geplaatst door Serveo Ik last dat dit in combinatie met de laatste debian release was dus Debian 5.0. Kan ik nergens vinden. Ik zag wel dat je in debian de "generator" van dat bestand ook uit kan zetten, dus miss had iemand dat per ongeluk gedaan? Zie: http://www.ducea.com/2008/09/01/remo…ent-net-rules/ [...]