I installed Debian 11 on a new machine. The root filesystem is on an nvme. To copy data over I also had an old ssd in the computer while installing. Both disks were encrypted. Debian install somehow welded the ssd into the system and after removing it, update-initramfs tool returned error, that the ssd was not found and that warned that nvme is not in crypttab.
cryptsetup: WARNING: target 'nvme0n1p3_crypt' not found in /etc/crypttab
cryptsetup: ERROR: Couldn't resolve device /dev/mapper/debianLT--vg-swap_1
The swap partition was in /etc/initramfs-tools/conf.d/resume
so I removed it there and the error disappeared. I also tried to add the UUID and device name of nvme0n1np3_crypt into crypttab but now I get a "source mismatch"
cryptsetup: ERROR: nvme0n1p3_crypt: Source mismatch
My crypttab looks like this
nvme0n1p3_crypt UUID="Preipx-FT3v-3WDs-ZMF6-5W4A-3hOa-zXNt2r" none luks,discard
And my fstab
/dev/mapper/debian--vg-root / ext4 errors=remount-ro 0 1
# /boot was on /dev/nvme0n1p2 during installation
UUID=884b30b1-4235-4acd-9f06-1ff832e97970 /boot ext2 defaults 0 2
# /boot/efi was on /dev/nvme0n1p1 during installation
UUID=C778-5F11 /boot/efi vfat umask=0077 0 1
/dev/mapper/debian--vg-swap_1 none swap sw 0 0
blkid returns:
/dev/nvme0n1p1: UUID="C778-5F11" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="b94b4299-d595-4f59-90eb-0848982907ee"
/dev/nvme0n1p2: UUID="884b30b1-4235-4acd-9f06-1ff832e97970" BLOCK_SIZE="1024" TYPE="ext2" PARTUUID="603666ed-d0e7-487f-9601-9ca8a99fe4c5"
/dev/nvme0n1p3: UUID="fc1cba48-eafe-4be7-a29b-e089d044e9c2" TYPE="crypto_LUKS" PARTUUID="c14adbc7-34fc-45f2-a554-9a1e8746357f"
/dev/mapper/nvme0n1p3_crypt: UUID="Preipx-FT3v-3WDs-ZMF6-5W4A-3hOa-zXNt2r" TYPE="LVM2_member"
/dev/mapper/debian--vg-root: UUID="f781f73f-5da1-4a57-a9b9-f5f5b87cdf5d" BLOCK_SIZE="4096" TYPE="ext4"
/dev/mapper/debian--vg-swap_1: UUID="989b506d-0b87-4802-bc1e-d9be466f122f" TYPE="swap"
The UUID fc1cba48-eafe-4be7-a29b-e089d044e9c2
does not work either:
update-initramfs: Generating /boot/initrd.img-5.10.0-16-amd64
E: /usr/share/initramfs-tools/hooks/fuse failed with return 1.
update-initramfs: failed for /boot/initrd.img-5.10.0-16-amd64 with 1.
So how can I generate a new crypttab with the correct device in it?