FULL AI ANALYSIS

Ubuntu drops to emergency mode after cloning LUKS-root to a new SSD — cryptsetup mapping not found

Generated Oct 3, 2026, 12:35:03 AM

Analysis summary

The failure is occurring during early boot before the updated root filesystem's /etc/crypttab is read; that indicates the initramfs embedded on the target disk still contains references to the original devices/UUIDs or lacks the cryptsetup/udev hooks reflecting the new device layout. Common issues after cloning: stale initramfs with old UUIDs, missing cryptsetup or LVM hooks in initramfs, or /boot/grub pointing to the wrong initramfs image. Chrooting and regenerating initramfs should help, but if steps were applied to the wrong disk, or the system boots a different EFI entry that still references the old initramfs, boot will continue to fail.

Possible causes

Bootloader (GRUB/EFI) entry still points to the old/incorrect initramfs or kernel on a different disk/ESP.

90%

Initramfs image on the cloned disk still contains old device UUIDs and was not regenerated for the new device mapping.

60%

Cryptsetup/LVM hooks omitted from the regenerated initramfs (e.g., missing 'cryptsetup' or 'lvm2' initramfs hooks), so early userspace cannot discover or open encrypted volumes.

20%

The LUKS header was modified or partially overwritten during cloning, causing mismatch between keyslots and device metadata (less likely if clone was bit-for-bit).

5%

Suggested fixes

1

Diagnostic step 1

Boot from a live USB, mount the cloned root and bind /dev /proc /sys, chroot into it and confirm /etc/crypttab and /etc/fstab use the correct UUIDs from 'blkid'.

2

Diagnostic step 2

Inside the chroot, ensure 'cryptsetup' and 'lvm2' packages are installed, then run 'update-initramfs -c -k all' (or '-u') to create fresh initramfs images that include the correct hooks.

3

Diagnostic step 3

Reinstall GRUB to the target disk's EFI partition (e.g., 'grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=ubuntu') and update-grub to ensure EFI entries reference the regenerated initramfs.

4

Diagnostic step 4

Confirm the firmware boots the intended EFI entry; temporarily remove the source drive to guarantee booting the cloned disk during testing.

5

Diagnostic step 5

If LUKS header appears corrupted or unlocking still fails after the above, stop and consider specialist escalation to a data-recovery/cryptography expert before making destructive changes; keep a secure backup of the LUKS header ('cryptsetup luksHeaderBackup') if accessible.