Wrote mbr to disk containing luks/ etx4

How to use TestDisk to recover lost partition
Forum rules
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read https://www.cgsecurity.org/testdisk.pdf
Post Reply
Message
Author
saltedpenguin
Posts: 1
Joined: 11 Apr 2020, 00:21

Wrote mbr to disk containing luks/ etx4

#1 Post by saltedpenguin »

One of my old disks had a mbr written to it by accident on a windows 10 machine.
Could you please provide some guidance on how I can recover my original luks/ext4 partition? :?:

Sponsored links

User avatar
cgrenier
Site Admin
Posts: 5305
Joined: 18 Feb 2012, 15:08
Location: Le Perreux Sur Marne, France
Contact:

Re: Wrote mbr to disk containing luks/ etx4

#2 Post by cgrenier »

Did you use the whole device (ie. /dev/sdb) instead of a partition (ie. /dev/sdb1) for LUKS ?

If LUKS was a partition, TestDisk should be able to find where the partition was starting. You have to manually add (''a" key) a LUKS partition beginning where TestDisk has found the beginning of the partition and ending at the end of the disk.

If LUKS was using the whole disk, its main block has been overwritten by the MBR.
If the header of a LUKS volume gets damaged, all data is permanently lost unless you have a header-backup. If a key-slot is damaged, it can only be restored from a
header-backup or if another active key-slot with known passphrase is undamaged. Damaging the LUKS header is something people manage to do with surprising frequency. This risk is
the result of a trade-off between security and safety, as LUKS is designed for fast and secure wiping by just overwriting header and key-slot area.
So do you have a header-backup ?

Post Reply