You are not logged in.

#1 2012-07-28 09:37:15

frnc
Member
Registered: 2009-07-10
Posts: 8

error changing net interface name eth1 to eth0: File exists

Hi,
I have the following message showing randomly at boot time: “error changing net interface name eth1 to eth0: File exists”. AFAIK the traditional solution is at  https://wiki.archlinux.org/index.php/Ud … ork_device. Unfortunately creating the file /etc/udev/rules.d/10-network.rules as shown doesn't work here.

Trying to figure out what to do, I saw that Udev wiki says

With a recent version of udev, this problem should be solved automatically thanks to the /usr/lib/udev/write_net_rules program which runs the 75-persistent-net-generator.rules script which produces a 70-persistent-net.rules

I do have the two files 75-persistent-net-generator.rules and  70-persistent-net.rules under /etc/udev/rules.d, but I don't have /usr/lib/udev/write_net_rules. So I suppose the two 70 and 75 files are not run.

Anyway, if I check the content of  70-persistent-net.rules, I find “This file was automatically generated by the /lib/udev/write_net_rules program”.

/lib instead of /usr/lib. Mmmh... I'm afraid the original /lib/udev/write_net_rules program could possibly have been deleted at the time of the switch to /lib as a symlink (http://www.archlinux.org/news/the-lib-d … a-symlink/).

Then what? reinstalling systemd-tools? it seems that write_net_rules isn't around anymore.

nc [~/] $> sudo pacman -Ql systemd-tools | grep write
nc [~/] $>

On top of that, in my multi-boot box I have another arch installation, updated recently as the other. Same configurations as above as I long as I can see (actually, there's no /etc/udev/rules.d/10-network file). No errors at all while booting. I really don't have a clue.

Any idea?

Thanks in advance

Offline

#2 2012-07-28 11:42:00

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,277

Re: error changing net interface name eth1 to eth0: File exists

The error sounds like the udev rule is applied too late (after eth0 already exists). Have you tried adding a udev rule to assign a different interface name to whichever of your interfaces gets the "eth0" assigned?

edit: After I posted above someone else did that, without much success: https://bbs.archlinux.org/viewtopic.php?id=146005

Last edited by Strike0 (2012-07-28 16:15:49)

Offline

#3 2012-07-28 16:02:13

jjacky
Member
Registered: 2011-11-09
Posts: 321
Website

Re: error changing net interface name eth1 to eth0: File exists

I can't say for certain if it's related or not, but after upgrading, which included the following:

[2012-07-28 13:54] kalu: upgraded libsystemd (186-2 -> 187-2)
[2012-07-28 13:54] kalu: upgraded systemd-tools (186-2 -> 187-2)

On the next reboot I had problems with my network interfaces. Specifically, in order to ensure I always have the one I need named eth0, I have a file /etc/udev/rules.d/10-network.rules as follow:

SUBSYSTEM=="net", ATTR{address}=="90:e6:ba:1a:68:41", NAME="eth0"
SUBSYSTEM=="net", ATTR{address}=="90:e6:ba:01:40:7b", NAME="eth1"

And didn't had any problems with it. But this time:

Jul 28 16:19:24 arch kernel: [   22.533074] sky2 0000:03:00.0: eth1: addr 90:e6:ba:1a:68:41
Jul 28 16:19:24 arch [   22.861405] systemd-udevd[200]: error changing net interface name eth0 to eth1: File exists

Apparently it can't handle the renaming as well as udev used to before (systemd) :

Jul 18 15:41:04 arch kernel: [   23.267712] sky2 0000:03:00.0: eth1: addr 90:e6:ba:1a:68:41
Jul 18 15:41:04 arch [   24.536910] udevd[198]: renamed network interface eth0 to rename2
Jul 18 15:41:04 arch [   24.543491] udevd[204]: renamed network interface eth1 to eth0
Jul 18 15:41:04 arch [   24.596939] udevd[198]: renamed network interface rename2 to eth1

Is this a new bug, or did something changed and my rules need to be updated or something?
Looking at the wiki I just found info about using the same rules I have, then this:

Note: With a recent version of udev, this problem should be solved automatically thanks to the /usr/lib/udev/write_net_rules program which runs the 75-persistent-net-generator.rules script which produces a 70-persistent-net.rules.

But I don't have any of those?

Offline

#4 2012-07-28 17:00:16

karol
Archivist
Registered: 2009-05-06
Posts: 25,422

Re: error changing net interface name eth1 to eth0: File exists

Offline

#5 2012-07-28 20:04:52

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 12,252

Re: error changing net interface name eth1 to eth0: File exists

Moderator: Merged threads


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Like you, I have no idea what you are doing, but I am pretty sure it is wrong...Jasonwryan
----
How to Ask Questions the Smart Way

Offline

#6 2012-07-28 20:45:05

sandstorm
Member
From: Zurich [CH] & Mannheim [DE]
Registered: 2005-08-13
Posts: 150

Re: error changing net interface name eth1 to eth0: File exists

I have the same error. Why does this error now occur? An extensive search on Google showed, that similar errors appeared years ago, but had other root causes. This one seems to be new.

Offline

#7 2012-07-29 14:48:30

warm
Member
Registered: 2009-06-23
Posts: 42

Re: error changing net interface name eth1 to eth0: File exists

Got this bug too :-(. Wiki tells to rename to something other then eth0,eth1 and so on but this breakes old school traditions which is good and true :-). Today I even have lost connection to remote server after 'pacman -Syu' and then 'reboot':-).

Workaround that I just found: create 2 udev rules files instead of one 10-network.rules

# grep -v '#' 09-pre-network.rules | grep -v '^$'
SUBSYSTEM=="net", ATTR{address}=="1c:6f:65:d7:64:5e", NAME="wan"
SUBSYSTEM=="net", ATTR{address}=="00:02:44:02:71:9b", NAME="lan"
#
# grep -v '#' 10-network.rules | grep -v '^$'
SUBSYSTEM=="net", ATTR{address}=="1c:6f:65:d7:64:5e", NAME="eth0"
SUBSYSTEM=="net", ATTR{address}=="00:02:44:02:71:9b", NAME="eth1"

This is lame solution only just for fast fix. Works for me.

So when the the reliable Network Persist will happen?

Update: after next reboot it hapened again. So I removed 10-network.rules and use names like lan0, lan1 ...

Last edited by warm (2012-07-30 03:08:24)

Offline

#8 2012-08-03 20:09:07

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,571

Re: error changing net interface name eth1 to eth0: File exists

I also had network naming via 10-network.rules fail after an update the other day.  I didn't see anything like a "file exists" error though.  Like warm, I have been relegated to non-standard names for my interfices.  Fortunately, I only had to edit ~ a half dozen scripts and configs to account for the change.[/sarcasm]

Also, can someone who actually has 70-persistent-net.rules and/or 75-persistent-net-generator.rules use pacman -Qo* to determine which package they belong to?  Like jjacky, I don't have those files.

* Note: For those unfamiliar with -Qo, you have to use the full path unless the path is in your... $PATH.


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#9 2012-08-05 19:00:17

sandstorm
Member
From: Zurich [CH] & Mannheim [DE]
Registered: 2005-08-13
Posts: 150

Re: error changing net interface name eth1 to eth0: File exists

Also my CUPS printer ruies for loading the firmware into an HP LaserJet do not work anymore. Is this related to an update?

Best regards
Martin

Offline

#10 2012-08-06 12:37:34

debdj
Member
Registered: 2012-01-19
Posts: 163

Re: error changing net interface name eth1 to eth0: File exists

You can recreate the 70-persistent-net.rules file by issuing as root -

for NIC in /sys/class/net/* ; do
INTERFACE=${NIC##*/} udevadm test --action=add $NIC
done

Last edited by debdj (2012-08-06 12:38:01)

Offline

#11 2012-08-08 11:04:49

kokoko3k
Member
Registered: 2008-11-14
Posts: 1,432

Re: error changing net interface name eth1 to eth0: File exists

Same error here today, but as i don't like to remeber where i put my conf files and so on i prefer to keep as much as possible into rc.local.
Being lucky with two different network adapters, i did in my rc.local:

rmmod r8169
rmmod atl1e

modprobe r8169
ifconfig eth0 .....

modprobe atl1e
ifconfig eth1 ....

route add default gw xxx.xxx.xxx.xxx

so that modules are loaded in the correct order now.

Last edited by kokoko3k (2012-08-18 15:07:10)

Offline

#12 2012-08-12 11:45:11

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,277

Re: error changing net interface name eth1 to eth0: File exists

Now here is the reason why trying to fix it with default "eth" naming and udev will lead to troubles again sometime along. Better use non-ambigious naming when making it persistent  ..

Offline

#13 2012-08-12 12:15:47

Mrk3004
Member
Registered: 2012-05-24
Posts: 3

Re: error changing net interface name eth1 to eth0: File exists

Strike0 wrote:

Now here is the reason why trying to fix it with default "eth" naming and udev will lead to troubles again sometime along. Better use non-ambigious naming when making it persistent  ..

Thank you!

Offline

Board footer

Powered by FluxBB