Recover external drive from dd

Please urgent help guys.

By my mistake i used dd in terminal for eos linux in my external hard drive.

Is there any way to recover the files from inside or at least some tip to fix this ?
urgent
urgent2

I doubt it (but not a recovery expert)

One thing before you’ll get more qualified help - do not turn off your pc, if there is a chance to restore something you need it will be much higher prior to reboot.

ah im already after reboot. This happened 2 days ago and i was without internet connection. I know that some tools can help on windows but i was looking a linux fix if it’s possible.

If you did truly DD the drive then there is probably no way to recover those after a reboot. You low level formatted the drive. There may be some miracle fix here so wait patiently…
OIP

2 Likes

You can try to boot on a live iso with parted magic

This program is not free, but if you really want to try to rescue something, tell me i’ll give you a free link to download the bootable iso.

It depends what you did with dd specifically. If you overwrote the entire disk with something else, recovery isn’t possible.

If you only overwrote a portion of the disk, then you could try something like testdisk to see what you can recover.

1 Like

I will try with @badplugin reply and if there are no results i will try with testdisk. I used dd on /dev/sda by mistake. If there no results also with testdisk then i will try with some softwares via windows.

What specific dd command did you run against /dev/sda and what filesystem were you using? Also, were you using encryption?

@dalto i used dd if=eos.iso of=/dev/sda from EOS.

OK, so that would only overwrite part of the disk.

What filesystem were you using and was the disk encrypted?

i was on ext4. No the disk was not encrypted

Depending on how much data you had on the disk, it is likely some portion of it is recoverable but it won’t be easy. Depending on how important the data is try testdisk or hire a recovery specialist.

2 Likes

jaja the disk was almost full (4T). Yes i’m just reading some guides regarding testdisk.

honka_animated-128px-36

Likely, you overwrote some of your data, your partition table and the metadata needed to find your files.

However, most of the data itself is probably still on the disk.

Test disc is good but if you try messing with it with multiple programs the only thing you are doing is making it almost impossible to recover. It may be mostly unrecoverable now. I once used test disc to try to recover a usb stick that had 10 years worth of a teachers work on it. Lesson plans and such for all different subjects. Someone else messed with it first and couldn’t recover anything. I used test disc on it and was able to recover a lot of the work but most of the files were corrupted in such a way that some would open and others got partial information when the files were accessed. In the end it was some help with the info that was gleaned but not all 10 years worth was accessible.

What happened was a younger student took the usb disc home and put it in an xbox machine and it destroyed the partition structure and file format. I may have been able to have done more with it if it hadn’t been touched by someone else first.

I can’t even fathom that situation. It is bad enough that someone was keeping 10 years of critical data on a thumb drive. Those things have an absurdly high failure rate.

But lets say you didn’t realize that and found yourself in a tough spot. Why would you give the drive with all your critical data on it to a “younger student”? :confused:

Of course, it goes without saying that the decision to use an xbox as a recovery platform is also questionable but if the person involved was a child, we can probably give them a pass on that one.

2 Likes

Very diplomatic of you

honka_animated-128px-43

2 Likes

The Teacher had it in the computer using it and left it in and when not looking a student swiped it and took it home. Grade 3 or 4. No the student stuck it in an xbox machine trying to use it to save games on it. They weren’t trying to recover it. The fact is when you put a drive in an xbox it immediately want’s to format it to the way it uses it on the xbox platform. So it destroyed the file system. Then the principal thought they would be helpful and got a program to try and recover it. I ended up trying it with test disc after their failed attempt. I recovered most of the files but as a i say most of the ones that wouldn’t open were smart board files. The others were okay so i was able to recover a lot but not all of it and not the 10 years worth. Smartboard files are a proprietary type and very flaky. They were the ones that were mostly corrupted.

1 Like

Have you imaged the drive yet, OP?