systemd-networkd-wait-online.service causing Artful to take over 2 minutes to boot, but Apport says package is not installed
Solution 1
Existing answers have suggested editing files in /lib
in place or copying them to /etc
. I recommend doing the following:
sudo systemctl edit --full systemd-networkd-wait-online.service
Then you can make modifications in the file, as described in the existing answers:
ExecStart=/lib/systemd/systemd-networkd-wait-online --timeout 1
This way systemd will take care of the files for you and it will survive upgrades. If you need to restore the default behavior you can delete the respective file in /etc/systemd/system/
.
Solution 2
Same problem here with Artful.
2min 52ms systemd-networkd-wait-online.service
As a workaround you can add a timeout for the service. To do that edit the file /lib/systemd/system/systemd-networkd-wait-online.service and adjust the line that starts the service:
ExecStart=/lib/systemd/systemd-networkd-wait-online --timeout 1
Setting the timeout to 1 doesn't seem to have any implications as there's another service with the exact same task (NetworkManager-wait-online.service).
Solution 3
You can make ExecStart=/lib/systemd/systemd-networkd-wait-online --timeout 1
permanent by copying the modified systemd-networkd-wait-online.service
file from /lib/systemd/system/
to /etc/systemd/system/
directory, using the following command.
sudo cp /lib/systemd/system/systemd-networkd-wait-online.service /etc/systemd/system/
Solution 4
Most people don't even need to wait for network to be up when booting. In this case you can simply disable the waiting:
The above link explains what the service does and tells you how to disable it, as most users without an IT department would want to do.
Related videos on Youtube
Luke Andersojn
Updated on September 18, 2022Comments
-
Luke Andersojn almost 2 years
Symptons same on every release after 16.04.3.
At boot, system hangs on the Ubuntu screen with 4 flashing dots for over 2 minutes.
Ran
systemd blame
which indicatedsystemd-networkd-wait-online.service
took 1 minute and 38 seconds to run andNetworkManager-wait-online.service
took 10 seconds to run.Ran
ubuntu-bug systemd-networkd-wait-online.service
which returns that the bug cannot be reported because it concerns a package that is not installed.Without Apport working, I am unsure how to file the bug on Launchpad.
-
Redbob almost 7 yearsDoing an upgrade from Lts to beta release could not result to a happy-end.
-
Luke Andersojn almost 7 yearsI'm just testing, so that I can notify of bugs. 16.04 was a bug filled release, rather 18.04 not be the same.
-
Redbob almost 7 yearsSo you made a clean install of 17.10?
-
-
Cynplytholowazy almost 7 yearsWhy adding a timeout work? Also you are using artful, which is not specific to the version specified, which is xenial.
-
Eric Keller over 6 yearssorry for the delay of my answer... I did add a timeout since I do not want to wait 2 min on bootup.
-
Armin almost 6 yearsWorks like charm!
-
Armin over 5 yearsBtw. after I've performed a
apt-get dist-upgrade
the contents in /lib/systemd/system/systemd-networkd-wait-online.service has been restored. The--timeout 1
was gone. So this workaround is not update-safe. -
Daniel over 3 yearswhat is the unit of 1 in --timeout. Is it 1 second?