On Sun, Jul 28, 2019 at 11:04:41AM +0200, Luca Olivetti wrote: > El 27/7/19 a les 23:20, Reco ha escrit: > > > > > > yet it always gets the name wlxe894f615307a. > > > > What you're doing colud work. > > The problem is - you have NIC that's attached via USB, so the usual > > rules do not apply. > > > > The reason of it - /lib/udev/rules.d/73-usb-net-by-mac.rules, that's > > applied after your .link file rename an interface. > > Is this madness due to systemd or debian packaging? In either case I think it > should be mentioned in the release notes.
One of the things that help me keep sanity with these thing is a systemd source tree. So, $ git remote -v origin https://github.com/systemd/systemd (fetch) origin https://github.com/systemd/systemd (push) $ git log -- rules/73-usb-net-by-mac.rules | wc -l 0 Seems to be a Debian addition, due to: systemd (234-1) unstable; urgency=medium ... [ Martin Pitt ] * udev README.Debian: Update transitional rules and mention *.link * files. - 01-mac-for-usb.link got replaced with 73-usb-net-by-mac.rules Although I'm pretty sure I bumped into this in stretch. Would be a nice joke if this configuration file crept upstream though ;) > > > OTOH the wired interface is always named eth0 (even with no .link file), > > > even if it should be > > > > > > # udevadm test-builtin net_id /sys/class/net/eth0 2>/dev/null > > > ID_NET_NAME_MAC=enx00160141ad18 > > > ID_OUI_FROM_DATABASE=BUFFALO.INC > > > > Systemd (udev is a part of it) is x86 centric. Unless NIC is connected > > to PCI or USB - it does not know how to rename them Predictably™. > > > > In your place I'd consider myself lucky - at least you have a network > > interface that's always called eth0, the way the kernel wants it. > > I am lucky until systemd behaviour changes: do I have the absolute certainty > that, upon upgrading to buster, it will still be named eth0? Yes. No. Maybe. These things are called Predictable because they aren't. A modern systemd paradox, if you will. For instance, then they added (Un)Predictable Naming to virtio devices in stretch - that was rough. Migrating to buster I was "pleasantly" surprised to see udev renaming interfaces that I created with "ip link add" (apparently because a meatbag named it too closely to the Dreaded Kernel Name). The solution was simple each time, but consisted of two steps. 1) Blacklilst that 73*rules file. Does more harm than good anyway. 2) Create an appropriate network link file(s), with several matching attributes. No, MAC alone won't suffice. And ID_PATH can change between stretch and buster, but that's upstream who gets the credit for *that*. > > > Extra points if it involves getting rid of systemd altogether ;-) > > > > It won't help you here. To solve this particular problem once and for > > all, you need a replacement for udev, which Debian does not provide. > > Thank you, that was tongue in cheek (though the more I use systemd the more I > hate it). You're welcome. Reco