Page 1 of 1

dd'ed wrong disk (same old story)

Posted: 26 Mar 2015, 17:16
by aleritty
Hello!

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.

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

Posted: 26 Mar 2015, 19:40
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.

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

Posted: 26 Mar 2015, 20:04
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!