External drive corrupted by "badblocks"

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
guidobartoli80
Posts: 1
Joined: 28 Aug 2022, 18:16

External drive corrupted by "badblocks"

#1 Post by guidobartoli80 »

Hello everyone, I wanted to ask your advice on how I can solve a problem with access from Linux to an external drive.

It is a 2 TB drive that has been working normally until today, but then due to a power outage during a copy, some files got corrupted. Naively (and foolishly!) I used the "badblocks" command with the "-w" option to try to fix the problem, but it actually overwritten a small part of the drive with unusable data (I stopped it as soon as I noticed, it was only 0.23%, but enough to do damage :evil: ).

So I launched "testdisk" following the official tutorial:
  1. The "Analyse" command found the primary partition twice as seen in the tutorial.
  2. The "Quick Search" command produced a long list of strange partitions (FAT12, Mac, ...), while only the first one was NTFS, I tried to see the files inside, but got the message: "Can't open filesystem. Filesystem seems damaged."
  3. I still used the command to write the partition table and rebooted everything, the disk is present in the devices (/dev/sdb1), but the partition is of unknown type and is not mounted by the operating system
  4. I ran "testdisk" again (this time the "Analyze" command was very fast) and used the "RebuildFS" function, but nothing changed. :|
The final situation is this:

Code: Select all

Disk /dev/sdb - 2000 GB / 1862 GiB - CHS 243197 255 63
     Partition                  Start        End    Size in sectors
 1 P MS Data                     2048 3906961407 3906959360

Boot sector
Status: OK

Backup boot sector
Status: OK

Sectors are identical.

A valid NTFS Boot sector must be present in order to access
any data; even if the partition is not bootable.
From this, when I try to "List" the files, the message is still "Can't open filesystem. Filesystem seems damaged."

Does anyone have any other suggestions? I know I can use Photorec, but the disk contained so many small files, and even if they were recovered, it would be impossible for me to trace them back to their original names.

Many thanks in advance!

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

Re: External drive corrupted by "badblocks"

#2 Post by recuperation »

guidobartoli80 wrote: 28 Aug 2022, 23:39 Hello everyone, I wanted to ask your advice on how I can solve a problem with access from Linux to an external drive.

It is a 2 TB drive that has been working normally until today, but then due to a power outage during a copy, some files got corrupted. Naively (and foolishly!) I used the "badblocks" command with the "-w" option to try to fix the problem, but it actually overwritten a small part of the drive with unusable data (I stopped it as soon as I noticed, it was only 0.23%, but enough to do damage :evil: ).

So I launched "testdisk" following the official tutorial:
  1. The "Analyse" command found the primary partition twice as seen in the tutorial.
  2. The "Quick Search" command produced a long list of strange partitions (FAT12, Mac, ...), while only the first one was NTFS, I tried to see the files inside, but got the message: "Can't open filesystem. Filesystem seems damaged."
This statement tells you that Testdisk is not able to recover the partition.
ran "testdisk" again (this time the "Analyze" command was very fast) and used the "RebuildFS" function, but nothing changed. :|
If you are referring to "RebuildBS" please write it correctly. I am not aware of a function called "RebuildFS". I searched the whole source code for "RebuildFS" to make sure I am not wrong in my asssumption.
Does anyone have any other suggestions?
Try out some other software.

Locked