Il giorno Tue, 10 Oct 2017 22:25:23 -0500
John Morris <[email protected]> ha scritto:

> On Tue, 2017-10-10 at 01:49 +0200, Alessandro Selli wrote:
>
>>   By the manual, the correct solution in configuring Grub as to pass the
>> kernel these parameters:
>> 
>> biosdevname=0 net.ifnames=0
>
> Those fix similar problems but not exactly the same ones.

  Agree.  udev rules confer a given piece of hardware a given name.  Those
kernel parameters instruct the kernel not to let network interfaces be
renamed by userland.

>  The udev
> persistent rules get you when you move an image from one machine to
> another or swap out failed hardware and suddenly you have no network
> because eth0 suddenly became eth1.

  Well, if you had a /etc/udev/rules.d/70-persistent-net.rules file that
renamed a network interface identified by its MAC address eth0 and you
swapped that card for a new one, then the new one is going to get a
different name because eth0 was already taken.  If you used those kernel
parameters instead it would be named eth0.  Which is what you'd expect if it
was the only ethernet card on board.

>  And as I noted, not only network
> device names but CD drives as well are impacted.

  I think for CDs and DVDs the biosdevname=0 parameter suffices.  It used to
be all it was needed to prevent networking gear from being renamed, but at
some point they added the net.ifnames=0 parameter that is specific to
ethernet cards.

>  The fixes you suggest
> solve the equally annoying problem of eth0 or wlan0 unexpectedly turning
> into a string of gibberish after an upgrade.

  Pretty annoying, agree.  That's the reason I enquiried about the possible
ways to prevent the renaming from happening.

> They are turning everything into a UUID or similar string of untypable
> gibberish.  It is almost like they don't want you to use the command
> line directly anymore.  Nah, that couldn't be it, right?

  I don't think that's the reason, many critical Linux systems are run and
managed without a GUI, just think of supercomputers, clusters, IoT and
embedded devices. Carrying around a complex device name is not such an issue,
you just export an ETH0 variable with it's name and use $ETH0 in place of
eth0 on the commands you type.  I still do prefer typing just eth0, I'm such
a lazy sysadmin!  :-)


Alessandro
_______________________________________________
Dng mailing list
[email protected]
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng

Reply via email to