Discussion:
eth0 is renamed to another device
Add Reply
jjge
2020-07-18 08:37:13 UTC
Reply
Permalink
Hello,
In my slackware 14.2 system, suddenly eth0 was renamed into something
different (varies, currently it is eth2). After that, nothing works
anymore, and I have to set up everything by hand, or, currently by a
command file.
When I look at dmesg, I can see that atl1c has something to do with it.

10.010987] atl1c 0000:02:00.0 eth126: renamed from eth0
[ 10.017921] atl1c 0000:02:00.0 eth2: renamed from eth126
[ 261.263274] atl1c 0000:02:00.0 eth0: renamed from eth2
[ 279.181999] atl1c 0000:02:00.0: atl1c: eth0 NIC Link is Up<100 Mbps F

The last two entries are from my repair. But how can this behaviour be
stopped?
Henrik Carlqvist
2020-07-18 09:23:49 UTC
Reply
Permalink
Post by jjge
In my slackware 14.2 system, suddenly eth0 was renamed into something
different (varies, currently it is eth2). After that, nothing works
anymore, and I have to set up everything by hand, or, currently by a
command file.
When I look at dmesg, I can see that atl1c has something to do with it.
10.010987] atl1c 0000:02:00.0 eth126: renamed from eth0
[ 10.017921] atl1c 0000:02:00.0 eth2: renamed from eth126 [
261.263274] atl1c 0000:02:00.0 eth0: renamed from eth2 [ 279.181999]
atl1c 0000:02:00.0: atl1c: eth0 NIC Link is Up<100 Mbps F
The last two entries are from my repair. But how can this behaviour be
stopped?
My guess is that your installation previously has had some other card
with another mac address as eth0? Udevd will look in the file
/etc/udev/rules.d/70-persistent-net.rules to see which nic with its mac
address shoule be given the name eth0. If you no longer have that nic
your new nic will be given another name. By editing or removing that file
you can make your only nic become eth0 at next reboot.

regards Henrik
Chris Vine
2020-07-18 09:27:41 UTC
Reply
Permalink
On Sat, 18 Jul 2020 10:37:13 +0200
Post by jjge
Hello,
In my slackware 14.2 system, suddenly eth0 was renamed into something
different (varies, currently it is eth2). After that, nothing works
anymore, and I have to set up everything by hand, or, currently by a
command file.
When I look at dmesg, I can see that atl1c has something to do with it.
10.010987] atl1c 0000:02:00.0 eth126: renamed from eth0
[ 10.017921] atl1c 0000:02:00.0 eth2: renamed from eth126
[ 261.263274] atl1c 0000:02:00.0 eth0: renamed from eth2
[ 279.181999] atl1c 0000:02:00.0: atl1c: eth0 NIC Link is Up<100 Mbps F
The last two entries are from my repair. But how can this behaviour be
stopped?
/lib/udev/rules.d/75-persistent-net-generator.rules (or is
it now /lib/udev/write_net_rules?) writes persistent network device
interface names into /etc/udev/rules.d/70-persistent-net.rules.
Possibly something you have done has changed permissions to interfere
with that. I should try:

1. reinstalling eudev first to get permissions right,

2. then deleting /etc/udev/rules.d/70-persistent-net.rules so it will
be regenerated on the next boot,

3. then rebooting, which should cause to be rebuilt
the /etc/udev/rules.d/70-persistent-net.rules file
jjge
2020-07-18 10:37:53 UTC
Reply
Permalink
Post by jjge
Hello,
In my slackware 14.2 system, suddenly eth0 was renamed into something
different (varies, currently it is eth2). After that, nothing works
anymore, and I have to set up everything by hand, or, currently by a
command file.
When I look at dmesg, I can see that atl1c has something to do with it.
   10.010987] atl1c 0000:02:00.0 eth126: renamed from eth0
[   10.017921] atl1c 0000:02:00.0 eth2: renamed from eth126
[  261.263274] atl1c 0000:02:00.0 eth0: renamed from eth2
[  279.181999] atl1c 0000:02:00.0: atl1c: eth0 NIC Link is Up<100 Mbps F
The last two entries are from my repair. But how can this behaviour be
stopped?
And, indeed, it turned out to be a udev rule. Thanks for the suggestion!
Loading...