Ubuntu Desktop 17.04 64-bit with encrypted home, slow boot
Got it, it's a Ubiquity problem with encrypted home option: system hangs because of ecryptfs-setup-swap not working with swapfiles !
I set up Ubuntu with encrypted Home like i always do, with the fix as described in the link boot went from ~200 seconds down to ~30 seconds, this is on a hdd.
Edit: the problem is when installing Ubuntu with encrypted home, 17.04 creates a swapfile instead of a swap partition like previous versions, then the installer writes a faulty config file.
Quote, from the Original Bug Report:
In particular, ecryptfs-setup-swap puts in /etc/crypttab a line like this:
cryptswap1 UID=XXXXXXXX /dev/urandom swap,offset=1024,cipher=aes-xts-plain64
(like there were a swap partition with UID=XXXXXXXX) while with a swapfile it should put the following line:
cryptswap1 /swapfile /dev/urandom swap,offset=1024,cipher=aes-xts-plain64
If you manually change that line and reboot, you get rid of the problem - before rebooting, check also that your /etc/fstab file ends with:
#/swapfile none swap sw 0 0 /dev/mapper/cryptswap1 none swap sw 0 0
Because of this error Ubuntu spends a long time waiting for the swap.
fixed systemd-analyze blame
fixed systemd-analyze plot