udev Unable to Rename Network Device: Device or Resource Busy
Some way to a workaround/solution for this problem is to use systemd-networkd. Set up a config file at /etc/systemd/network/net0dhcp.network
(or similar) to:
[Match]
Name=net0
[Network]
DHCP=true
Rename net0 in the above to the appropriate network interface name. Now:
systemctl disable dhcpcd
systemctl enable systemd-networkd
And reboot. (You can probably restart some services or something; I didn't find which ones- rebooting was quick enough).
I have only tested this with a wired network (and don't have a machine with a wifi card lying around at the moment) so can't comment on how this configuration will work with your wireless interface. My assumption is that you'll need to add a configuration file for that interface and things will be peachy. Of course if it doesn't work out that easy, you can always just:
systemctl disable systemd-networkd
systemctl enable dhcpcd
And restart.
More info: https://wiki.archlinux.org/index.php/Systemd-networkd#Basic_DHCP_network
Related videos on Youtube
mclark1129
Updated on September 18, 2022Comments
-
mclark1129 over 1 year
I'm trying to use udev rules in order to give my network interfaces static, consistent names. However, it seems like there is some race condition happening preventing these rules from consistently taking effect each boot.
When I look at
journalctl
I see the following error message:systemd-udevd[149]: error changing net interface name eth0 to net0: Device or resource busy
My rules are pretty straight forward, I took them straight from the arch wiki on Network Configuration
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="xx:xx:xx:xx:xx:xx", NAME="wifi0" SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="xx:xx:xx:xx:xx:xx", NAME="net0"
What could be using the interfaces so early in the boot, and what can I do to fix this?
-
Rahul Patil over 10 yearsCan you post output of
cat /etc/netctl/mynetwork
and also/etc/conf.d/network@<interface>
-
mclark1129 over 10 years@RahulPatil I'm not using netctl. I'm running dhcp, ifplug, and wpa_supplicant with systemd
-
Martin von Wittich over 10 yearsPossibly related: bugs.freedesktop.org/show_bug.cgi?id=56929
-
mclark1129 over 10 yearsI think I've narrowed it down to the dhcpcd service started by systemd. If I don't start dhcpcd on boot, then the devices are renamed. What I can't figure out is how to force dhcpcd to start after the renames after taken place.
-