dd'ed wrong disk (same old story)

Using TestDisk to repair the filesystem
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
Posts: 2
Joined: 26 Mar 2015, 16:58

dd'ed wrong disk (same old story)

#1 Post by aleritty »


I'm at first post here, so please forgive me if this is the wrong section.

Yesterday I was juggling with 3 disks (don't do this when using dd!), so i got confused and instead of dd from my HD to my USB key I started to overwrite the HD with an ISO image.

I stopped the copy after approx. 1GB was written.

The disk is an 1TB Toshiba USB3, formatted in ext3 (MBR, not GPT) and it was quite full.

I want to recover the remaining 999GB that are untouched.

I'm cloning with ddrescue (bs 4K, because testdisk told me that the bs is 4096, is this right?)

The resulting file is REALLY too small, only 19GB

I also tried to analyse directly the disk with testdisk, but after a deep scan it found one linux partition (with the correct disk label!) one FAT partition (maybe from the iso) and A LOT of "corrupted" (no file if I enter that) linux partitons.

Photorec can recover everything (except that first GB of course) but I think that recovering the partition with testdisk maybe can do better and faster.

Can you help me troubleshoot this?

Thank you everyone in advance.

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

Re: dd'ed wrong disk (same old story)

#2 Post by cgrenier »

Using TestDisk, rewrite the partition table with your ext3 partition.
After a reboot, run testdisk, Advanced, select the partition and choose SuperBlock.
Use the parameters if find with fsck.ext3 to try to repair the filesystem.

Posts: 2
Joined: 26 Mar 2015, 16:58

Re: dd'ed wrong disk (same old story)

#3 Post by aleritty »

Ok, thank you.

I'll wait the backup image to complete and I try to write the partition table.

I was thinking about similar solution, but didn't want to get things worse!