Data Rescue(ing) an entire Hard Drive

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
abw101
Posts: 2
Joined: 07 Jan 2021, 20:00

Data Rescue(ing) an entire Hard Drive

#1 Post by abw101 »

I was in Gparted and picked my 1 TB ext4 hard drive by mistake. It was my fully loaded backup drive. I was about to wipe a USB stick. I wrote the partition table as a fat32 over the hard drive's ext4. I know all my data is still on the disk but I have no knowledge as to how to retrieve it in any form. A step by step tutorial must be available?
Any help is always appreciated. Thanks. Linux Mint 20 64bit

recuperation
Posts: 2729
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: Data Rescue(ing) an entire Hard Drive

#2 Post by recuperation »

abw101 wrote: 07 Jan 2021, 20:06 I was in Gparted and picked my 1 TB ext4 hard drive by mistake. It was my fully loaded backup drive. I was about to wipe a USB stick. I wrote the partition table as a fat32 over the hard drive's ext4. I know all my data is still on the disk but I have no knowledge as to how to retrieve it in any form. A step by step tutorial must be available?
Any help is always appreciated. Thanks. Linux Mint 20 64bit
FAT32 is not an information that is written to the partition table. If you speak about "writing FAT32" you were alreading overwriting content of your ext4 file system. Therefore you have to assume that at least a part of your data is overwritten and metadata like file names, folder structures may be lost.

There is documentation in many languages and application examples available on

https://www.cgsecurity.org/wiki/TestDisk

If you fail with Testdisk there is a chance with

https://www.cgsecurity.org/wiki/PhotoRec

at the price of not recovering metadata such as file names and folder structures.

As the Testdisk+Photorec package does not cover all thinkable recovery strategies any (commercial) third party software could help as well.

abw101
Posts: 2
Joined: 07 Jan 2021, 20:00

Re: Data Rescue(ing) an entire Hard Drive

#3 Post by abw101 »

Thanks for the replies. I know little about file structures on Hard Disks. I always thought "create partition table" just over wrote sector 1 but the actual data was still there.

recuperation
Posts: 2729
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: Data Rescue(ing) an entire Hard Drive

#4 Post by recuperation »

"create partition table" has nothing to do with creating a FAT32 file system.
With a GPT table its not just one sector writting for instance.
Depending on the number of partitions involved the MBR scheme spreads around your hard disk.

Locked