[systemd-devel] eth2: Failed to rename network interface 6 from 'eth2' to 'eno1': File exists

Harald Dunkel harald.dunkel at aixigo.com
Thu Jan 6 15:26:42 UTC 2022


On 2022-01-06 13:23:37, Michael Biebl wrote:
> Am Do., 6. Jan. 2022 um 10:00 Uhr schrieb Mantas Mikulėnas <grawity at gmail.com>:
> 
>> Grep your entire /etc for those interface names (starting with /etc/udev), find out where they're defined, and remove them
> 
> Please also make sure to rebuild your initramfs after doing that.
> Files from /etc/udev are usually embedded in the initramfs.
> 

The initrd has been rebuilt and eth4 and eth5 are gone.

# ls -l /sys/class/net/*
lrwxrwxrwx 1 root root 0 Jan  6 15:06 /sys/class/net/eno1 -> ../../devices/pci0000:00/0000:00:01.1/0000:02:00.0/net/eno1
lrwxrwxrwx 1 root root 0 Jan  6 15:07 /sys/class/net/enp2s0f1 -> ../../devices/pci0000:00/0000:00:01.1/0000:02:00.1/net/enp2s0f1
lrwxrwxrwx 1 root root 0 Jan  6 15:07 /sys/class/net/enp2s0f2 -> ../../devices/pci0000:00/0000:00:01.1/0000:02:00.2/net/enp2s0f2
lrwxrwxrwx 1 root root 0 Jan  6 15:07 /sys/class/net/enp2s0f3 -> ../../devices/pci0000:00/0000:00:01.1/0000:02:00.3/net/enp2s0f3
lrwxrwxrwx 1 root root 0 Jan  6 15:07 /sys/class/net/enp5s0 -> ../../devices/pci0000:00/0000:00:1c.4/0000:05:00.0/net/enp5s0
lrwxrwxrwx 1 root root 0 Jan  6 15:05 /sys/class/net/eth3 -> ../../devices/pci0000:00/0000:00:19.0/net/eth3
lrwxrwxrwx 1 root root 0 Jan  6 15:07 /sys/class/net/lo -> ../../devices/virtual/net/lo


eno1 and eth3 are still present, i.e. the original problem (2
onboard interfaces supposed to be renamed to eno1) is still
unresolved. The workaround is to kick out "onboard" in the
NamePolicy, e.g.:


# cat /etc/systemd/network/98-ignore-onboard.link
[Match]
OriginalName=*

[Link]
NamePolicy=keep kernel database slot path
AlternativeNamesPolicy=database onboard slot path
MACAddressPolicy=persistent


(https://www.freedesktop.org/software/systemd/man/systemd.link.html)


Do you think it would be reasonable for udev to use the next option
from the name policy list instead of falling back to the "kernel"
policy, if there is a conflict?


Thank you very much for your support and your patience

Regards
Harri


More information about the systemd-devel mailing list