How to diagnose/fix very slow boot on Ubuntu 18.04

I upgraded to 18.04 today and encountered the same issue. I was able to fix it by booting the kernel with the noresume parameter.

Like you, I also have no swap space. At some point during the upgrade, the initramfs config was modified, adding a line pointing to a nonexistent swap partition. The slow boot was because it was looking for this partition and then timing out after 30 seconds.

To update GRUB so that it passes this option to the kernel automatically on boot:

  1. Edit the file /etc/default/grub file so that the string noresume is included in the GRUB_CMDLINE_LINUX_DEFAULT line, for example:

    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash noresume"
    
  2. Run this command to update GRUB:

    sudo update-grub
    
  3. Reboot the computer


$ systemd-analyze blame

Look to see which processes are taking the most time of the boot process.


What worked for me was to run sudo rm /etc/initramfs-tools/conf.d/resume followed by sudo update-initramfs -u . This seems to be a regression from an upgrade (see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=861151).

Tags:

Boot

18.04