Hi,
I need help to recover a LUKS partition.
It would be great if someone could give me some advice.
I have already posted in the ubuntu forums in december-2016, but nobody answered:
https://ubuntuforums.org/showthread.php ... st13581732
This is a disk I use for important data.
I have a backup, but I lost some data from the date of the last backup I've made and I would like to get it back.
So, here's what happened.
Initially, I was using Debian 7 and at that time I've formated the disk like this:
parted /dev/sdx
mklabel gpt
unit s
mkpart primary ext3 2048s -1
cryptsetup luksFormat --cipher aes-cbc-essiv:sha256 --verify-passphrase --key-size 256 /dev/sdx
cryptsetup luksOpen /dev/sdx sdx_crypt
mkfs.ext3 /dev/mapper/sdx_crypt
Copied data to it and used it for many months without problems.
Life was perfect up to this point.
Then, I changed from Debian 7 to Debian 8, doing a clean install.
I mention this because it may be relevant, as the versions of many programs may have changed, like cryptsetup, parted, etc, and also because I may have made some mistakes on my old or new Debian instalation that led to this situation.
One day, I connected the disk to my new Debian 8 system and tried mounting and it gave me an error and didn't mount anymore.
When I tried with terminal, is said "either superblock or partition table is corrupt".
When I tried to mount it with the Gnome-Disk-Utility, I got this error:
"Error mounting /dev/dm-6 at /media/user1/3PAB:
Command-line `mount -t "ext3" -o "uhelper=udisks2,nodev,nosuid" "/dev/dm-6" "/media/user1/3PAB"' exited with non-zero exit status 32:
mount: wrong fs type, bad option, bad superblock on /dev/mapper/luks-c4ebeef5-7537-417e-b63b-fedc99561677, missing codepage or helper program, or other error
So, instead of making a clone with DD to another disk, I did one thing that I shouldn't have done:
I created a new partition table equal to the one before, as you can see in the above:
parted /dev/sdx
mklabel gpt
unit s
mkpart primary ext3 2048s -1
(and stopped here)
I did that hoping it would solve my problem, because in the past it had worked in similar situations
But this time, it didn't work
Then, afraid of making more mistakes, I made a clone using DD to another disk of the same make and model
And now I would like somebody to give me some advice or tell me I should give up on this
I also would like to mention that I had other disks with different data on them and they also stopped mounting in this Debian 8 install
But the I went and booted with a clone of my Debian 7 installation I had from a year ago and I could mount them
Bad luck I didn't think of that before making a new partition disk to this disk
At this point, I believe that all my luks encrypted data is still on the disk, because the new partition table start in the same 2048 sector
But I'm not sure if I can recover it or not
So, I'd appreciate if you could share your thoughts on this
Please do that, even if you think it may be a long shot or even if you are unsure but have some hint you could share