TiVo Community Forum banner
1 - 20 of 28 Posts

· Registered
Joined
·
10 Posts
Discussion Starter · #1 ·
I've recently been through the excercise of copying a failing Tivo drive to a replacement hard drive using dd_rescue. MFS tools and dd don't do well with a drive that has errors. dd_rescue was written for just this task (copying through the errors). dd_rescue runs under Linux.

I was successful, and the new drive works fine and all my recordings are still there. A couple recordings have a few dropouts, but the vast majority are perfect.

It took a lot of reading to get the procedure, and I'd like to pass on what I did.

There's a big thread on dd_rescue on this forum here:
http://www.tivocommunity.com/tivo-vb/showthread.php?postid=2165825#post2165825

and more on dd_rescue here:
http://archive2.tivocommunity.com/tivo-vb/showthread.php?threadid=149534

I'd like to add and update to these and pass on what I did. This works when you are copying to a drive that is the same size or larger. In the case of copying to a larger drive, there are ways to "bless" the new drive so Tivo will recognize the additional space, but I'll leave advice on this to others on this site.

Step 1. Download Knoppix. Knoppix is a flavor of Linux. It's a big iso file (700 MB) You can get it at the www.knoppix.net site. The file I downloaded was KNOPPIX_V4.0.2CD-2005-09-23-EN.iso

Step 2. Burn a CD from the ISO image you downloaded. Even though it looks too big to fit on a CD, it will fit on a 700 MB CD. There are some instructions on how to burn an ISO image on the Knoppix site at http://www.knoppix.net/wiki/Downloa...SO.3F_How_is_the_ISO_supposed_to_be_burned.3F

Step 3. Disconnect your Windows hard drives from your PC, and connect up the flaky Tivo drive as the primary master, and the replacement drive as primary slave. Set the jumpers accordingly. The reason to disconnect your Windows drives is to prevent any accidental writing to them, and also to make sure that Windows doesn't boot when the Tivo drives are connected (which can damage the Tivo drives).

Step 4. Insert the Knoppix CD in the drive and boot from the CD. You might have to set your bios to boot from CDROM.

Step 5. When you get to the boot prompt, type "knoppix 2 dma"<enter>. This will start Knoppix in command line mode and enable DMA on the drives, which will speed up the copying.

Step 6. As Knoppix is booting, verify that it found your old Tivo drive and is calling it hda, and that it found your new replacement drive and is calling it hdb. This is extremely important, because if you have it backwards, you could copy a blank drive over your Tivo drive, and you'd be sunk (you'd end up with two blank drives).

Step 7. At the command prompt, type cd /bin<enter>. That's cd space /bin and press the enter key. This is similar to the DOS change directory command.

Step 8 (optional). Type dd_rescue -h<enter>. This will display the usage of dd_rescue and explain the options.

Step 9. Again, make very sure that your old Tivo drive is showing up as hda and your new drive is showing up as hdb. Type
dd_rescue -B 1b -b 2M -A -v /dev/hda /dev/hdb<enter>. That's dd_rescue space -B space 1b space -b space 2M space -A space -v space /dev/hda space /dev/hdb and press enter. Case (upper and lower case) matters here. The program will start copying the hda to hdb, at a very fast speed in the beginning, until it hits a bad spot on the drive, and it will slow to a crawl through the bad spots. The screen will blank after a few minutes, and to turn the screen back on, just hit the ALT key.

In my case, after it got past the bad spots, it got up to 4 MB/sec, but never got back the 30 MB/sec speed that it started at. It took about 12 hours to do the copy of the 120 GB with the 8000 errors encountered. Fortunately the errors were all in the recordings, and the errors just show up as random squares or dropouts in the picture or sound on a couple of programs.

I hope that this is useful to anyone with a failing Tivo drive.
 

· Registered
Joined
·
69 Posts
Yes, thanks, this is exactly what I needed. I am about to do my 250GB drives tonight. I did figure it would take arodun 24 hours and it looks based on what you said, that seems about right.

Thanks again for the excellent write-up!
 

· Registered
Joined
·
15 Posts
Hello All

Im in the same situation...

My t800 recently failed(the drive..green screen)..And I was curious about this process discussed above...

The damaged drive is 80 gb(about 3/4 full) and Im considering purchasing a 250gb drive...to replace it...

If I use the above threads procedure to copy the bad drive...is that all that must be done..and I can just pop it back in the tivo and its good to go...from there...

or are there more steps before popping it back in to the tivo...

Also whats the deal about "blessing" the new drive..if I follow the above steps will I not get the maximized space on the new 250gb drive...

Thanks
 

· Registered
Joined
·
69 Posts
Yeah, you don't want to dd_rescue if you are going to a new larger drive. It may come down to that if your original drive is too far gone.

If you are going from smaller to a larger drive, check out the stickies above from Weaknees regarding the mfsbackup | mfsrestore tutorials. That will probably be easier for you.
 

· Registered
Joined
·
884 Posts
Pula said:
Hello All

Im in the same situation...

My t800 recently failed(the drive..green screen)..And I was curious about this process discussed above...

The damaged drive is 80 gb(about 3/4 full) and Im considering purchasing a 250gb drive...to replace it...

If I use the above threads procedure to copy the bad drive...is that all that must be done..and I can just pop it back in the tivo and its good to go...from there...

or are there more steps before popping it back in to the tivo...

Also whats the deal about "blessing" the new drive..if I follow the above steps will I not get the maximized space on the new 250gb drive...

Thanks
If this is the original stock 80gb drive that came with the TiVo and you've done no size updates you can use dd_rescue to copy to a 250gb drive and then use mfsadd to expand into the extra space. This is described in the standard Hinsdale Instructions. They speak about using dd but you should go ahead and use dd_rescue. The followup steps are the same. After you have your new 250gb drive completed, be sure to use the instructions to create a backup image.

The only drawback is not having the larger swap partition but odds are you won't need it.
 

· Registered
Joined
·
503 Posts
Thanks Niel, I just used this method to replace a failing 40GB drive with a new 120GB.

It cruised through 22GB of the dd_rescue at about 19MB/sec. Then it clicked and ground to a halt while it went through 500K of errors for about 15 minutes. After it got through that, though, it sped up again to 19MB/sec and finished the copy. The whole thing took about an hour. I expanded the partition to 120GB with mfsadd from the mfstools and it seems to be working fine. I don't know what was in that 500K. Maybe one of the recorded shows has a second of black screen now or something?

Anyway, it's working well so far. I checked a few recordings and they seem to be intact. Hopefully it will last! :)

Edit: Also a minor correction to the original post for those who blindly follow, it's "knoppix 2 dma" with a lower-case k.
 

· Registered
Joined
·
69 Posts
I just wanted to report back that this worked perfectly. It took around 30 hours for my 250GB Seagate drives. Thanks for the write up. You saved me a ton of research trail and error.

Just a couple of things, on my Knoppix CD I had to use 'knoppix' in lower case to boot into command line mode and by hitting "Pause/Break" on the keyboard caused dd_rescue to terminate with signal 3. The screen blanked out and I just hit a key without knowing it would send a signal. After that, I would just hit an arrow key to wake the screen back up.

Thanks again!
 

· Registered
Joined
·
69 Posts
No need to be sorry! If you were local to me I'd buy you a malty bevarage of your choice as a token of my appreciation.

Thanks!
 

· Registered
Joined
·
69 Posts
jshorr said:
I am running it now and I see a lot of warning I/O errors flashing but, I take it that's normal?
Yes. That's dd reporting errors. You should also notice the KB transferred per second go down, too.

It's working, don't worry!
 

· Registered
Joined
·
129 Posts
Nice write up on dd_rescue. I had a drive that was chirping and whoorling every 20 minutes or so for about a week. The unit finally froze up one afternoon. A reboot allowed the TIVO OS to return to "normal" operations, but it was only a matter of time before the drive fully failed.

I was able to dd rescue this drive and save all my recordings. Thanks!
 

· TiVo Tinker
Joined
·
120 Posts
The may help those of you encountering a drive with *lots* of errors, especially ones that get worse as the drive heats up.

I recently had a drive fail in my HR10-250 right after the Season Finales week. This wasn't your average run of the mill freeze, or reboot loop. It was the "clunk...whirr...clunk..." sound of a seriously failing drive. I've had experience with dd_rescue many times before and I wasn't very optimistic this time. I pulled the drive, grabbed a spare good drive and popped them both in my RedHat 9 PC and fired up dd_rescue.

For the first hour or so, it went well with few errors, but as the drive heated up, the error rate increased drastically. I left it overnight and the next morning it looked (and sounded) pretty dismal. I killed the process and let it set for an hour to cool the drive, then restarted dd_rescue with different log file name. Same results the next morning.

I compared the log files and discovered that the second attempt got farther before encountering massive errors than the first! This suggested that the errors weren't on the disk surface itself, but rather in the controller circuitry. Checking the options with "dd_rescue --help" I found that you can specify the starting position of the copy both for source and destination drives. My solution was to start the copy and let it go until the error rate started to really climb, kill it, let it cool for an hour, and restart it at the position before the error increase. It worked like a charm and I was able to recover my drive and all my shows. A few had artifacts in the picture occasionally, but no major problems.

Here's what I did:

Step 1: Run dd_rescue as normal
Code:
dd_rescue -B 1b -b 4M -A -v -l logfile1 /dev/hda /dev/hdd
Step 2: Check logfile1 to find the ipos field value before the errors start greatly increasing and add it as the start position in the next run. This is somewhat subjective and you shouldn't expect to exclude all errors. Here's an excerpt from my log file. The value in bold is used in the next dd_rescue command.

Code:
dd_rescue: (info): ipos:  12588821.0k, opos:  12588821.0k, xferd:  12588821.0k 
                *  errs:      2, errxfer:         1.0k, succxfer:  12588820.0k 
             +curr.rate:        1kB/s, avg.rate:    10004kB/s, avg.load: 33.3% 
dd_rescue: (warning): /dev/hda (12588821.0k): Input/output error! 
dd_rescue: (info): [B]ipos: 201662464.0k[/B], opos: 201662464.0k, xferd: 201662464.0k 
                   errs:      3, errxfer:         1.5k, succxfer: 201662462.5k 
             +curr.rate:     6356kB/s, avg.rate:    10512kB/s, avg.load: -9.0% 
dd_rescue: (info): ipos: 201662528.0k, opos: 201662528.0k, xferd: 201662528.0k 
                *  errs:      3, errxfer:         1.5k, succxfer: 201662526.5k 
             +curr.rate:        9kB/s, avg.rate:    10508kB/s, avg.load: -9.0% 
dd_rescue: (warning): /dev/hda (201662528.0k): Input/output error! 
dd_rescue: (info): ipos: 201662528.5k, opos: 201662528.5k, xferd: 201662528.5k 
                *  errs:      4, errxfer:         2.0k, succxfer: 201662526.5k 
             +curr.rate:        0kB/s, avg.rate:    10504kB/s, avg.load: -8.9% 
dd_rescue: (warning): /dev/hda (201662528.5k): Input/output error!
Step 3: Run dd_rescue with the new starting position
Code:
dd_rescue [B]-s 201662464k[/B] -B 1b -b 4M -A -v -l logfile1 /dev/hdb /dev/hdc
(You can specify the output file position as well, but it's safer to let it default to the same as the input file position.)

Step 4: Repeat steps 2 and three until done

IMPORTANT: This works with dd_rescue version 1.11 which I installed on my RedHat 9 Linux PC. The version of dd_rescue on the PTVUpgrade CD is v0.6 and the options are different. If you want or need to use the PTVUpgrade CD and its version 0.6 dd_rescue, you need to change the commands above to the following:

Code:
dd_rescue -b 4M -A -v /dev/hda /dev/hdd 
and 
dd_rescue [B]-i 201662464k[/B] -b 4M -A -v /dev/hda /dev/hdd
Note that this version has no -B option or logging option. You'll either have to check the screen to estimate the new ipos value for the next run, or use UNIX commands to redirect (or tee) the output to a file.

Remember to substitute your own drive locations for the ones in my examples. And if all else fails, check dd_rescue --help to get a description of the options available.

Regards,
Jerry
 

· Premium Member
Joined
·
9,709 Posts
I had a very similar problem once - just thought I'd toss in my solution. I was having very poor luck copying the drive bits at a time, so in order to keep it happy - I put it in the fridge.

And by that, I mean I put the computer, drive and all, in the bottom of the fridge to keep it cool. (Removed the lettuce trays). I tried to put just the drive in the fridge, but the IDE cable wasn't long enough, so in went the whole thing. (There's even photo's floating around somewhere).

And wouldn't you know it - it copied first try, full speed, with zero errors. And in case anyone is wondering - heat output of standard computer > cooling capacity of standard fridge. In the end I had a perfectly copied drive, and warm soda...

-Ken
 

· Registered
Joined
·
2 Posts
Not even sure if this thread is still being checked... but...

I would like to send a BIG THANK YOU out to Niel and the others who have posted in this thread as well as the other threads mentioned above. While I didn't have a failing drive, I had an itch to replace the stock drive in my HR10-250 with something larger since I've been recording so much HD recently. I found a 400GB drive on sale recently for a price I couldn't refuse.

I have scoured this and other sites for hours on end searching for a good way to copy my current drive (including recordings) to my new drive. I started by using a simple dd to copy (took too long and there was no status) and also tried the MFSBackup tool. My other attempt was to download another backup tool, but due to DMA driver issues with my motherboard, the copy was apparently going to take 43 hours to do, and I don't have that kind of time to be down without my DVR.

With that said, I downloaded Knoppix as mentioned above, ran dd_rescue with the specified parameters, and voila! My drive copied in about 2 hours and 5 minutes, and I'm in business with the new drive. I've literally spent days on this copy trying to get it going with the other tools.

Many, many thanks to Niel and everyone else. Your work is much appreciated. If you ever get to the Dallas, TX area, let me know, and I will gladly purchase you a few beverages of your choice!

Rocketman74
 

· vermicious knid
Joined
·
86 Posts
kdmorse said:
I had a very similar problem once - just thought I'd toss in my solution. I was having very poor luck copying the drive bits at a time, so in order to keep it happy - I put it in the fridge.

And by that, I mean I put the computer, drive and all, in the bottom of the fridge to keep it cool. (Removed the lettuce trays). I tried to put just the drive in the fridge, but the IDE cable wasn't long enough, so in went the whole thing. (There's even photo's floating around somewhere).
This is a great suggestion! I have a dual-drive S2 that developed the click of death. Since I don't know which drive is bad, I've got them both in the freezer. But I know how slow dd_rescue is, so it would be great to keep the drive cool during the whole procedure - that might give me a better chance of recovery. I can't afford to devote my refrigerator to hard drive cooling, but I'm thinking maybe I can rig up some kind of external cooler with ice packs. Hmmm...
 

· vermicious knid
Joined
·
86 Posts
OK, my husband has come up with the perfect solution - put the computer on the window sill, stick the drive out the window, close the window most of the way but not so much as to crimp the IDE cable, and plug the holes with a towel. Just have to remember to check the forecast for snow first!

Aah, I knew the climate causing those cold toes would come in handy one day!
 

· I'm the Kettle
Joined
·
520 Posts
Niel, nice job documenting the procedure. I never was one for writing documentation. To this day when ever someone asks me where the documentation is for something I've coded I tell them it's executing.
 

· Registered
Joined
·
5 Posts
Niel, and everyone else who's posted helpful info in this thread, I just have to say THANK YOU! My DirecTivo's original drive started going about 4 months ago, and until I found your thread and ran DD rescue, exactly like you described, nothing I did got it back. My wife is so happy that we don't have to deal with DirecTV's R15 piece of garbage any more, and that she doesn't have to worry about whether "Men in Trees" recorded or not.

Thanks again!
 
1 - 20 of 28 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