Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dedicated Hetzner install script sometimes gets network interface name wrong (but altname right) #14

Open
bitonic opened this issue Oct 6, 2021 · 1 comment

Comments

@bitonic
Copy link
Contributor

bitonic commented Oct 6, 2021

I've just used the Hetzner install script to install on a newly rented server. The network interface name is detected to be enp3s0. However once I reboot into nixos, that is only the altname:

[root@herc:~]# ip address
...
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
...
    altname enp3s0

While the altname works when manually configuring the network with the ip command, it seems to not work in configuration.nix. Once I rename enp4s0 to eno1 in configuration.nix things work at boot.

@bitonic
Copy link
Contributor Author

bitonic commented Oct 11, 2021

OK, I figured out why this is: the script just grabs ID_NET_NAME_PATH, but if ID_NET_NAME_ONBOARD is present that will be picked instead. In fact, the linked blog post lists how the name is chosen, and there are a few more options as well: https://major.io/2015/08/21/understanding-systemds-predictable-network-device-names/#picking-the-final-name .

So we should probably amend the script to pick the first of those which is present.

cc @nh2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant