View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 3 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Fri Jul 01, 2005 3:08 pm 
Offline
Joined: Thu Feb 12, 2004 2:54 pm
Posts: 392
Location: Beaumont, CA
Hopefully you will never have to use this as I just did! I had a partition on a drive /dev/hda5 (my home directory with ALL my personal and work information) that started giving me Buffer I/O Errors. It wouldn't mount, nor would knoppix (or anything else) mount it. In my case it was formatted with Reiserfs, but this can work with ext2 or ext3.
Here are the steps I took to recover. I was able to get about 80% of my data back. (If I would have done this rigth away instead of trying to fix it "live" I'd had saved more). Someone posted that dd_recover was on the knoppix live cd, but I dont know if dd_rhelp is, or what version so I just got the latest.

-Unmount the drive immediatly if it is mounted
-download dd_recover (Rightly called in one review "...when no one else can help you...") www.garloff.de/kurt/linux/ddrescue/
-Also get dd_rhelp www.kalysto.org/utilities/dd_rhelp/index.en.html Make sure you read ALL of his FAQ before you continue. (It's only 1 page)
-untar dd_recover, change to that dir and make && make install
-untar dd_rhelp, change to that dir, configure, make and make install it too.
-Make sure you download and read ALL of this so you get an idea of what will be happening. (Its only 3 pages) www.linux-magazine.com/issue/47/Restori ... rescue.pdf
-You will need to have a partition atleast the same size of the bad partition. It is recommended to have double. Be sure this partition is ext3 or Reiserfs. (Can handle large file sizes). For some reason I couldn't use any of knoppmyth's (ext3) partitions because the image would get about 21GB and give me "File Size Exceeded". Dunno why that is.. I bought a new drive and put ext3 on it and it was fine..
-Run this command (In my example hda5 is the bad partition and I want to have the imaged saved to /some/directory/hda5back.img (on my new drive)
dd_rhelp /dev/hda5 /some/directory/hda5back.img
My partition was 30GB and it ran for about 4 hours. Once it starts to repeat itself without retrieving anymore data (you can see the progress bar) you can Ctrl-C out of it. But make sure it goes through the whole partition atleast once, I let mine repeat a couple of times just to be sure. (If you'd read the dd_rhelp docs, you'd understand). You'll see errors, Buffer I/O errors, etc, but just let it go until you are sure it is repeating and not recovering much (if any) more data.
- The next step was to copy the new image to a backup, I didn't do this. I probably should have, I didn't want wait for it to copy 30GB of data...
- Follow the instructions from the PDF file to check that image with either the reieserfsck or fsckext3, etc. In my case I did the --fix-fixable tag, It took about 15 minutes and came back to say I had to run the same with --rebuild-tree tag. That took about 2 hours.
-Mount the image using loopback. On my system (ubuntu) it was:
mount -o loop /some/directory/hda5back.img /mnt/mark2. (What a feeling to see this sucker mount!).
-Change to that directory, a good majority of your folder/files should be there, along with alot in lost+found that will need to be renamed and cleaned up.
-Copy those files wherever you want, fix yourself a stiff drink and toast to the wonderful world of linux!

Whether this will work on a windows drive, I dont know. I think the dd_rhelp/dd_recover might, but I dont know what one would do beyond that.
Once again I am so thankful and greatful to everyone (Cecil) that turned me on to Linux a few years ago! I am sure if this was windows, my entire customer information, source code, tax information and kids pictures would be gone forever. (Unless I wanted to pay hundreds or thousands to a recovery company).


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 03, 2005 10:59 pm 
Offline
Joined: Sun Sep 05, 2004 7:06 pm
Posts: 690
Hello Elgordo123

About three weeks ago I was struggling with 200gb drive that I accidently
converted from a Dynamic Disc to a Basic Disc in XP . I was looking for a tool that could in restore my partition back to it's orginal self. After about two weeks of asking around and Googling like crazy I ran into this tool.

http://www.cgsecurity.org/index.html?testdisk.html

I noticed that the tool runs on both Windows and Linux. I ran it on the drive and it found my partition that I was missing. I restored and rebooted and was able to get back everything. Very slick!!!

So far I have only used the tool with Windows XP. And in my case there was nothing wrong with the hardware other than my mistake when I was moving around my drives. But this is a really is great tool to have when accidents happen....


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 07, 2005 7:01 pm 
Offline
Joined: Tue Dec 07, 2004 12:04 pm
Posts: 369
RacerX -

Thank you! I've tried about 5 or 6 other tools over the past few months, including one I paid big $ for, all for naught. testdisk not only found my missing "/home" partition (a 2nd logical partition on an extended partition) it did so in < 2 minutes. Flat. It then spent another couple of minutes scanning the empty space after that partition, but that's only because the drive was a "better safe than sorry" clone of the original with about 2% greater capacity than the original disk (e.g. not testdisk's fault).

The irony is that I'd had testdisk in my possession for a couple of months already on my super useful Ultimate Boot CD v3.3 cds, but the *NAME* led me to continue skipping it as a potential partition recovery tool. Doh.

-brendan

PS - how's Speed doing these days?


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 91 guests


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 post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu