Slow boot time (Ubuntu 18.04) on SSD

14,603

Solution 1

I'm going to copy my answer from here, as I believe you might be affected by the same problem I was.

You seem to be affected by this bug: https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1763611

The fix

In order to fix it you have to modify located here: /etc/initramfs-tools/conf.d/resume and ensure the value is as follows: RESUME=none.

Ensure you apply your settings sudo update-initramfs -u

After fix improvements

systemd-analyze time
Startup finished in 2.195s (kernel) + 11.663s (userspace) = 13.858s
graphical.target reached after 11.649s in userspace

Before it was around ~50s

References

This answer is also located on the bug page but it is also located here:

Solution 2

I've seen this manifest on two desktops I manage.

This is a kernel related regression, the launchpad bug is: https://bugs.launchpad.net/ubuntu/+bug/1779827

As a workaround, press keys and/or move the mouse at boot. This will increase the randomness entropy.

Or running the following command to install rng-tools solves the issue for me:

sudo apt install rng-tools

From Arch wiki: The rng-tools is a set of utilities related to random number generation in kernel. This is mainly useful to increase the quantity of entropy in kernel to make /dev/random faster.

Share:
14,603

Related videos on Youtube

Vento
Author by

Vento

Updated on September 18, 2022

Comments

  • Vento
    Vento over 1 year

    I've come back to Ubuntu; I'm on Dual boot (Windows 10/Ubuntu 18.04) on a SSD with no swap partition. I have a problem. While Windows boot time is just a matter of 3-5s, Ubuntu takes 30-40s.

    I've runsystemd-analyze blame and systemd-analyze critical-chain and this is what I got:

    Systemd-analyze blame & critical-chain

    Any idea of what is going on (why these services are taking so much time to run)?

    • Chai T. Rex
      Chai T. Rex almost 6 years
      Please don't use images for terminal output. Instead, copy and paste the output into your question, select it with your mouse, and press the {} button in the editor.
    • Elder Geek
      Elder Geek about 3 years
      I think you may be comparing apples to oranges my friend. Is fast startup enabled in Windows? If so, it's just reading a hibernation file when you start it rather than actually going through the boot process. windowscentral.com/how-disable-windows-10-fast-startup. I have yet to see a version of Ubuntu (since 12.04) that didn't go through a full boot process faster than Windows.
  • Mike
    Mike about 5 years
    I have an m.2 hard drive, and this answer, combined with changing my ethernet interface to allow-hotplug brought my boot time from 45 seconds down to 5.7 seconds.