akc42
Posts: 20
Joined: Tue Jan 10, 2012 7:01 pm
Contact: Website

eth0 not found

Fri Mar 08, 2019 10:33 am

I upgraded one of my remote systems this morning and did a reboot. It failed to come up so that I could ssh back into it. Looks like a visit to the remote site is required. This is raspbian initially installed as Jessie, but recently upgraded to Stretch.

I have a local copy of that system and so did the same update (sudo aptitude - then hit the u and U keys - finally g to do the update) and sure enough networking is broken with cannot find eth0 when it tries to bring up the interfaces in service networking start.

I found a blog post that describes this problem uses `networkctl` to find the name that the interface is actually called and then uses `ip link set xxx name eth0` to rename the network to eth0. Doing this I networking now correctly brings up eth0.

However it then goes on to describe creating a /etc/udev/rules.d/70-persistent-net.rules file to allow the booting system to rename to eth0 automatically. However I tried this and it doesn't work.

I've been poking around to see what is there and found a set up rules in /lib/udev/rules.d - but I have no idea what they are trying to do and whether they are even being used.

How can I make the network name change permanent. I obviously want to figure it out locally before making the journey to the remote site.

akc42
Posts: 20
Joined: Tue Jan 10, 2012 7:01 pm
Contact: Website

Re: eth0 not found

Fri Mar 08, 2019 12:20 pm

Looking at the log during boot I get this
[ 2.656953] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-3f980000.usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:1c:5c:a3
[ 2.663049] smsc95xx 1-1.1:1.0 enxb827eb1c5ca3: renamed from eth0
Which sort of says it was called eth0 but now its changed itself to something else. And indeed enxb827eb1c5ca3 is the name found for that interface

User avatar
rpdom
Posts: 17171
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: eth0 not found

Fri Mar 08, 2019 12:24 pm

Run sudo raspi-config
Select 2 Network Options
Select N3 Network interface names
Choose <No>
Exit and reboot.
Unreadable squiggle

akc42
Posts: 20
Joined: Tue Jan 10, 2012 7:01 pm
Contact: Website

Re: eth0 not found

Fri Mar 08, 2019 12:43 pm

rpdom wrote:
Fri Mar 08, 2019 12:24 pm
Run sudo raspi-config
Select 2 Network Options
Select N3 Network interface names
Choose <No>
Exit and reboot.

I'll give that a go shortly - I did find an alternative solution :-

Code: Select all

sudo cp /lib/udev/rules.d/73-usb-net-by-mac.rules /etc/udev/rules.d/73-usb-net-by-mac.rules
Edit the new file to change the 3rd to last line to

Code: Select all

 
IMPORT{builtin}="net_id", NAME="eth0"
The place I found that refered to a ubuntu bug https://bugs.launchpad.net/ubuntu/+sour ... ug/1593379

Andyroo

Re: eth0 not found

Fri Mar 08, 2019 12:49 pm

Very strange - not something I’ve had happen on the Pi (Intel is a different box)...

Have you set the MAC address at all as this messed the name up before?

What do you have in /etc/udev/rules.d/70-persistent-net.rule now?

You could also try creating a blank /etc/udev/rules.d/80-persistent-net.rule

Code: Select all

sudo touch /etc/udev/rules.d/80-persistent-net.rule
This should be read last and as it’s blank it should override the rename rules (I think :oops: )

akc42
Posts: 20
Joined: Tue Jan 10, 2012 7:01 pm
Contact: Website

Re: eth0 not found

Fri Mar 08, 2019 1:00 pm

rpdom wrote:
Fri Mar 08, 2019 12:24 pm
Run sudo raspi-config
Select 2 Network Options
Select N3 Network interface names
Choose <No>
Exit and reboot.
I gave this a try, removing my solution beforehand. It didn't work. In fact worse than that in that it prevented my solution from working when I put it back. I had to run

Code: Select all

sudo raspi-config
again and chose <yes> at N3. Before my solution would work again

akc42
Posts: 20
Joined: Tue Jan 10, 2012 7:01 pm
Contact: Website

Re: eth0 not found

Fri Mar 08, 2019 1:08 pm

Andyroo wrote:
Fri Mar 08, 2019 12:49 pm
Have you set the MAC address at all as this messed the name up before?
No never - the remote server has been running for about 18 months perfectly - it was just the upgrade today (which is the first I've done since I upgraded from jessie to stretch a couple of months ago.

Because I have a clone system locally and it has been through the same upgrade processes in parallel I am pretty confident that its an update to the persistent rules in raspbian that have caused the problem. Trouble is they look so complicated now I can't get my head around what they are supposed to do.
What do you have in /etc/udev/rules.d/70-persistent-net.rule now?
Nothing - see my solution about and the link to the regression in ubuntu. I suspect that raspbian has this same regression.

Return to “Troubleshooting”