[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: udev being an ass



On Tue, Aug 27, 2019 at 03:50:31PM -0400, Gene Heskett wrote:
> I'll do it, but the date on it is today, so I suspect something 
> in /lib/udev/rules.d is behind the re-write.

If that file exists, it's used.  Quotes in the file are ignored.  Valid
content in the file is used to map various interfaces (typically identified
by their MAC addresses) to interface names.

If the file does not exist, it will be (re)created.

If the file exists, but your interface isn't in it (as determined by
whatever criteria are being used to identify the interface, typically the
MAC address), then a new name will be assigned for it (skipping the
names that are already in use), and this will be written to the file.

So, the suggestion was to remove the file from the system before
replacing all your interfaces (or moving the hard drive to a new
computer, which from the hard drive's point of view is equivalent to
"you replaced all the interfaces").  In that situation, the file doesn't
exist, so it will be created from scratch.  You've got one or more
interfaces that don't (yet) have assigned names, so names will be
assigned to them.  One of them will become eth0, one of them will become
eth1, and so on, depending on how many interfaces there are in the new
machine.

If you have exactly one interface, it will become eth0, and you will be
happy.

If you have more than one interface, you have no way of knowing which
one will become eth0.  That's the situation the newfangled thing was
intended to remedy, but it doesn't really succeed at that either.

In almost every situation, you need to let the computer ASSIGN the names
first, then login to it and see what interface got what name, and then
adjust your configs accordingly.

I do not know of any way around this, other than only ever having one
interface per computer, which may work OK in some situations, but
definitely not in others.


Reply to: