I'm trying to install Gentoo on LVM logical volume inside LUKS container encrypted with key file encrypted by GPG with passphrase. Everything was going smoothly until I tried to boot. I'm building the kernel and initramfs with genkernel:genkernel --lvm --luks --install --menuconfig --busybox all   and booting it with GRUB2. So after I start the kernel I get the information that my key file gets found, but in the next line I get Failed to open LUKS device... and than comes a kernel panic. Any idea what to do?Kernel config - http://pastebin.com/YR7TfaVmGRUB2 menuentry:menuentry 'Gentoo'{root='hd1,gpt1'linux /kernel-genkernel-x86_64-3.17.7-gentoo initrd=/dev/ram0 crypt_root=/dev/disk/by-partuuid/PARTUUID_OF_LUKS_CONTAINTER_PARTION dolvm real_root=/dev/mapper/vg1-root rootfstype=ext4 real_init=/usr/lib/systemd/systemd root_keydev=/dev/disk/by-partuuid/PARTUUID_OF_MY_PENDRIVE_WITH_KEY root_key=luks-key.gpginitrd /initramfs-genkernel-x86_64-3.17.7-gentooecho initing...}
Booting Gentoo on LVM inside LUKS with gpg encrypted keyfile
lvm;gentoo;luks;initramfs
My problem got solved after changing kernel version to 3.10 and changing gpg version to an old one, that wasn't requiring pinentry to work and that i compiled statically. Although with new version i checked everything twice there always seemed to be an problem with pinentry. Also I think that genkernel wasn't including pinentry automatically. I had to include it myself.So to summarize:check if your gpg version requires pinentry (I my case I reverted to an older version to make the initrd)consider more stable kernel versionconsider compiling gpg staticallycheck all library dependents  after generating initrd even if you used something like genkernel