Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
eth0 Renamed end0 After Two Years
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
flysideways
Guru
Guru


Joined: 29 Jan 2005
Posts: 437

PostPosted: Sun Jan 29, 2023 11:37 pm    Post subject: eth0 Renamed end0 After Two Years Reply with quote

I have a Raspberry Pi that has had an ~arm64 install since 10-2020, and with today's update it renamed eth0 to end0. I fixed the ln and am using that Pi to write this.

I have some installs that are arm64, and they are still eth0. Some are headless, it'd be nice to preemptively fix them.

At the moment I am at a loss to remember where or why it would do this.

They are openrc, and running pi kernels copied over from RPiOS.

Thanks.
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Mon Jan 30, 2023 12:27 am    Post subject: Reply with quote

My guess is that it is related to the Predictable Network Interface Name change. But that was quite a while ago, unless arm is only just now stabilizing it? If that is the cause, then I'd expect it to have been an updated udev that caused the change.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Mon Jan 30, 2023 12:30 am    Post subject: Reply with quote

You could add the parameter below to your kernel command line parameters:
Code:
net.ifnames=0

EDIT: pjp was faster :)
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21600

PostPosted: Mon Jan 30, 2023 12:34 am    Post subject: Reply with quote

I see you received the direct answer already. A quick search for linux eth0 rename has, as its fifth hit, a stackexchange post which provides the same information suggested here.
Back to top
View user's profile Send private message
flysideways
Guru
Guru


Joined: 29 Jan 2005
Posts: 437

PostPosted: Mon Jan 30, 2023 2:59 am    Post subject: Reply with quote

Thanks all. I'm not fixated on it being eth0. I hadn't really given it much thought, but the Pi's had remained with eth0 for some reason, even one I created a few weeks ago.

Going down the path from pjp's link, I found this;
Code:
$ udevadm test-builtin net_id /sys/class/net/eth0

Using default interface naming scheme 'v252'.
Parsed configuration file "/lib/systemd/network/99-default.link"
Created link configuration context.
ID_NET_NAMING_SCHEME=v252
...
ID_OUI_FROM_DATABASE=Raspberry Pi Trading Ltd
ID_NET_NAME_ONBOARD=end0
on the Raspberry Pi 4 Model B Rev 1.4 running ~arm64.

On another Raspberry Pi 4 Model B Rev 1.4 running arm64;
Code:
Using default interface naming scheme 'v251'.
Parsed configuration file "/lib/systemd/network/99-default.link"
Created link configuration context.
ID_NET_NAMING_SCHEME=v251
...
ID_OUI_FROM_DATABASE=Raspberry Pi Trading Ltd
It does not have the ID_NET_NAME_ONBOARD= response. It is also interface naming scheme v251, not v252.

I'm going to guess that, perhaps, the last update took the ~arm64 install to scheme v252.
Back to top
View user's profile Send private message
flysideways
Guru
Guru


Joined: 29 Jan 2005
Posts: 437

PostPosted: Mon Jan 30, 2023 3:24 am    Post subject: Reply with quote

To add, I did use mike155's hint and added
Code:
net.ifnames=0
to cmdline.txt while I was looking at this. The ~arm64 install is now back to default. I'll just deal with the arm64 installs when they change.
Back to top
View user's profile Send private message
Goverp
Veteran
Veteran


Joined: 07 Mar 2007
Posts: 1994

PostPosted: Mon Jan 30, 2023 9:28 am    Post subject: Reply with quote

pjp wrote:
My guess is that it is related to the Predictable Network Interface Name change....

I love the way systemd calls this feechur "Predictable". It broke my machine when I inserted a new card (100% exactly the problem it's supposed to cure), and again more recently a different box hit this typo rename. I try to remember to disable it using the net.ifnames=0 override mentioned above.
_________________
Greybeard
Back to top
View user's profile Send private message
flysideways
Guru
Guru


Joined: 29 Jan 2005
Posts: 437

PostPosted: Mon Jan 30, 2023 11:23 am    Post subject: Reply with quote

Code:
2023-01-13T07:27:20 >>> sys-apps/systemd-utils-251.10-r1: 41s
2023-01-29T13:42:36 >>> sys-apps/systemd-utils-252.4: 42s


I'm guessing this was the transition from v251 to v252. I got systemd-ed on my openrc install.
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Mon Jan 30, 2023 11:44 am    Post subject: Reply with quote

Goverp wrote:
I love the way systemd calls this feechur "Predictable"

I call this feature "Lennart Poettering's Unpredictable Predictable Network Interface Names". :)
Back to top
View user's profile Send private message
Banana
Veteran
Veteran


Joined: 21 May 2004
Posts: 1383
Location: Germany

PostPosted: Mon Jan 30, 2023 1:29 pm    Post subject: Reply with quote

