
If you’re using Ubuntu on an SSD, you might notice that the boot time is longer than expected. Fortunately, there are several ways to optimize your system and decrease the boot time. This article will guide you through the process step by step.
To decrease Ubuntu boot time on an SSD, you can disable the NetworkManager-wait-online.service, replace snap apps with regular apps, check for misaligned partitions, optimize systemd-backlight@backlight:intel_backlight.service, and explore other optimizations mentioned in the guide provided. Remember to monitor boot time after each change and take a backup before making any system changes.
Disabling NetworkManager-wait-online.service
The NetworkManager-wait-online.service is a service that waits for the network to come online before proceeding with the boot process. If you don’t rely on network resources during boot, you can disable this service.
To disable the service, open a terminal and run the following command:
sudo systemctl disable NetworkManager-wait-online.service
The systemctl
command is used to control the systemd system and service manager. The disable
parameter is used to disable a service, which in this case is the NetworkManager-wait-online.service.
If the service reappears after reboot, you can mask it with:
sudo systemctl mask NetworkManager-wait-online.service
The mask
parameter links the service to /dev/null
, effectively disabling the service and preventing it from starting.
To roll back the changes, use:
sudo systemctl unmask NetworkManager-wait-online.service
sudo systemctl enable NetworkManager-wait-online.service
The unmask
parameter removes the link to /dev/null
, and the enable
parameter enables the service.
Replacing Snap Apps with Regular Apps
Snap apps are a type of package system in Ubuntu. They can increase boot time because they are loaded at boot. Consider replacing them with regular apps.
You can uninstall snap apps using the following command:
sudo snap remove <snap-app-name>
Replace <snap-app-name>
with the name of the snap app you want to remove.
Checking for Misaligned Partitions
Misaligned partitions can affect boot time. You can check for misaligned partitions by running the following command:
sudo fdisk -l
The fdisk
command is used to manipulate disk partition table, while the -l
parameter lists the partition tables for the specified devices and then exits. If you find any misaligned partitions, you may need to realign them using appropriate tools.
Optimizing systemd-backlight@backlight:intel_backlight.service
There seems to be a bug with the systemd-backlight@backlight:intel_backlight.service causing a delay. You can check the bug report here and follow any suggested solutions or workarounds.
Other Optimizations
There are other ways to decrease boot time on Ubuntu. You can explore other optimizations mentioned in this guide for additional ways to decrease boot time.
Remember to monitor the boot time after each change to identify the impact and determine if further optimizations are needed. You can use the systemd-analyze
command to analyze and diagnose system boot-up performance.
By following these steps, you should be able to decrease the boot time on Ubuntu running on an SSD. Always remember to take a backup before making any changes to your system.
You can check if you’re using an SSD by running the following command in the terminal: lsblk -d -o name,rota
. If the output shows 0
under the ROTA
column for your disk, it means you’re using an SSD.
It is not recommended to disable NetworkManager-wait-online.service if you rely on network resources during boot. This service ensures that the network is online before proceeding with the boot process. Disabling it may cause issues with network connectivity during boot.
To identify misaligned partitions, you can use the parted
command in the terminal. Run sudo parted /dev/sdX align-check optimal Y
(replace /dev/sdX
with the appropriate device name, and Y
with the partition number). If the output shows that the partition is not aligned to the optimal alignment, it is misaligned.
To realign misaligned partitions, you can use the parted
command in the terminal. Run sudo parted /dev/sdX align-check optimal Y
(replace /dev/sdX
with the appropriate device name, and Y
with the partition number). If the partition is misaligned, you can use the resizepart
command to resize it and align it to the optimal alignment.
Yes, you can revert the changes made to NetworkManager-wait-online.service by running the following commands in the terminal:
sudo systemctl unmask NetworkManager-wait-online.service
sudo systemctl enable NetworkManager-wait-online.service
This will undo the masking and enable the service again.
You can use the systemd-analyze
command in the terminal to monitor the boot time after making changes. Run systemd-analyze time
to get the overall boot time, and systemd-analyze blame
to see a detailed breakdown of the time taken by each service during boot.