Tuesday, March 15, 2011

Debian Networking Fiasco: udevd can't rename interface, file already exists

Recently I overhauled my FreeNAS fileserver and put debian on it so I could have a full-featured Linux distribution at the expense of more complex configuration.  That experience required resolving a number of issues.   This is the first of a series of issues and how I resolved them.  After I wrap up these issue posts, I will do a howto on using google voice and Asterisk for free calling.

Problem:
I get a message saying something like "udevd-work: Cant rename interface eth1-eth0 file already exists."  And the network interface wasn't working.  Also, this issue caused the box to hang for about one minute at boot.

Resolution:
The best I can determine, the onboard ethernet was brought up first, but the system then realized I was connecting through an ethernet adapter card and tried to move the second card to eth0 which was already assigned.  My solution was to prevent the on-board ethernet from starting up.

I could tell the networking was misconfiguring itself by removing the file /etc/udev/rules.d/70-persistent-net.rules and rebooting.  Everything would come up fine once, and then it would be messed up on the next reboot.

I ran lspci to determine what my network interfaces were, and I saw these two:
Ethernet controller: nVidia Corporation MCP77 Ethernet (rev a2)
Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8169 Gigabit Ethernet (rev 10)

The realtek is the one I want to use, but the nVidia one is the troublemaker.  So I googled to find out the module used by that ethernet controller.  The module was forcedeth.  Next I set about preventing that module from loading, and found this guide.

As root, I then created the suggested file using the command echo "blacklist forcedeth" > /etc/modprobe.d/forcedeth.conf

I then ran depmod -ae, and the system whined about the command.  Then I ran update-initramfs -tu

Lastly, I deleted /lib/udev/rules.d/70-persistent-net.rules in the hopes that a valid one would be produced.  After all that, I rebooted, and it worked fine.

No comments: