Ubuntu – way to recover files from a storage device partially overwritten with dd

data lossdata-recoveryddfileshard drive

I'm an idiot, I was writing an image to a USB drive using dd when instead of typing /dev/sdb I typed /dev/sdd and wrote the 135mb image to my 750gb External Hardrive full of files. Is there ANY possibility of recovering the files or did dd completely zero out the drive? Please help, as this is one of the lowest points of my life EVER.

dd finished writing the 135mb image in 5 seconds, so I didn't have a chance to stop it. By the time I knew what happened to was too late. The command was as follows:

sudo dd if=generic.img of=/dev/sdd bs=1M

EDIT2: The External Harddrive's filesystem was FAT32(I've had the drive for awhile and FAT32 was the most Universal FS at the time). I also have a 2TB drive I just got which I was planning on moving most of the files to from the 750gb, If needed I can use it to transfer the Recovered files to.

Best Answer

When a drive has been accidentally overwritten you will need Data Recovery Tools to restore the remainders of your data. When this has occured from running dd for a 135 MB image then those parts of your drive are definitely gone and can not be rescued.

By installing

TestDisk Install testdisk

you may be able to recover part of your files. Included in the TestDisk suite you will also find the tool PhotoRec that helps to recover individual files even in the case the partitions can not be restored by testdisk or the drive itself has a hardware defect.

TestDisk/PhotoRec can also be run on an image of your drive (as was also suggested by this answer)

Related Question