Accidental dd on LUKS ext4 partition

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
Posts: 1
Joined: 03 Nov 2013, 22:37

Accidental dd on LUKS ext4 partition

#1 Post by zsoltsandor »


I've got an external HDD which I use as a backup device.
I've downlaoded Ubuntu GNOME iso to install it later. I wanted to dd it to a pendrive, but accidentally I've started the dd onto the external HDD. I aborted it as soon as possible, only a few MBs have been written on the device.
But it is borked now.
It had a LUKS-encrypted ext4 partition.
What should I do to recover it? TestDisk analyse gives me the exact name of the lost partiton, whic I assume is a good start.
What next?
I'm pretty scared right now.
User avatar
Site Admin
Posts: 5435
Joined: 18 Feb 2012, 15:08
Location: Le Perreux Sur Marne, France

Re: Accidental dd on LUKS ext4 partition

#2 Post by cgrenier »

Prior to use an LUKS encrypted partition, did you had a partition using the same disk space with the same label ?
It's probably this partition that TestDisk detects.