udev Unable to Rename Network Device: Device or Resource Busy

5,269

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

Share:
5,269

Related videos on Youtube

mclark1129
Author by

mclark1129

Updated on September 18, 2022

Comments

  • mclark1129
    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
      Rahul Patil over 10 years
      Can you post output of cat /etc/netctl/mynetwork and also /etc/conf.d/network@<interface>
    • mclark1129
      mclark1129 over 10 years
      @RahulPatil I'm not using netctl. I'm running dhcp, ifplug, and wpa_supplicant with systemd
    • Martin von Wittich
      Martin von Wittich over 10 years
    • mclark1129
      mclark1129 over 10 years
      I 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.