I have a laptop with a 250GB SSD and dual boot Windows 10 and Lubuntu.
Windows takes less than a minute to boot, but Lubuntu takes more than three.
I tried finding the reason why, though systemd-analyze blame says that the service taking more time to load takes only 6 seconds.
systemd-analyze blame 5.920s NetworkManager-wait-online.service 911ms dev-sda5.device 409ms snap-repair.service 266ms systemd-resolved.service 228ms networking.service 208ms keyboard-setup.service 182ms apparmor.service 147ms upower.service 138ms systemd-tmpfiles-setup-dev.service 133ms systemd-timesyncd.service 129ms accounts-daemon.service 126ms snapd.service 114ms lightdm.service 110ms plymouth-quit-wait.service 108ms NetworkManager.service 92ms ModemManager.service 79ms grub-common.service 77ms preload.service ...Although it takes more than 3 minutes to boot:
systemd-analyze time
Startup finished in 8.659s (kernel) + 3min 636ms (userspace) = 3min 9.295sThis is the systemd-analyze plot graph, it shows a huge gap, but it doesn't show any process taking a lot of time.
How can I find out what's causing the system to take so long to boot and how can I improve it?
(this is systemd-analyze critical-chain)
graphical.target @1min 36.454s
└─multi-user.target @1min 36.454s └─whoopsie.service @1min 36.453s └─network-online.target @1min 36.453s └─NetworkManager-wait-online.service @1min 30.532s +5.920s └─NetworkManager.service @1min 30.423s +108ms └─dbus.service @1min 30.404s └─basic.target @1min 30.390s └─sockets.target @1min 30.390s └─snapd.socket @1min 30.389s +1ms └─sysinit.target @1min 30.387s └─systemd-timesyncd.service @517ms +133ms └─systemd-tmpfiles-setup.service @421ms +69ms └─systemd-journal-flush.service @404ms +14ms └─systemd-remount-fs.service @376ms +20ms └─system.slice @164ms └─-.slice @146msEdit: Using dmesg It's clear that the boot up sequence gets until crng init done. Solution posted below
1 Answer
Disabling swap fixed the problem.
Comment out the swap line in /etc/fstab and /etc/crypttab and reboot.