Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: Interface names just went 1995! (Read 1329 times) previous topic - next topic
0 Members and 4 Guests are viewing this topic.

Interface names just went 1995!

I am in a bad spot right now. I was updating our Artix servers and then they never came up. I scrambled to find a monitor and when I connected it to a server, I discovered that the update went 1995 on me. My interfaces are now "eth0", "eth1", etc and NOTHING is coming up. How do I fix it? I tried "net.ifnames=1" on the kernel command-line and that does not work. I keep getting the old names. It has been one, maybe two months tops since I updated last. We've been down for over an hour now. I cannot find anything that would force old names. What do I do?

This is for a business and downtime is money. I wish I had known an update would revert. Tons of scripts rely on the interface name. It would take hours to change them and then some future update would revert it again, so I need to know how to avoid this in the future. I ALWAYS want predictable names.
-The Great Sephiroth

Re: Interface names just went 1995!

Reply #1
It's a udev rule that changes the interface names I believe. They were changed because eudev went unmaintained (although now it's picked up again) and apparently the standalone udev doesn't have said rules in it.

Re: Interface names just went 1995!

Reply #2
You actually run Artix on a production server?  ;)

It's most likely changed by udev. It's not a big deal. You can easily modify your existing connections to use the new interface names. If you have to use the old names in your system for some reason, you could create an udev rule, something like /etc/udev/rules.d/020_net_interfaces.rules, and put lines in the file,

KERNEL="oldnameprefix*", SYSFS{address}=="MACaddress", NAME="newname"

then reboot the system.

"net.ifnames=1" enables interface name changes. Value "0" disables it.

Re: Interface names just went 1995!

Reply #3
What do I do?
This is for a business and downtime is money.
If I were the boss I would fire the admins, if I were an admin I would read the wiki articles.

MfG

P.S:

Forums are no substitute for wiki reading.
"Wer alles kann, macht nichts richtig"

Artix USE="runit openrc slim openbox lxde gtk2 qt4 qt5 qt6 conky
-gtk3 -gtk4 -adwaita{cursors,themes,icons} -gnome3 -kde -plasma -wayland "

Re: Interface names just went 1995!

Reply #4
See this thread for the original missing udev rule from eudev, also I think that rule was the only thing that took any notice of net.ifnames:

https://forum.artixlinux.org/index.php/topic,3010.msg19750.html#msg19750