slightly offtopic: I had this problem while upgrading Raspberry Pi OS which is based on debian. There are sometimes notices and even interactive reconfigurations of settings. But not with this change. After a reboot I've lost access to the Pi..
_________________
My personal space
My delta-labs.org snippets do expire

PFL - Portage file list - find which package a file or command belongs to.
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Mon Jan 30, 2023 11:14 pm    Post subject: Reply with quote

Goverp wrote:
pjp wrote:
My guess is that it is related to the Predictable Network Interface Name change....

I love the way systemd calls this feechur "Predictable". It broke my machine when I inserted a new card (100% exactly the problem it's supposed to cure), and again more recently a different box hit this typo rename. I try to remember to disable it using the net.ifnames=0 override mentioned above.
I'm not a fan of the change, but my main gripe with these types of changes is the "we break it, you fix it" approach. For the hobbyist / non-paid user, it seems like not breaking things would be the best starting point. "Do no harm" if you will. And for those who are paid to manage systems, it seems more than reasonable that a) they should learn why and how to do it; and b) they're already probably paying attention to the hardware ports and connections for other reasons. I decided I'd rather deal with the obtuse naming scheme rather than yet another "manage the damage" configuration file.

On one of my home systems, I have an internal NIC enp3s0 and for some reason, the external NIC at enp2s0. I'm sure there's a reason for why they are essentially the same name and only differing by the "p" number. Contrast that with my laptop which has the wonderfully easy to access enp0s31f6 and wlp4s0. Of course with the laptop, when it boots, neither of those are readable, so that's a joy if something disrupts normal booting and I have to work in the terminal (haven't deduced the magic incantation to make the default terminal / console a legible size). Oh well, but at least the NIC names are predictable for those paid to deal with it. If I were younger, I'd switch to a skilled trade.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
Banana
Veteran
Veteran


Joined: 21 May 2004
Posts: 1383
Location: Germany

PostPosted: Tue Jan 31, 2023 9:20 am    Post subject: Reply with quote

I would have expected a big fat warning about the change after an upgrade on a system for this package.
_________________
My personal space
My delta-labs.org snippets do expire

PFL - Portage file list - find which package a file or command belongs to.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21600

PostPosted: Tue Jan 31, 2023 1:49 pm    Post subject: Reply with quote

There was a warning when udev first pushed this on users many years ago. I see from a few minutes of searching that there was another warning when eudev was retired: https://gitweb.gentoo.org/data/gentoo-news.git/commit/?id=eba63773624dd2dbdceefdf8ab2c88aab22dab40. Gentoo has a policy of following upstream where practical, so there is only so much Gentoo can do with this while upstream keeps pushing the default of renaming from kernel-assigned names to udev-policy-assigned names.
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1525
Location: South America

PostPosted: Tue Jan 31, 2023 10:41 pm    Post subject: Reply with quote

flysideways wrote:
It does not have the ID_NET_NAME_ONBOARD= response. It is also interface naming scheme v251, not v252.

I'm going to guess that, perhaps, the last update took the ~arm64 install to scheme v252.
Looks like it.

systemd.net-naming-scheme — Network device naming schemes
Quote:
History

The following "naming schemes" have been defined (which may be chosen at system boot-up time via the net.naming-scheme= kernel command line switch, see above):

[...]

v252
Added naming scheme for platform devices with devicetree aliases.

end0 does have format prefix d number indeed --> Devicetree alias index.

flysideways wrote:
I got systemd-ed on my openrc install.
Yep...

Goverp wrote:
I love the way systemd calls this feechur "Predictable".
It is... but they don't add the clarification "predictable by the machine, not by its human user" :D I think that you can deduce it from information in the sysfs.

pjp wrote:
On one of my home systems, I have an internal NIC enp3s0 and for some reason, the external NIC at enp2s0. I'm sure there's a reason for why they are essentially the same name and only differing by the "p" number.
Yes, different bus numbers. prefix [P domain ] p bus s slot [f function] [n phys_port_name | d dev_port ] --> PCI geographical location.

pjp wrote:
Contrast that with my laptop which has the wonderfully easy to access enp0s31f6 [...]
Multi-function PCI device.
_________________
NeddySeagoon wrote:
I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:
As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Back to top
View user's profile Send private message
hdcg
Tux's lil' helper
Tux's lil' helper


Joined: 07 Apr 2013
Posts: 120

PostPosted: Wed Feb 01, 2023 4:38 am    Post subject: Reply with quote

Hi flysideways,

thanks for pointing this out and tracking it down. Just got my RPI4 back online, as this also hit me after rebooting it on the weekend.

Fun fact: Only after this issue I noticed, I do not yet have a micro HDMI adapter (RPI4 is running headless since it's 1st start in 2019) and I lost my SD card readers due to PC and Notebook updates in between. Adapter and reader will be delivered today, but now only needed for the next incident.

Best Regards,
Holger
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum