4

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.

3
  • I am deleting my answer as I don't have an answer for you. I cannot duplicate your issue, and I don't want to keep guessing what your issue is.
    – Terrance
    Oct 11, 2016 at 6:32
  • @Terrance, Actually, it looks like your solution works as well. Changing the conf in /etc/network/interfaces for eth0 from auto to manual also stopped the hanging during boot.
    – Cerin
    Oct 11, 2016 at 13:59
  • I actually like your answer that you wrote. I didn't stop to think about having network ports listed in the interfaces file. That would also explain why I couldn't duplicate your issue, as I don't have those listed in my interfaces file. Nice find! =)
    – Terrance
    Oct 11, 2016 at 14:01

3 Answers 3

2

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

🤙

1

The sleep commands waiting for the network can be changed in the file

/etc/init/failsafe.conf
2
  • That file doesn't exist on my system.
    – Cerin
    Oct 11, 2016 at 14:00
  • Good to know, the ARM version of Ubuntu must be doing that elsewhere.
    – Katu
    Oct 12, 2016 at 7:24
1

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.

1
  • I have witnessed the slowness that you have mentioned in the servers I work on when they have an interface unplugged but enabled. And you are correct that they hang for a short time. So, good research that you have done. =)
    – Terrance
    Oct 11, 2016 at 14:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .