Booting Gentoo with LUKS+LVM2+systemd

I've spent quite some time recently trying to get a laptop running
Gentoo boot from an encrypted partition with LVM. I thought that this
might be useful for someone else, so here you are: First things first:
I'm assuming you've followed Gentoo handbook and are operating from
within livecd's shell. You've done the regular luksFormat + lvm stuff
and you've come up with a layout similar to this one:

If you're using gentoo-sources you'd notice the fancy gentoo-specific menu on top. Go there and check
systemd. Apart from the usual stuff, please make sure to check stuff on
this list, and also this one:

You're using initrd to set everything up for the kernel, so you need real_root and real_init instead of
regular ones. cryptdevice no longer works, use crypt_root And
dolvm is essential, without it only the first part will work, leaving
you with open crypt container and kernel panic just afterwards. Also
notice GRUB_DEVICE, GRUB_CRYPTODISK_ENABLE and GRUB_PRELOAD_MODULES. Make sure the first partition on the disk you're
installing grub onto is starting at 2048. If it's any earlier grub just
won't be able to fit its magic in there. Finally, install grub

That should be sufficient to boot the system and initialize root. What
about those other encrypted partitions like /home though ? Well, init
subsystem needs to initialize them, OpenRC did such by reading
/etc/fstab and then /etc/dmcrypt/dmcrypt.conf accordingly. Systemd is a
bit different here. You still need your /etc/fstab entries for it to
know which partitions need to be initialized. The place where you say
how to map and decrypt crypto containers, however, is in /etc/crypttab.

The keyfile is available from then already decrypted root partition. You can also skip the key and the
you'll get a password prompt, sometimes hidden somewhere in systemd messages. Hit enter to reveal it once more.