Problem

After installing Debian GNU/Linux on the computer using encrypted LVM, the system could not boot and dropped to the initramfs shell.

Disk Layout

Main drive has a GUID Partition Table. /dev/sda1 is the biosgrub partition, /dev/sda2 is the partition for /boot and /dev/sda3 is the LUKS physical partition.

Using /dev/sda3 a LVM volume group was created. The volume group contains two volumes, one for the swap, the other is used for /.

Solution

1.Boot into a Debian Live CD.

2.Enter the terminal and mount all the partitions. Don’t forget to mount /dev, /proc, and /sys.

3.Chroot into the root partition and edit /etc/cryptsetup-initramfs/conf-hook:

 # nano /etc/cryptsetup-initramfs/conf-hook

Add a line CRYPTSETUP=y.

4.Regenerate the initramfs:

 # update-initramfs -u

5.Exit chroot and reboot. You should boot into the newly installed system.