Web lists-archives.com

Re: in /etc/network/interfaces: "auto" vs "allow-hotplug"




On Sep 24, 2017, at 6:24 AM, Henrique de Moraes Holschuh <hmh@xxxxxxxxxx> wrote:

> On Sat, 23 Sep 2017, Rick Thomas wrote:
>> I have two machines (out of a group of ten) that will not bring up
>> their ethernet interface at boot time if the interfaces is of type
>> “allow-hotplug”.  When I change that to “auto” the interface comes up
>> at boot with no problem…
> 
> ...
> 
>> Anybody have a clue as to what’s going on?
> 
> auto:            try to ip link set <dev> up  at boot.  Best choice for
>                 anything PCIe/SoC.
> 
> allow-hotplug:   *wait* for kernel+drivers+udev to detect the device,
>                 then ip link set <dev> up it.  The only thing that can
>                 deal with annoying USB, SDIO, etc.
> 
> This can be kinda important when non-auto-loading stuff is involved, or
> when network file systems are involved.
> 
> So, look at what *exact* kind of network device you're dealing with.
> 
> -- 
>  Henrique Holschuh

Thanks, Henrique. That helps somewhat…
In both cases, the ethernet interface is on the motherboard, which (I guess) means they are PCI.

One is an Apple PowerMac G5. lspci says:
    0002:20:0f.0 Ethernet controller: Apple Inc. UniNorth 2 GMAC (Sun GEM)

The other is a Toshiba Satellite laptop.  lspci says:
    02:00.0 Network controller: Qualcomm Atheros AR9285 Wireless Network Adapter (PCI-Express) (rev 01)
    08:00.0 Ethernet controller: Qualcomm Atheros AR8152 v1.1 Fast Ethernet (rev c1)
The interface in question is the Fast Ethernet, not the Wireless (which is unused)

Since “allow-hotplug” seems to work OK most of the time, even for PCI/PCIe/SoC, and “auto” doesn’t work at all for USB, I guess that’s why the installer uses “allow-hotplug” by default.  Or maybe they just chose the first thing that seemed to work long ago and have not seen any reason to change it?

I’ve only started seeing this since Stretch (though I may have seen it once or twice in late revs of Jessie).  Do you have any idea what may have changed in that timeframe?

Another semi-correlation that may be relevant:  The two that require “auto” both have new-style network interface names.  One of the “allow-hotplug” machines also has a new-style name, but all the rest have old-style “eth#” names.

If it really is true that for PCI/PCIe/SOC interfaces, the best choice is “auto”:  Is there some way the installer could know the difference and do the “right thing” in all cases?

Thoughts?
Rick