TiVo Community Forum banner
1 - 13 of 13 Posts

· Woodstock-era Hacker
Joined
·
752 Posts
Discussion Starter · #1 ·
{Please see the update of this post here.}

I had to do a considerable amount of searching and expermentation to get dd_rescue to work, so I thought it would be worth a "how-to" thread.

dd_rescue has the ability to copy almost everything off a damaged hard drive relatively quickly. There is a helper utility (dd_rhelp) to assist in the process, but I haven't tried that yet. Hope I don't have to. dd_rescue requires a linux platform. Being a non-linux person (I know, I'm thinking of converting) I tried with a couple of the standard CD boot disks (Jenkins, Keegan) but they didn't possess the necessary libraries. So I decided to do it with a Knoppix boot.

So here are the steps:
1. Download the Knoppix ISO and burn a CD from it. Available from here.

2. Download the .tar.gz file of dd_rescue from here and save it to a floppy in your A:\ drive.

3. Leave the floppy in A:\ and set your computer to boot from the CD drive. Configure your hard drives appropriately. Be very careful to never boot into Windows with TiVo drives attached! Boot only into the Knoppix CD.

4. When the welcome screen comes on, enter "knoppix 2 dma" at the bottom and hit enter. This bypasses all the graphics, enables access to the devices (which I couldn't do under the GUI), and enables DMA on all drives. Very important for speed.

5. Enter "cd /mnt/floppy" and "tar =xwzf dd_rescue-0.2.tar.gz."

6. Enter "cd dd_rescue"

7. Enter "dd_rescue -A -v /dev/hd{old} /dev/hd{new}. For the truly uninitiated:
/dev/hda is Primary Master drive
/dev/hdb is Primary Slave drive
/dev/hdc is Secondary Master drive
/dev/hdd is Secondary Slave drive

That's it. The copying should go very quickly until it hits a bad sector and then it will slow down to take smaller chunks of data. People have reported very good results with this technique. When I replaced a pair of Maxtor 120s with new Seagates (at $49 each after rebates at Best Buy -- my good luck for the week), dd_rescue got up to about 115 gig when it reported there was no more room on the target drive. Scared me, but apparently didn't hurt the process, as the TiVo booted up normally. {later edit -- turned out this was a problem -- the geometry of the drives should be identical (or at least the target drive larger) or TiVo is going to have trouble finding blocks of data} Of course, it re-booted after three minutes, just as it did before I replaced the drives, so I did all this for nothing. At least I learned how to mirror my drives.

BlankMan has done quite a bit of research into the intricacies of dd_rescue and they may be found here. Information about dd_rhelp is also in this thread and here.

Hope this helps people save their favorite Olympic moments!
 

· Woodstock-era Hacker
Joined
·
752 Posts
Discussion Starter · #3 ·
I looked for dd_rescue on my knoppix distro and if it's there, I couldn't find it. I played around last night with creating a floppy boot disk on which I could put dd_rescue, but the results were lacking. I'm sure improvements can be made to my method but, in my case, it was "get the job done!"

Thank you, Robert S, I found RIP and will investigate how that works and report back here. I'd rather be ready the next time instead of thrashing about.
 

· Woodstock-era Hacker
Joined
·
752 Posts
Discussion Starter · #4 ·
{This is an updated version of my first post to indicate a more efficient way to do this}

I had to do a considerable amount of searching and expermentation to get dd_rescue to work, so I thought it would be worth a "how-to" thread.

dd_rescue has the ability to copy almost everything off a damaged hard drive relatively quickly. There is a helper utility (dd_rhelp) to assist in the process, but I haven't tried that yet. Hope I don't have to. dd_rescue requires a linux platform. Being a non-linux person (I know, I'm thinking of converting) I tried with a couple of the standard CD boot disks (Jenkins, Keegan) but they didn't possess the necessary libraries. So on the advice of Robert S, I used the RIP (Rescue is Possible) CD.

So here are the steps:
1. Download the RIP ISO (currently named RIP-10.3.iso.bin) and burn a CD from it. Available from here. {EDIT (1/5/05) I'm told that this is now obsolete as most distributions of Knoppix have dd_rescue}

2. Set your computer to boot from the CD drive. Configure your hard drives appropriately. Be very careful to never boot into Windows with TiVo drives attached! Boot only into the RIP CD.

3. When the welcome screen comes on, select "Boot Linux rescue system [skip keymap prompt]" then login as "root."

4. Enter "cd /usr/bin"

5. Enter "dd_rescue -B 1b -b 2M -A -v -l /var/dd_rescue.log /dev/hd{old} /dev/hd{new} ." For the truly uninitiated:
/dev/hda is Primary Master drive
/dev/hdb is Primary Slave drive
/dev/hdc is Secondary Master drive
/dev/hdd is Secondary Slave drive

6. The log file should be gzip'd and copied to a floppy before rebooting, as the /var directory will go away.

That's it. The copying should go very quickly until it hits a bad sector and then it will slow down to take smaller chunks of data. People have reported very good results with this technique. When I used it dd_rescue got up to about 115 gig when it reported there was no more room on the target drive. Scared me, but apparently didn't hurt the process, as the TiVo booted up normally. {later edit -- turned out this was a problem -- the geometry of the drives should be identical (or at least the target drive larger) or TiVo is going to have trouble finding blocks of data}

BlankMan has done quite a bit of research into the intricacies of dd_rescue and they may be found here. Information about dd_rhelp is also in this thread and here.
 

· Woodstock-era Hacker
Joined
·
752 Posts
Discussion Starter · #6 ·
Thank you for the info especially on the -b parameter. Remember that I'm booting from a CD in a Windows box with an NTFS drive (I probably didn't mention that) -- how could I write to a log file under those conditions?
 

· Woodstock-era Hacker
Joined
·
752 Posts
Discussion Starter · #8 ·
No, I didn't know that. Actually, I should have, because I've noticed the creation of a ramdisk during bootup and I've been able to create mount points in /mnt, which obviously would have been impossible otherwise. Thanks, I'm always learning. That's what makes this fun.
 

· Woodstock-era Hacker
Joined
·
752 Posts
Discussion Starter · #12 ·
My mistake on the 4M -- I meant 2M. I left the first post the way it was for the sake of documenting Knoppix with the hope that someone with this problem would have the persistence to read the referenced post as well. Thanks for the catch.
 

· Woodstock-era Hacker
Joined
·
752 Posts
Discussion Starter · #30 ·
Originally posted by tdogboy
Then it's going in wifey's computer as a Christmas present.
That will thrill her.

Trust me, do that as a weekend favor and get her something she really wants for Christmas. Your marriage will be far more secure. Trust me.

You get more than technical assistance in the TiVo Community Forum!
 

· Woodstock-era Hacker
Joined
·
752 Posts
Discussion Starter · #35 ·
Originally posted by gwgw45
Am I wasting my time and should I stop it, or is this normal?

Thakns again
Gareth
I had a similar situation. Different error but similar situation. You're probably wasting your time, but on the off chance you aren't I would say that the ten hours you'll have to wait to find out is worth the cost saved on a new drive.
 

· Woodstock-era Hacker
Joined
·
752 Posts
Discussion Starter · #44 ·
These tips came from SR712 and were shamelessly copied from the forum which cannot be named. It explains how to set DMA on the source and target drives and set 2M block size to optimize the speed of copy.

Put another way, where and how do you enable DMA and 2M block size?
After you boot into Linux, before you run the dd command:

Code:
hdparm -d1 /dev/hda /dev/hdc
[If you have the drives as hda and hdc.]

Then, use dd command like this to enable 2M block sizes:
Code:
dd if=/dev/hda of=/dev/hdc bs=2M
...if your source drive is hda and your destination drive is hdc.
 

· Woodstock-era Hacker
Joined
·
752 Posts
Discussion Starter · #48 ·
I post only that which I believe to be helpful to people. If everybody here were to limit their posts to only that which they know to be 100% accurate and in language that 100% of the people could understand 100% of the time, it would be a very barren board, indeed.

I'm sorry if I've somehow offended your sensitivities or haven't risen to your level of quality. Makes me sorry I started this thread.
 
1 - 13 of 13 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top