Slow Linux Boot: Troubleshooting Guide
In this article
This guide helps you diagnose and fix a slow-booting Linux system, covering the most common causes from boot services to hardware. You'll learn how to measure boot time, identify bottlenecks with systemd, and apply targeted fixes that can reduce boot time from minutes to seconds.
Why Linux Boot Times Vary
Linux boot speed depends on a combination of your hardware (SSD vs HDD, CPU speed, RAM), the distribution's default service set, and your installed applications. A modern system with an SSD and a lean desktop environment can boot in under 10 seconds, while an older HDD with a heavy GNOME setup and many background services may take 60 seconds or more. The boot process itself is a sequence: firmware (BIOS/UEFI) initializes hardware, the bootloader (GRUB) loads the kernel, the kernel starts systemd (PID 1), and systemd launches parallel services until the graphical login screen appears.
Measuring Your Current Boot Time
Before changing anything, you need a baseline. On almost all modern distributions using systemd, run:
systemd-analyze– shows total kernel and userspace time.systemd-analyze blame– lists each service by the time it took to start, longest first.systemd-analyze critical-chain– shows the slowest path to the graphical target.
Example output of systemd-analyze might be: Startup finished in 1.2s (kernel) + 8.4s (userspace) = 9.6s. The blame command often reveals a single service like NetworkManager-wait-online.service consuming 5 seconds – that's your first target.
Common Culprits and Fixes
After you have the blame list, attack the worst offenders. Here are the most frequent slowdowns and how to address them:
- NetworkManager-wait-online.service – waits for network connectivity before continuing. Disable it with
systemctl disable NetworkManager-wait-online.service. If you use Wi-Fi, you'll still get a connection later; it just won't block boot. - Fstrim.service – TRIMs SSDs weekly, but if it runs at boot on some systems, it can take seconds. Check with
systemctl status fstrim.service; if it's enabled, you can change its schedule or disable it (SSD health is maintained by periodic TRIM, not necessarily at boot). - Snap or Flatpak services – snapd mounts squashfs images, which adds time. If you don't use snaps, remove snapd (
sudo apt purge snapdon Debian/Ubuntu). For Flatpak, it's usually not a boot service, but the portal service can be slow; leave it unless you see it in blame. - Kernel modules – a module that probes hardware (e.g.,
nvme,usb-storage) can delay boot. Checksystemd-analyze blameformodprobeentries. You can blacklist unused modules (e.g.,bluetoothif you don't use it) by addingblacklist bluetoothto/etc/modprobe.d/blacklist.conf. - Firmware (BIOS/UEFI) – a slow POST (Power-On Self-Test) can add 5–15 seconds. This isn't Linux's fault, but you can often reduce it by disabling unnecessary controllers in BIOS (e.g., floppy, parallel port) and enabling “Fast Boot” if available.
After each change, reboot and re-run systemd-analyze to measure the effect. Do one change at a time so you know what worked.
Advanced: Parallelizing and Masking Services
systemd already starts services in parallel, but some services have dependencies that force serialization. You can see these in systemd-analyze critical-chain. If a service is not required for your session, you can mask it entirely:
- Identify the service (e.g.,
cups.servicefor printing). - If you never print, run
sudo systemctl disable --now cups.serviceto stop and disable it. - If a service is still pulled in by another, mask it:
sudo systemctl mask cups.service– this creates a symlink to /dev/null, making it impossible to start.
Be careful: masking critical services (like systemd-logind) will break your system. Only mask services you recognize as optional.
Another trick is to reduce the timeout for services that hang. For example, if a service fails to start and waits 90 seconds by default, you can set TimeoutStartSec=5 in its unit file override. Use systemctl edit service-name to create an override without editing the system file.
Hardware Upgrades That Actually Help
Software tweaks can only do so much. If your boot is still slow, the bottleneck is often storage. Upgrading from a spinning hard drive to a SATA SSD typically cuts boot time by 50–70%. Moving from SATA SSD to NVMe SSD gives a smaller but noticeable improvement. RAM also matters: if your system swaps during boot, it will crawl. Adding RAM or reducing startup applications (via your desktop's autostart settings) helps. For laptops, a slow Wi-Fi driver can delay boot; check dmesg for errors.
Common Mistakes and Misconceptions
- Disabling services blindly – Removing
NetworkManager-wait-onlineis safe, but disablingsystemd-udevdwill break device detection. Always read what a service does before disabling. - Confusing boot time with login time –
systemd-analyzemeasures up to the graphical target, not the time to your desktop. Some desktop environments (GNOME, KDE) start heavy after login. To measure that, usesystemd-analyze critical-chain graphical.targetand also time from login to desktop manually. - Assuming a fast kernel means fast boot – The kernel often takes only 1–2 seconds; the real time is in userspace services.
- Not checking for firmware updates – A buggy UEFI can cause long POST times. Check your motherboard vendor's site (or use
fwupdmgron Linux) for updates.
When Boot Time Isn't the Problem
Sometimes the system appears slow after boot, but the boot itself is fine. This could be due to a slow disk encryption setup (LUKS), a desktop environment that loads many extensions, or a virus scanner (e.g., ClamAV) running at startup. Use systemd-analyze blame after login as well – you can run it anytime to see what services are still starting. If the issue is after login, check your desktop's autostart directory (~/.config/autostart) and disable unnecessary entries.
Frequently Asked Questions
Is it safe to disable NetworkManager-wait-online.service?
Yes, for most desktop users. This service only ensures network is up before continuing; without it, your system boots faster and network connects a moment later. If you run network-dependent services like NFS mounts at boot, you may need it – but for a typical laptop or desktop, disabling it is safe and commonly recommended.
Why does my boot time vary between reboots?
Boot time can vary because of hardware initialization timing, background updates, or services that wait for network responses. If you have an HDD, file fragmentation also plays a role. For consistent measurements, disable network-dependent services and run systemd-analyze several times to get an average.
Can I reduce boot time by editing GRUB parameters?
Yes, but the gains are usually small. Adding quiet and splash only hides messages, not time. Adding fastboot (a kernel parameter) can skip some checks, but it's not standard and may cause issues. The most effective GRUB tweak is reducing the timeout in /etc/default/grub (e.g., GRUB_TIMEOUT=1 instead of 5) – that saves 4 seconds of waiting at the menu.
What does 'systemd-analyze blame' show that 'top' doesn't?
blame shows the time each service took to start during the boot process, not current CPU usage. A service might take 5 seconds to start but use very little CPU after that. top shows real-time usage, which is useful for post-boot slowdowns, not boot-time analysis.
Should I disable systemd-journald to speed up boot?
No. journald writes boot logs, but it's very fast and runs in the background. Disabling it would remove logging, making troubleshooting harder, and the boot time savings would be negligible (usually less than 100ms).
My boot is slow but systemd-analyze shows fast times – what's wrong?
If systemd reports a fast boot but your actual experience is slow, the delay is likely in the firmware (BIOS) or the display manager/login screen. Check your BIOS POST time (some motherboards show it) and try disabling the splash screen. Also, some NVIDIA drivers can add seconds to the graphical login.