Fresh install of Ubuntu 22.04.2 LTS to a LUKS partition. When I boot, it never prompts me for my LUKS password, fails to load the system, and instead puts me at a command prompt. If I type
cryptsetup open /dev/nvme0n1p6 nvme0n1p6_crypt
at this prompt, and enter my password, and then exit, the system will then successfully boot. So LUKS is set up properly except that it's not prompting me for the password, making me do that manually.
I set up my system based on this tutorial. In brief, /dev/nvme0n1p6 is a LUKS partition that should map to /dev/mapper/nvme0n1p6_crypt which corresponds to a volume group called "treehouse-vg" which contains treehouse--vg-swap_1 (a swap partition) and treehouse--vg-root (mounted to /).
lsblk output for device nvme0n1:
nvme0n1
│ 259:0 0 476.9G 0 disk
├─nvme0n1p1
│ 259:1 0 100M 0 part /boot/efi
├─nvme0n1p2
│ 259:2 0 16M 0 part
├─nvme0n1p3
│ 259:3 0 166.5G 0 part
├─nvme0n1p4
│ 259:4 0 900M 0 part
├─nvme0n1p5
│ 259:5 0 1000M 0 part /boot
└─nvme0n1p6
259:6 0 308.5G 0 part
└─nvme0n1p6_crypt
253:0 0 308.5G 0 crypt
├─treehouse--vg-swap_1
│ 253:1 0 32G 0 lvm [SWAP]
└─treehouse--vg-root
253:2 0 276.5G 0 lvm /var/snap/firefox/common/host-hunspell
/
Contents of /etc/crypttab:
nvme0n1p6_crypt UUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX none luks,discard
(UUID is the UUID output of blkid /dev/nvme0n1p6)
However, after editing crypttab, when I try
$ sudo update-initramfs -k all -c
update-initramfs: Generating /boot/initrd.img-5.19.0-32-generic
cryptsetup: WARNING: target 'nvme0n1p6_crypt' not found in /etc/crypttab
I: The initramfs will attempt to resume from /dev/dm-1
I: (/dev/mapper/treehouse--vg-swap_1)
I: Set the RESUME variable to override this.
update-initramfs: Generating /boot/initrd.img-5.19.0-46-generic
cryptsetup: WARNING: target 'nvme0n1p6_crypt' not found in /etc/crypttab
I: The initramfs will attempt to resume from /dev/dm-1
I: (/dev/mapper/treehouse--vg-swap_1)
I: Set the RESUME variable to override this.
So something may be wrong there but I can't figure out what. Why is it giving me a warning that "nvme0n1p6_crypt" is not found in crypttab, when it's exactly what I typed into crypttab?
Here is my /etc/fstab (which I haven't touched):
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/mapper/treehouse--vg-root / ext4 errors=remount-ro 0 1
# /boot was on /dev/nvme0n1p5 during installation
UUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX /boot ext4 defaults 0 2
# /boot/efi was on /dev/nvme0n1p1 during installation
UUID=XXXX-XXXX /boot/efi vfat umask=0077 0 1
/dev/mapper/treehouse--vg-swap_1 none swap sw 0 0
In case it's helpful, here are the error messages I get when I boot, and what I do to continue the boot: