Introduction to Slow Boot Times
I’ve been running Linux on my laptop for years, and slow boot times have become a major frustration. As someone who values productivity, waiting for my system to boot up can be a real pain. So, in 2025, I decided to dive into the world of systemd and see if I could optimize my boot process.
Understanding systemd
Before you start tweaking, it’s crucial to understand how systemd works. systemd is a system and service manager that’s responsible for booting and managing your Linux system. It’s complex, but there are some great tools available to help you understand and optimize it. One of the most useful tools is systemd-analyze, which provides detailed information about the boot process.
To get started, I ran the following command:
systemd-analyze
This gives you an overview of the boot process, including the time it takes for each service to start. By analyzing this output, you can identify the services that are taking the most time to start. Don’t bother with the services that start quickly - focus on the ones that are taking a long time.
Identifying Bottlenecks
The next step is to identify the bottlenecks in the boot process. I used the systemd-analyze blame command to get a detailed list of the services that were taking the most time to start:
systemd-analyze blame
This command provides a list of services, along with the time it takes for each service to start. By analyzing this output, you can identify a few services that are taking an unusually long time to start. This is where people usually get burned - they try to optimize the wrong services.
Tweaking Services
Once you’ve identified the bottlenecks, you can start tweaking the services to see if you can improve the boot time. One of the services that was taking a long time to start on my system was the NetworkManager service. I decided to disable the NetworkManager-wait-online service, which was waiting for the network to come online before proceeding with the boot process.
To disable this service, I ran the following command:
sudo systemctl disable NetworkManager-wait-online.service
This tweak alone saved me about 10 seconds of boot time. In practice, this can make a big difference.
Optimizing systemd Configuration
Another area to look into is optimizing the systemd configuration. I discovered that the DefaultTimeoutStartSec setting was set to 90 seconds, which meant that systemd would wait for 90 seconds for a service to start before giving up. I decided to reduce this timeout to 30 seconds, which would help speed up the boot process.
To make this change, I edited the /etc/systemd/system.conf file and added the following line:
DefaultTimeoutStartSec=30
This tweak helped reduce the boot time by another 5 seconds. The real trick is finding the right balance between boot time and service startup time.
Using systemd-boot
As I continued to optimize my boot process, I discovered that using systemd-boot instead of the traditional GRUB boot loader could provide even faster boot times. systemd-boot is a boot loader that’s specifically designed to work with systemd, and it provides a number of advantages over traditional boot loaders.
To switch to systemd-boot, I followed the instructions on the systemd.io website. The process involved installing the systemd-boot package and configuring it to work with my system. I usually start with the official documentation when trying something new.
Results
After making these tweaks, I was able to reduce my boot time from over 2 minutes to just under 30 seconds. This was a significant improvement, and it’s made a big difference in my daily productivity. I’ve seen this go wrong when people overlook the simple tweaks and try to optimize the wrong things.
Troubleshooting
Of course, optimizing the boot process isn’t always straightforward, and there are a number of potential pitfalls to watch out for. One common issue is that some services may not start properly if the boot process is too fast. To troubleshoot this, I used the systemd-analyze command to identify which services were failing to start, and then adjusted the DefaultTimeoutStartSec setting accordingly.
For more information on optimizing the boot process, I recommend checking out the freedesktop.org website, which provides a wealth of information on systemd and other Linux technologies.
See also
- Troubleshooting Slow DNS Lookups with systemd-resolved on My Linux Homelab Server
- Taming the Journalctl Noise: How I Stopped Wasting Time on Useless systemd Logs
- Taming Disk Usage with btrfs Snapshots and Automatic Pruning on My Homelab Server
- Taming tmux: How I Replaced My Desktop's Taskbar with a Custom Terminal Layout
- Taming the initramfs: How I Solved My Linux Boot Hangs with Dracut Debugging