I found a similar question here but it's only partially connected with my question. Currently I have one primary /boot partition and a single LVG1 group with 2 logical encrypted volumes - LV1 and LV2. LV1 is being mounted as /, and LV2 is being mounted as swap.
Everything works great, grub boots the kernel and I'm being asked for a password. After entering right password rest of the system boots properly. However as you may guess I have a quite long password and I need to enter this password twice for / and swap (LV1 & LV2). In general I'd like to enter such password only once because if I successfully decrypted / then there's no point of having seperate password just for swap partition. Is this possible with current setup? I'm looking for some kind of a script or a solution to somehow check if previous LVM volume has been decrypted successfully and if it did then try to decrypt next volume with the same password and if it fails ask for new one. I've been searching for at least an hour using different sites without success and I'm not even sure if it's possible with only a ramdisk, kernel and unencrypted /boot partition.
Thanks.