Recover ext4 partition after luksFormat

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
Locked
Message
Author
evillegas
Posts: 2
Joined: 07 Jul 2015, 03:32

Recover ext4 partition after luksFormat

#1 Post by evillegas »

While installing a linux distro (Antergos) I accidentally formatted an ext4 data partition (850Gb in sda6) as a LUKS container with luksFormat.

I haven't found any info on how to revert this command or how to recover a partition which underwent this change.

Testdisk shows some deleted partitions in sda but can't recover it: «Can't open filesystem. Filesystem seems damaged».

Any ideas?

User avatar
Fiona
Posts: 2835
Joined: 18 Feb 2012, 17:19
Location: Ludwigsburg/Stuttgart - Germany

Re: Recover ext4 partition after luksFormat

#2 Post by Fiona »

Did you run a complete Deeper Search?
Can you copy and paste the content of your testdisk.log into your next post?

Fiona

evillegas
Posts: 2
Joined: 07 Jul 2015, 03:32

Re: Recover ext4 partition after luksFormat

#3 Post by evillegas »

Thanks for your prompt reply. I had previously done the Deeper search twice, but found no recoverable partition. I did it today just to attach the log file. I have as well a filesystem partition backup:

#1433303942 Disk /dev/sda - 1000 GB / 931 GiB - CHS 121601 255 63
1 : start= 2048, size= 921600, Id=00, P
2 : start= 923648, size= 532480, Id=00, P
3 : start= 1456128, size= 262144, Id=00, P
4 : start= 1718272, size=163130818, Id=00, P
5 : start=164849664, size= 716800, Id=00, P
6 : start=165566464, size=1766434816, Id=00, P
7 : start=1932001280, size= 21522432, Id=00, P

This backup was before trying to recover the partition: I undeleted/marked as P the partition I thought was ext4, and wrote it to the disk. I had to revert to the backup.

testdisk.log en http://pastebin.com/d2EhpSQK

Locked