eudev-git is in the AUR too, if you wanted to try that, for a package based solution, it should be a bit more up to date than the last eudev Artix package. Looking at the eudev repo I see some PR's with new stuff queuing up for inclusion, so things are starting to happen there.
 If you build and install eudev-git and libeudev-git (it's a split PKGBUILD, and you are probably going to need to do both together or it may not work) it's working fine atm for me, just like before (ie hwdb not properly working, don't know if some of those new pr's might have a fix though) and the -git packages helpfully replace the regular current eudev / libeudev packages, so it all installs easily. And non-git eudev is in the AUR too - but that may require ignoring the version downgrade.

Re: Interface names just went 1995!

Reply #5
If I were the boss I would fire the admins, if I were an admin I would read the wiki articles.

MfG

P.S:

Forums are no substitute for wiki reading.
The Wiki articles are an epic fail, or I would not have posted. I saw a trillion articles screaming at me to add "net.ifnames=1" to the kernel command-line, and as stated above, this does not work. I tried this for hours and could not make it work. Perhaps there is yet another article that has the correct methodology which you can point me to?

See this thread for the original missing udev rule from eudev, also I think that rule was the only thing that took any notice of net.ifnames:

https://forum.artixlinux.org/index.php/topic,3010.msg19750.html#msg19750

eudev-git is in the AUR too, if you wanted to try that, for a package based solution, it should be a bit more up to date than the last eudev Artix package. Looking at the eudev repo I see some PR's with new stuff queuing up for inclusion, so things are starting to happen there.
 If you build and install eudev-git and libeudev-git (it's a split PKGBUILD, and you are probably going to need to do both together or it may not work) it's working fine atm for me, just like before (ie hwdb not properly working, don't know if some of those new pr's might have a fix though) and the -git packages helpfully replace the regular current eudev / libeudev packages, so it all installs easily. And non-git eudev is in the AUR too - but that may require ignoring the version downgrade.

I am familiar with eudev in Gentoo. Works great. I am not sure I want to have core packages I manually need to build on a live system though. What should I be using which isn't systemd that is modern enough to use modern interface names which does not require manual building? I am a Gentoo guy here, not an Arch guy. I know Portage, not the Arch way.
-The Great Sephiroth

Re: Interface names just went 1995!

Reply #6
Like I said before, simply create this file, not including the cat line of course, it can also go in /usr/lib/udev/rules.d:
Code: [Select]
$ cat /etc/udev/rules.d/80-net-name-slot.rules 
# do not edit this file, it will be overwritten on update

ACTION!="add", GOTO="net_name_slot_end"
SUBSYSTEM!="net", GOTO="net_name_slot_end"
NAME!="", GOTO="net_name_slot_end"

IMPORT{cmdline}="net.ifnames"
ENV{net.ifnames}=="0", GOTO="net_name_slot_end"

NAME=="", ENV{ID_NET_NAME_ONBOARD}!="", NAME="$env{ID_NET_NAME_ONBOARD}"
NAME=="", ENV{ID_NET_NAME_SLOT}!="", NAME="$env{ID_NET_NAME_SLOT}"
NAME=="", ENV{ID_NET_NAME_PATH}!="", NAME="$env{ID_NET_NAME_PATH}"
If you put it in the /usr/lib/udev/rules.d original system location then if you return to real eudev either through the AUR or because Artix switches back later you will get a file conflict error, and have to delete it to make way for the package provided one. If you put it in /etc/udev/rules.d you won't get a warning but it will probably take precedence over the package provided one, so you will still want to delete it at some point in the case of returning to real eudev. In the very long term if the syntax for udev rules changes and you still had this config in operation you may need to revise it, but that is probably unlikely.

The wlan / eth names have always been kept in some other non-systemd distros, it's really just a preference and only 3 people including me and you on this forum so far have wanted to switch back, I also use Devuan sometimes too and always used wlan /eth there.

If you don't want to use wlan / eth that's your easiest options - config xudev / eudev by adding that file, or install real eudev from the AUR. Remember an AUR helper will update it for you. (The eudev-git PKGBUILD version naming seemed to have a bug though as it permanently wanted to update, didn't try the eudev one)

Artoo said if the eudev project gets back running properly (which is now in progress) then Artix might switch back again, so it's probably best to wait and see what happens and just fix things to your preference in the meanwhile.

Re: Interface names just went 1995!

Reply #7
Thanks for your time and help. I was not sure how to do what you said in your previous post as I have never had to mess with udev rules since I started using Linux in the 90's. I guess I should probably learn udev rules, but this is the first time I have needed them in over twenty years.

I also did not realize that using AUR handled things for me. I thought that I had to do a lot of configuration and if that was the case I'd use Gentoo here. I currently use Gentoo on my personal systems and love it. I am hoping to use Artix for shell-only servers as it seems to be GREAT and is far less painful to maintain than Gentoo. I used to also use PCLinuxOS for workstations, but the head dev is incredibly rude and likes to make fart jokes and the like, and he doesn't handle criticism well. Had to go back to Gentoo on those systems.

I will try this now and cross my fingers. Thanks again for your time and help.
-The Great Sephiroth

Re: Interface names just went 1995!

Reply #8
OK, I marked it at solved, but it isn't. Upon rebooting I still have eth0. I put the file in as /etc/udev/rules.d/80-net-name-slots.rules with the line starting with the comment. Rebooted. Still have eth0, no enp3s0.
-The Great Sephiroth

Re: Interface names just went 1995!

Reply #9
Try:
Code: [Select]
$ cat /proc/cmdline
to check you are not disabling it via net.ifnames perhaps?
(Personally I tried Calculate Linux briefly but thought it was probably easier to build from source using PKGBUILD's, although things are not set up to build everything - in any case, it is a very easy and effective system when you become familiar with it.)

Re: Interface names just went 1995!

Reply #10
No, I tried the command-line option both ways but returned it to normal when nothing worked.
Code: [Select]
[sv01 ~]# cat /proc/cmdline
BOOT_IMAGE=/vmlinuz-linux root=UUID=5ef266b6-6f84-4d6e-bc12-ffd3ef17f36c rw loglevel=3 quiet
I was hoping to stick with Artix as it seems to be very up-to-date, like Arch/Gentoo, but without the Microsoft subsystem known as systemd.
-The Great Sephiroth

Re: Interface names just went 1995!

Reply #11
I have latest udev (249.4-3) installed, and my WiFi is wlan0 and Ethernet eth0. Ensure that you have /etc/udev/rules.d/00-net-name-slot.rules symlinked to /dev/null (this is done by artix-branding-base package).

https://gitea.artixlinux.org/artix/artix-branding/src/branch/master/artix-branding-base/etc/udev/rules.d/80-net-name-slot.rules

Also ensure you have any Arch packages under control by following a wiki article.

Edit: If, by any chance, I misunderstood, and you actually want poettering-names (why would anyone want that?), you'll need to freeze artix-branding-base with IgnorePkg to keep the updates from overwriting your file. Keep in mind that doing so is unsupported by both Arch and Artix.

 

Re: Interface names just went 1995!

Reply #12
Well, I did updates just now, rebooted, and now the names are correct again. Not sure why, but they are. I do have the rules in-place as before, but something must now be using the rules which was ignoring them under the previous kernel. Either way stuff is working again.

Strajder, I do like the reliable interface names because, well, they are reliable. This has nothing to do with systemd, which I despise, and was in the works before systemd. I have had MAJOR issues on servers with multiple NICs switching everything up after a reboot and then I get to spend an hour fixing the muck-up. Suddenly eth0 is eth3 and eth2 is eth3, it's a mess. I still have an ancient Debian system pre-systemd in use at a client who does not want to upgrade and if the power dies and the battery goes, causing a shutdown, the single NIC in the system comes up as eth1! Why? It makes no sense! A reboot and it is eth0 again, but I have to drive out, login, and reboot it by hand because there is a static config for eth0, but nothing for eth1. Such a pain.

So yeah, I like the reliable names. Never had an issue with them, but they are not a product of systemd or the jerk poettering as I understand it form the Gentoo devs.
-The Great Sephiroth

Re: Interface names just went 1995!

Reply #13
This has nothing to do with systemd,
This has everything to do with systemd and udev.

  • Most systems use a single network card.
  • Most systems don't need to hot-swap the said network cards.
  • How often does a serious "company server" need to be rebooted or its power goes down? With systemd, that is much more often. Other init systems don't force reboots. GNU/Linux users had pride in their systems not needing to be rebooted all the time, unlike Windows, until Poettering changed that with systemd. Well, with Artix, this feature of GNU/Linux is restored.
  • Serious "company servers" will have dedicated admins to manage them, and they will know what to do. They are paid to know what to do.

Since you said you don't have the issue anymore, I will mark this as solved.

Re: Interface names just went 1995!

Reply #14
From that link:
"We believe it is a good default choice to generalize the scheme pioneered by "biosdevname". "
Perhaps when you update the kernel it ran some hooks like mkinitcpio that picked up the change, I think if you update udev some post install hooks are run too.