1

I have a big problem with a partition that is encrypted with luks/dm-crypt. I recognized that some files were not readable any more. I rebooted and the partition was not mountable. As far as I remember there was a non-encrypted partition and behind that the luks/dm-crypt partition (formatted) with ext4 on that harddisk. There was no operating system installed on that harddisk. I was not doing any critical stuff, just working normally, surfing the web etc.

In the gnome-disks utility it shows only "free space" and under "partitioning: unknown (PMBR)". Parted says "Unknown partition table ". fdisk finds a partition: /dev/sdj1 1 4294967295 4294967295 16T ee GPT" which is obviously wrong.

The hard disk is a ST3000DM 001-1CH166 (CC27)

I'm using arch-linux and didn't boot windows for some time.

I now removed the harddisk from the computer and put it into an external usb case, still the same. I am now doing a copy of the harddisk with dd to play around with the image.

What could have possibly gone wrong? Is there a way to recover the data on the encrypted partition?

Update: Luckily I was able to mount the image created with dd:

  • sudo losetup -Pf data.img

  • sudo cryptsetup luksOpen /dev/loop0p1 image

  • sudo mount /dev/mapper/image /mnt

With that I am able to access all the data.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.