How do I decrease my boot time [Ubuntu 20.04] [duplicate]

Solution 1:

I am using a NVMe SSD to boot. And have 20.04 Kubuntu installed. I also change grub to 3 sec delay from default of 10 sec, just to have time to press a key if needed.

fred@z170-focal-k:~$ systemd-analyze
Startup finished in 2.667s (kernel) + 5.167s (userspace) = 7.834s 
graphical.target reached after 5.155s in userspace

Turned off NetworkManager-wait with systemctl:

systemctl disable NetworkManager-wait-online.service

https://forums.linuxmint.com/viewtopic.php?t=282437

Changed from quiet splash to noplymouth, will see boot process rather than Ubuntu logo. Sometimes you then can see what process is hanging system, also. Even though not using raid nor encryption, installing drivers supposedly helps.

sed -i '/GRUB_TIMEOUT=/ s/10/3/' /etc/default/grub
sed -i '/GRUB_CMDLINE_LINUX_DEFAULT/ s/"quiet splash"/"noplymouth"/' /etc/default/grub
sudo update-grub
sudo apt install libblockdev-crypto2 libblockdev-mdraid2, 

turned off printer when rebooting,

removed all snaps, prefer .debs for most apps

sudo apt autoremove --purge snapd

If UEFI firmware update not supported (yet) and no thunderbolt, one of my systems also does not have bluetooth, so I also uninstall that on that system only

sudo apt-get purge fwupd
systemctl status bolt
boltctl list
systemctl mask bolt.service
sudo apt-get autoremove blueman bluez-utils bluez bluetooth 

Many with slow boot issues have reinstalled an have a reference in fstab to a bad UUID. Best to confirm all UUIDs are correct.

lsblk -o name,fstype,size,label,mountpoint,uuid | egrep -v "^loop"
cat /etc/fstab

Only if swap partition & reformatted this could be wrong UUID.

 cat /etc/initramfs-tools/conf.d/resume

Be sure to mount partitions with noatime.

UUID=54029c4f-0cbe-413e-80ce-78a4995b0551 /   ext4 noatime,errors=remount-ro  0  1

More details:

slow boot boot 19.10 (tried almost everything)

What does NetworkManager-wait-online.service do?

Ubuntu 16.04 slow boot (apt-daily.service)

How to remove fwupd.service from boot?

Do I really need apt-daily.service and apt-daily-upgrade.service?

https://ubuntuforums.org/showthread.php?t=2436900&p=13932499#post13932499

Ubuntu 15.04 network manager causing slow boot