curmudgeon wrote:I have read the news item (/usr/portage/metadata/news/2013-03-29-udev-upgrade/2013-03-29-udev-upgrade.en.txt), and freedesktop.org wiki page (
http://www.freedesktop.org/wiki/Softwar ... rfaceNames) at least ten times, and it still makes absolutely no sense to me (other than the fact that it will likely break a bunch of stuff on my machines).
Code: Select all
# udevadm test-builtin net_id /sys/class/net/eth0 2> /dev/null
ID_NET_NAME_MAC=enx001372eb4498
ID_OUI_FROM_DATABASE=Dell ESG PCBA Test
ID_NET_NAME_PATH=enp3s0
First question - what happens (after I upgrade) if I remove ALL files from /etc/udev/rules.d/?
Your interface gets name enp3s0, so you would have to eg. use /etc/init.d/net.enp3s0 instead of /etc/init.d/net.eth0
curmudgeon wrote:
Next question - I see (in the ebuild) "You can use kernel command net.ifnames= to control this feature." Does net.ifnames have to go on the kernel command line, or can it go in /etc/sysctl.conf?
net.ifnames=1 is the default, as in, enabled, net.ifnames=0 you can set in kernel command line to disable the new names, so even with all files gone from /etc/udev/rules.d you can
disable it this way too.
good question about sysctl.conf, I'm not actually sure.
curmudgeon wrote:
There is nothing in the documentation I have seen about updating /etc/init.d/net.eth0 (a link to /etc/init.d/net.lo) to /etc/init.d/net.enp3s0. Does that have to be done manually, or is there some automated way (like reinstalling openrc) to do it?
I haven't seen any of the documentation mention the need to update /etc/conf.d/net, which seems like a fairly important step in all of this (which I assume has to be done manually).
The news item briefly mentions the symlink, but it can't cover everything like eg. iptables rules, so it's not automated. That's the purpose of the news item in the first place,
since it can't be automated enough.
curmudgeon wrote:
The bottom line is that I am quite happy with the eth0 name (I have been running linux for almost twenty years now, and gentoo for just about half of that).
What is the simplest way to keep the eth0 name (for a standard machine with one ethernet card)?
Use net.ifnames=0 kernel commandline OR create symlink from /etc/udev/rules.d/80-net-name-slot.rules to /dev/null, and eth0 as assigned by the kernel will stay used. Except that
if the driver code changes, kernel code changes, hardware changes, your device might end up accidentally as, for example, eth1
That's the point of predictable network names, it goes past that
curmudgeon wrote:
If you believe that is a really bad idea, I can probably get used to changing to net0 (again what is the simplest way to do that?).
The news item has example of creating 70-my-network.rules or similar based on MAC address to rename into net0, net1, ... Just replace the yy:yy:yy:yy:yy... used in the news item with your MAC. If you do this, that would mean you only need /etc/udev/rules.d/70-my-network.rules, and the previously mentioned /etc/udev/rules.d/80-net-name-slot.rules symlink isn't required, but shouldn't really matter at all in this case either
curmudgeon wrote:
I believe it would help to see exact rules files for the most common cases.
Thank you in advance.
Well, everything you asked above is already answered in the news item. I mean, this logic is revealed by the news item and by the link to the upstream wiki. It's not really that hard at all.