0

My disk has some problems, perhaps going to die so I bought a new one and backup the LUKS partition from the error disk with UDisk, but the proccess is stuck at 90% for hours, so I have to click stop button, the result is the the backup is 90% as the size as the LUKS partition. Then I boot in to Ubuntu Live USB and fsck.ext4 /dev/LUKS to check and fix all the errors by press y and a. But later I mount the LUKS partition from the error disk with correct password it says incorrect passphrase. If try to mount the backup file by 'Disk Image Mounter', it says wrong fs type, bad option, bad super block, missing codepage or helper program, or other error. This means I have enter the correct passphrase. Yes, do I have chance of rescue data in the LUKS?

5
  • cryptsetup has options to backup and restore the LUKS header. You should have backed it up after creating the encrypted storage device. If not, back it up now from the original disk. Then restore the backup to the new disk. Feb 19, 2021 at 9:53
  • both luks headers from backup and original disk are the same. cryptsetup luksdump has the same output.
    – vitofy
    Feb 20, 2021 at 4:41
  • And you can still decrypt the old disk, but its passphrase doesn't work on the new one? As far as I understand it, only the LUKS header is used when checking the passphrase. What happens if you add a user key to the old disk, take a LUKS header backup, then restore that backup to the new disk? Will the new key not work? Note that you find several questions regarding the LUKS header and its key material on Stackexchange, such as unix.stackexchange.com/questions/383788/… with instructions for inspecting the header. Feb 20, 2021 at 4:54
  • I can't decrypt the old disk now. I have checked the backup.img, hexdump -C -n 132096 '/home/vito/backup.img' | less, no a line between 0x00000->0x01000 is full of zero. so the LUKS have not been damaged?
    – vitofy
    Feb 21, 2021 at 8:45
  • GNOME Disks is a graphical front-end for udisks included in the "gnome-disk-utility". GNOME Disks can unlock my LUKS layer of backup.img with correct password, the error occurred in the second click to mount ext4 on top of LUKS . The fact is the ext4 filesystem get corrupted?
    – vitofy
    Feb 21, 2021 at 12:05

0

You must log in to answer this question.

Browse other questions tagged .