[dm-crypt] Restore a LUKS partition
liox at elso.mine.nu
Thu Nov 21 02:25:16 CET 2013
I created a luks partition for a long time with Ubuntu 10.04. Most
likely I used following command to create it.
# cryptsetup -c blowfish-cbc-essiv:sha256 -y -s 256 luksFormat /dev/sda6
In the meantime I changed the distro to Linux Mint 13.
Now I tried to open it, but I get an error. Also if I try to dump the
$ sudo cryptsetup luksDump -vc blowfish-cbc-essiv:sha256 /dev/sda6
Device /dev/sda6 is not a valid LUKS device.
Command failed with code 22: Device /dev/sda6 is not a valid LUKS device.
I was not sure if the drive is a LUKS device at all and I have read in
another forum I should search for LUKS, what I did.
$ sudo dd if=/dev/sda6 | grep -a -b LUKS
So indeed it seems a LUKS device, but the header is somehow corrupt.
Now I tried to make a plain mapping what unexpected really works. But
the joy was short. I can not mount the mapped device.
$ sudo cryptsetup create -c blowfish-cbc-essiv:sha256 -s 256 crypt /dev/sda6
$ sudo mount /dev/mapper/crypt /home/crypt/
mount: you must specify the filesystem type
$ sudo mount -t ext3 /dev/mapper/crypt /home/crypt/
mount: wrong fs type, bad option, bad superblock on /dev/mapper/crypt,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
Now my question. Is there a little hope to restore the LUKS header or at
least to read the content of this partition somehow?
Thanks for your help
More information about the dm-crypt