I have Ubuntu 16 running on a Raspberry Pi 3 mobile platform, and if it's not connected to ethernet, and the wifi's out of range during boot, it takes about 15 minutes to boot, since it appears Ubuntu has a very long timeout while it waits to bring up eth0 or wlan0. I've tested this repeatedly, and when the boot takes forever, I find plugging in an ethernet cable magically makes boot completely instantly.
How do I disable this, so Ubuntu boots up quickly, regardless of network connectivity? I'm using Network Manager, which is excellent at re-establishing a wlan0 connection onces an recognized SSID is detected.
Fire up your favorite text editor:
/etc/systemd/system/network-online.targets.wants/networking.service
Find and edit this line with your meat fidgets:
TimeoutStartSec=5min
?
The problem is that eth0 was hardcoded in
/etc/network/interfaces
, so networking always tried to bring it up at boot.Since I'm using Network Manager, I found the easiest solution was to remove all the eth0 entries from
/etc/network/interfaces
. This makes Network Manager auto-detect it and bring it up if present.Edit: Even with the eth0 entry removed the
/etc/network/interfaces
, booting was still slow (even though it was faster than before). I found adding the entry back, but changing it from "auto" to "manual" made boot happen almost instantly.The sleep commands waiting for the network can be changed in the file