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.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.