You are not logged in.
I was using 'dd' to write the arch installation image to a usb drive, but I used /dev/sdc instead of /dev/sdb by mistake. sdc was a connected external hard disk, which got totally overwritten! I lost gigs of important stuff! Does anyone know of any way to undo this? Any help will be deeply appreciated. Thanks.
Offline
I guess, there is no way to do so. You'd need a undo button for you life
Offline
http://www.gnu.org/software/ddrescue/ddrescue.html
Google for "disc recovery" or "file recovery".
Offline
dd is an abbreviation for "Destroy Disk".
I don't think you'll get that data back.
Sorry.
Offline
I very, very highly doubt you will be able to get back the first 700MiB (or whatever the size of the image you dd'ed) of that drive.
It MAY be possible to get back the rest. I wish you the best of luck in doing so!
Offline
I did the same thing two years ago, on a 500gb drive filled with music/movies and irreplaceable photos. I noticed it after a only a few seconds, still I got nothing back.
Offline
Well, ddrescue isn't working. It's just recovering the contents of the arch image I (mistakenly) wrote. That's only 103 MB. I don't care if I lose the first 103 MB! I had around 140 gigs on that drive.
Offline
Like others said, it may be possible to get back some stuff past the data that you wrote, but it will probably be difficult. Hopefully, you'll keep backups of important stuff from now on!
Offline
I feel for you mate, horrible thing to happen. I lost 60gig of music doing something similar to you, I could have cried!
I've used recuva before and that worked great although it is windows only, wont get back what you overwrit? with arch image but possible the rest.
It gets easier
Offline
Well, ddrescue isn't working. It's just recovering the contents of the arch image I (mistakenly) wrote. That's only 103 MB. I don't care if I lose the first 103 MB! I had around 140 gigs on that drive.
ddrescue won't help, it's just tweaked dd used when you have damaged cd drive, or your dvd disk is scratched, etc.
Did you had any partitions on that drive? If yes, then only first one (if it was bigger than 103MB) is damaged.
Anyway, try with testdisk, i'm sure you will be able to recover some stuff from that drive (i've successful recovered files from formatted ntfs partition using it). If you have enought space on other drives do dd if=/dev/damaged of=backup.img and use testdisk on backup.img. Don't write anything on /dev/damaged.
extra/testdisk 6.11.3-3 [2,38 MB]
Checks and undeletes partitions + PhotoRec, signature based recovery tool
Last edited by hiciu (2010-08-11 16:13:18)
Offline
ddrescue will just clone the drive. It is useful when doing computer forensics so that you do your work on a image of the drive rather than the drive itself.
Anything overwritten will not really be recoverable. But like has been said, that will only be a jumpdrive sized amount of your data. The important thing is to not keep using that partition because if you keep writing to that partition, you will keep writing over data you probably want to try to save. Which is one reason forensics is usually done on an image rather than the drive itself. That way there is always a clean copy to work on in case it gets written to or something bad happens.
That said, testdisk's photorec will probably allow you to scrape some of the data out. I believe it is classified as a data carver. I have used it before to recover stuff deleted from jump drives accidentally. It will search through the partition and look for headers of files and pull out the files. I dont think it will preserve the file names and folders and so forth, so you will have to go through what it pulls and figure out what is what.
Another tool I played with once is SleuthKit/Autopsy. I know some livecds come with that on it, such as Backtrack. Its a little harder to use than photorec but capable of a little more.
Nai haryuvalyë melwa rë
Offline
testdisk is analyzing the drive as I type. Keeping my fingers crossed.
Offline
So... the disk had two partitions on it, and (as hicui noted) only the first one was damaged. The good news is that I was able to undelete the entire second partition with testdisk. No damage was done to it whatsoever. testdisk preserved my file names, directory structure - worked like magic! The bad news is that all the important data was on the first partition. Looking into it now.
Last edited by atriya (2010-08-11 17:17:26)
Offline
MAGIC! I did the deep search for lost partitions with testdisk and it detected my damaged first partition from a 'backup boot sector' (or so it said), and recovered it! Of course, the parts that were overwritten by the 103MB will be damaged, but now I can browse the files, and most of them are fine! Now, the disk was pretty fragmented, so many files could have corrupted bits. But still, I never expected that I would recover so much! Yay!
Offline
Congratulations :-)
Back it up -- now!
Remember, it isn't really backed up unless there are 2 copies, one of which is off-site.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
dd is an abbreviation for "Destroy Disk".
I don't think you'll get that data back.
Sorry.
According to Wikipedia, dd is an abbreviation for "Data Description."
Though it has been jokingly called "Disk Destroyer" because of what happens when you use "dd on the wrong drive."
Offline
What about testdisk? It worked well for its purpose when I used it.
Offline
What about testdisk? It worked well for its purpose when I used it.
I think if you read the thread you will notice that the op did use testdisk
https://bbs.archlinux.org/viewtopic.php … 82#p807382
also atriya, please mark your thread as solved so it may be of use to others as well.
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline