View previous topic :: View next topic |
Author |
Message |
1clue Advocate
Joined: 05 Feb 2006 Posts: 2569
|
Posted: Fri May 29, 2015 7:42 pm Post subject: dd disaster on top of mounted filesystem. never mind. |
|
|
Hi.
I have a broken system. I was already booted into system rescue cd. I have a failed OCZ Vector 150 hard disk, bought at the beginning of the year. (!!!!)
I downloaded an iso to re-install on another hdd, and downloaded it into a hard disk with backups on it. Sorry I can't show you screenshots or text because I'm on a different computer right now.
Anyway, here's the story:
- /dev/sde is a 16g flash stick.
- /dev/sdf is a 1.5t sata drive with backups on it, /mnt/backups
- I mounted and saved the iso file to /mnt/backups/file.iso
- I used disk destroyer and wrote the iso image to /dev/sdf, which is my backup drive!
- The filesystem is still mounted.
- I made a filesystem on a raid set to copy off data, but it fails on some files with 'cp: cannot stat '...': Structure needs cleaning.
- I seem to be getting much of the data off though.
So the question: Since the drive is still mounted, is there some way to restore the existing junk that was overwritten by the iso?
This is my workstation, it's pretty important since I can't earn money until this gets fixed.
Thanks.
Last edited by 1clue on Fri May 29, 2015 8:13 pm; edited 1 time in total |
|
Back to top |
|
|
frostschutz Advocate
Joined: 22 Feb 2005 Posts: 2977 Location: Germany
|
Posted: Fri May 29, 2015 7:48 pm Post subject: |
|
|
No. But if it's backups, just re-do the backups. |
|
Back to top |
|
|
szatox Advocate
Joined: 27 Aug 2013 Posts: 3140
|
Posted: Fri May 29, 2015 8:01 pm Post subject: |
|
|
Quote: | Since the drive is still mounted, is there some way to restore the existing junk that was overwritten by the iso? | Sorry, no. Overvriten data is lost. Some rumours say you can try MFM to recover data from between tracks, but let's be fair, you don't want to spend this kind of money for any data.
Just recover whatever data you can. How big that iso was? Clearly less than 16 GB, since you seem to have wanted it on penrdive, and perhaps only 350MB. Assuming your FS spanned over the whole drive, you should be able to recover stunning 99%. Maybe it's not so bad? |
|
Back to top |
|
|
1clue Advocate
Joined: 05 Feb 2006 Posts: 2569
|
Posted: Fri May 29, 2015 8:12 pm Post subject: |
|
|
I still have the 'backup of the backup' going, but it seems based on the errors in the console that most of this was music backups. I have all that on my regular drive.
I knew the answer to this, I just hoped that somehow it would be different now.
I haven't had trouble with disk destroyer in years, now I made an especially stupid mistake.
It seems everything I lost is recoverable though, so it's no big deal.
It's just the install iso, not big at all. I didn't pull in stages since that can be gotten once I'm booted. |
|
Back to top |
|
|
1clue Advocate
Joined: 05 Feb 2006 Posts: 2569
|
Posted: Fri May 29, 2015 10:14 pm Post subject: |
|
|
It's a drag, because for a tiny 200 mb iso file I lost over 250g of data.
It's too bad I can't somehow rebuild the directory structure which was overwritten from what's in memory (I can still see the files on the filesystem) and get more data back.
I realize some data will be actually gone, but I think the catalog is what's overwritten mostly. |
|
Back to top |
|
|
Akkara Bodhisattva
Joined: 28 Mar 2006 Posts: 6702 Location: &akkara
|
Posted: Fri May 29, 2015 10:50 pm Post subject: |
|
|
If you have most things backed up but not all, and you need to recover what you can, you can try to piece together the files "manually". The steps would go something like this:
- Read your backup files one 4096-byte block at a time, compute a hash for it (md5 or similar). Sort it.
- Read your to-be-recovered hard disk, also one 4096-byte block at a time, compute hashes for those, too. Sort them.
- From those two lists you can now know what blocks on the hard disk correspond to stuff you already have elsewhere. Those can now be marked "done".
- Everything else that doesn't match either belongs to a file to be recovered, or is a free block that once held something but got removed
- Blocks with lots of 0's in them are either empty, or part of the inode structure, or an executable/library of some kind. They can be ignored during the first pass of the following:
- Of the remaining blocks, scan for known headers (a ".mp3" file starts with a certain signature, likewise for flac and similar). Look for the larger media files first (it whittles the list down faster) or start with documents you need the most
- Once you have a block that's a known start for a mp3 file, find what comes after it. Basically, try concatenating each trial block to the end of the known start-of-mp3, and decoding it. If the decode processes past the 1st block without error, you now know that B follows A.
- Do similar for other types of files, testing, again, using a program that can read the format to know when the two puzzle pieces fit.
- All this is very time-consuming. Use of a good scripting language (probably Python) is recommended
Good luck! _________________ Many think that Dilbert is a comic. Unfortunately it is a documentary. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|