If your Linux system takes longer to boot than you think it should, the answer is almost certainly hiding in your systemd startup chain. The good news: systemd already ships with everything you need to find the problem and fix it. No extra tools required, no guesswork. In this guide, you will use systemd-analyze to… continue reading.
If your Linux system takes longer to boot than you think it should, the answer is almost certainly hiding in your systemd startup chain. The good news: systemd already ships with everything you need to find the problem and fix it. No extra tools required, no guesswork. In this guide, you will use systemd-analyze to… continue reading.
8s boot time? Not too shabby. This is mine. Presumably this is to get to my login screen, not the selected desktop, with no delay for awaiting a password:
graphical.target @1min 16.660s
└─multi-user.target @1min 16.660s
└─getty.target @1min 16.660s
└─[email protected] @1min 16.660s
└─plymouth-quit-wait.service @1min 16.603s +29ms
└─rc-local.service @1min 16.593s +7ms
└─network-online.target @1min 16.564s
└─NetworkManager-wait-online.service @1min 8.884s +7.680s
└─NetworkManager.service @31.255s +37.607s
└─dbus.service @30.328s +903ms
└─basic.target @30.309s
└─sockets.target @30.309s
└─triggerhappy.socket @30.309s
└─sysinit.target @30.303s
└─systemd-timesyncd.service @30.263s +40ms
└─systemd-tmpfiles-setup.service @30.154s +85ms
└─local-fs.target @30.115s
└─run-credentials-systemd\x2dtmpfiles\x2dsetup.service.mount @30.156s
└─local-fs-pre.target @7.064s
└─systemd-tmpfiles-setup-dev.service @6.959s +104ms
└─systemd-sysusers.service @3.762s +3.169s
└─systemd-remount-fs.service @3.532s +205ms
└─systemd-journald.socket @3.494s
└─-.mount @3.440s
└─-.slice @3.440s
I’m sure it was much faster before (do I recall ~20s?). I like fast boots, but since I have a Pi it doesn’t even matter. This is because I can just leave it on all the time, since it’s (nearly) all solid state, low power and Linux often can run on it for weeks at a time.
I once tried installing Windows 2000 Server on 2nd hand hardware. 7 minute boot time… did not pursue that little project too far!
Looking at it the NetworkManager.service taking 37 seconds is the biggest offender. That combined with NetworkManager-wait-online.service at 7.68s, your network stack alone is eating ~45 seconds.
Might be an interface that’s configured but not actually connected. If you have Wi-Fi + Ethernet and only use one, disable the other. I had this issue with my B550 motherboard.
Also you can try this:
sudo systemctl disable NetworkManager-wait-online.service
However, if you have services (like NAS or VPN) that genuinely need the network up before they start then avoid that.
That command just disables the waiting service, not your connection. Use enable if you need to revert.
Also see:
You can shorten the timeout as well to like 5 seconds but honestly I would just disable because you want the system to boot regardless.
Edit: Also what is the result of:
sudo systemctl list-dependencies network-online.target
Thanks for the comment. Well I’m still using a Wi-Fi hotspot provided by my phone. Reception is variable and often poor, and for some reason the Wi-Fi can sometimes take minutes to connect.
I expect interference is a factor.
sudo systemctl list-dependencies network-online.target
network-online.target
● ├─networking.service
● └─NetworkManager-wait-online.service
Like I say, boot time is not really an issue for me, as I find my up-times tend to average 1-2 weeks (thanks to your journalctl article for ascertaining this).
Makes sense. And thanks. I also use hybrid-sleep a lot so end up with uptime of many weeks.
I have been doing a lot of boots since I upgraded to a (used) nvme SSD drive (that fits inside the official case), so have applied your suggested mod to disable waiting for network at boot now.
No more extended iowait blocking periods, and about 20s to reboot to a desktop launcher screen.
Adding the nvme SSD internally seemed to hamper the wi-fi, so I used a £6 USB dongle to overcome that. Actually I was originally going to use it on my 2nd Pi 5’s Flirc case which also hampers wi-fi, but I’ll need another one for that now.