# Cloning Failing drive (ddrescue)



## Hardcore Legend (Sep 27, 2012)

A quick rundown of what I've dealt with so far.

-Have a Tivo HD (series 3)
-external WD WD10EVVS (1 TB) that is dying
-attempted to use ddrescue to recover

I was new to the whole ddrescue process. I used a Ubuntu bootCD and the instructions I found never said anything about needing to set my logfile location to elsewhere or else have it be deleted when the PC rebooted and it being stored in the RAM was lost.

When I ran ddrescue the first time, it copied 330 GB and the program crashed. I ran it a second time and was able to copy 600 GB, the hard drive locked up and ddrescue reported that the copy was 'Finished' which is not true (I wouldn't think) because my drive was nearly full. The drive was failing HARD towards the end of that copy.

Anyways, not thinking, I tried to restart the copy again and the drive died after about 8 GB. After a few more attempts, I just walked away from it and let it set for a few weeks.

I began trying again yesterday and didn't get very far. This time I was using the logfile and putting it onto a USB drive. Well, at some point the drive said it was 'Complete' again after about an hour of copying the drive, which is false, and shut Ubuntu off.

So, I rebooted this morning and attempted to resume. I did not check the /dev/ order of my drives, not thinking and the program had made the USB drive /sda. So basically, I copied an empty USB to my source drive.

I'm thinking I've lost the data on the source drive now.

But what I'm wondering is if I can use the data on the new drive that I had copied 330 GB and 600 GB to (as well as many other attempts). Does anyone know if ddrescue only copied 8 GB on drive B, did it overwrite the 600 GB previously copied? Is there anyway I can 'restore' any of that 600 GB that was written to drive B? That would be at least 60% of my recordings and at this point, I would take it since I believe I've borked my source drive.

I'm at a point where I'm starting to fear I'm going to have to get a 2 TB internal drive and clone my internal drive and basically start over with losing all my recordings. I DON'T REALLY WANT TO DO THAT. But I've been paying for Tivo service for 3 months of a dead box sitting on my entertainment center.

Any help would be appreciated.


----------



## unitron (Apr 28, 2006)

Hardcore Legend said:


> A quick rundown of what I've dealt with so far.
> 
> -Have a Tivo HD (series 3)
> -external WD WD10EVVS (1 TB) that is dying
> ...


If that's a TCD652160, then I assume you were using the original 160GB internal and the TiVo-specific WD eSATA external.

Did you remove the actual drive from the WD enclosure to work with the bare drive?

What make and model drive were you trying to copy it to?

Do you already have a copy of the MFS Live cd v1.4?


----------



## Hardcore Legend (Sep 27, 2012)

unitron said:


> If that's a TCD652160, then I assume you were using the original 160GB internal and the TiVo-specific WD eSATA external.
> 
> Did you remove the actual drive from the WD enclosure to work with the bare drive?
> 
> ...


The 160 GB (stock) internal is still in the TIVO and I was using the WD10000F032 external eSata drive. In it was a WD10EVVS and I was able to find a WD10EVVS-63M5B0 to clone it to using ddrescue.

I do not have MFS Live cd, I was using the method I found at logicsector.

As I said, on the 64M5B0, I had run multiple clone attempts. One resulted in 330 GB, one in 600 GB, the rest in much smaller increments. None were resumed, all started fresh.

My source disk, I fear, is now worthless because of the USB drive mishap earlier in which I cloned the USB drive onto the source disk, thus having the source disk being read by UBUNTU as a 8 GB partition.


----------



## unitron (Apr 28, 2006)

Hardcore Legend said:


> The 160 GB (stock) internal is still in the TIVO and I was using the WD10000F032 external eSata drive. In it was a WD10EVVS and I was able to find a WD10EVVS-63M5B0 to clone it to using ddrescue.
> 
> I do not have MFS Live cd, I was using the method I found at logicsector.
> 
> ...


Well, my experience has been using

dd

and

dd_rescue

(which is not the same as ddrescue)

but never bothered with the log file feature.

If that USB drive was an 8GB thumb drive, then only the first 8GB of the source drive was overwritten, assuming it was the source and not the target which was overwritten.

Your previous attempts to copy the failing drive should have duplicated that first 8GB (and more) on the target drive, so the data still exist.

The trick is going to be getting everything onto one drive.

Can you get your hands on another drive, 1TB or larger, at least temporarily?


----------



## Hardcore Legend (Sep 27, 2012)

Yes, if it doesn't have to be a tivo compliant drive, I can get a temp 1 TB.


----------



## Hardcore Legend (Sep 27, 2012)

Alright, I have the drive


----------



## unitron (Apr 28, 2006)

Okay, take the original problem drive from inside the external enclosure, wrap a couple of layers of paper towel around it and stick it in the freezer.

Go to mfslive.org, download the .iso image for the MFS Live cd v1.4 and burn yourself a copy AS AN IMAGE.

Burn yourself a copy of the latest Ultimate Boot CD, again as an image, so that it will be bootable.

Open up the TiVo, take out the internal, make sure your computer is set to boot from CD, disconnect the data cable from the Windows drive just to be safe, connect the internal TiVo 160GB drive, boot from the Ultimate Boot cd, select the Western Digital diagnostic software, and run the long test on the 160.

After that, run the long test from the appropriate manufacturer on the temp 1TB.

(and tell me what brand and model the temp drive is)

Then run the WD long test on the intended replacement WD10EVVS.

We need to be sure we can rely on all the drives involved before starting anything, especially if the original 10EVVS has limited life left in it.


While that's going on, carefully examine the capacitors on the TiVo's power supply board.

Prior to that you should have read the wikipedia article on "capacitor plague" and, of course, unplugged the TiVo power cord from the wall socket.

Always know where both ends of the TiVo power cord are at all times.

Try not to unplug it from the back of the TiVo any more than necessary. It's not impossible to wiggle the power jack too much (especially if the screws holding it have loosened) and break one of the solder joints/traces.

Having a power strip with a switch to put between the TiVo power cord and the wall socket is advisable and handy when testing.

Eventually what we'll do is use the MFS Live cd and run 

dd_rescue

to do a byte for byte copy from the frozen drive to the temp 1TB, starting at the ends of the drives and working towards the fronts.

Sometimes using the reverse option of 

dd_rescue

works when the regular forward option doesn't.

Don't know why, exactly, but I've seen it happen.

Then we'll use it to copy the beginning of the drive from the one with which you had partial success.

That should put all of the data, including the bootpage and partition map, together on one drive in the right order.

If that temp 1TB was the right model number we could test it hooked up to the TiVo.

We might be able to anyway.

The TiVo checks the model number of the drive when it's first connected and "married" to the internal, but I don't know if it does so after that or not.

The temp drive will have all the same software as the one from the freezer, including the "married to the internal drive" info. That may be enough, depending on how paranoid they were when they came up with this scheme in the first place.

If it doesn't work, we'll have learned something about the external protection scheme.

Once we have everything on the temp drive, we can use

dd_rescue

to copy from it to the intended replacement drive what didn't make it onto the replacement.

You never actually told me if you removed the original internal from the enclosure and worked with the bare drive or not, so I don't know if we've ruled out the enclosure or the eSATA cable as possible problems or not.


----------



## Hardcore Legend (Sep 27, 2012)

First, yes, I did remove the drive from the enclosure and put the bare drive in a spare PC tower I had. I prayed that it was originally just the power supply on the enclosure that went bad but having had the drive lockup in the PC in the same manner it did hooked up to the TIVO, I'm sure it is a failing drive.

I will freeze the drive tonight, give it a few days. The internal passed the kickstart test before I powered down the TIVO for all of this cloning but I will run the test once I get the internal removed.


----------



## unitron (Apr 28, 2006)

Hardcore Legend said:


> First, yes, I did remove the drive from the enclosure and put the bare drive in a spare PC tower I had. I prayed that it was originally just the power supply on the enclosure that went bad but having had the drive lockup in the PC in the same manner it did hooked up to the TIVO, I'm sure it is a failing drive.
> 
> I will freeze the drive tonight, give it a few days. The internal passed the kickstart test before I powered down the TIVO for all of this cloning but I will run the test once I get the internal removed.


See if you can find the man page for

dd_rescue

to learn about how to tell it how far into a drive from which direction to start the copy process, how to tell it how much to copy, and how to tell it where to start on the target drive and in which direction to go.

I know it can be done by reading what others have written (lots of others, not just one or two people) but I've never been forced to do it myself, and converting those numbers back and forth from base 10 to base 2 and figuring out byte size and sector size and count and all of that tends to make my head throb.

(I have done the freeze it and copy it backwards in small chunks, with an even smaller chunk fallback size, so I know that can sometimes work before the source drive finishes dying)

The MFS Live cd has abbreviated help available for most of the commands it includes

_command _ -?

but not the full man pages (man = manual), so Google is your friend.

You may need to figure out exactly how many bytes that 8GB USB stick is to know exactly how much empty got copied over to the source drive.


----------



## unitron (Apr 28, 2006)

And tell me the brand and model number of the temp 1TB drive.


----------



## Hardcore Legend (Sep 27, 2012)

I know this is an ancient bump but I finally got around to hooking this TIVO back up. When I hooked up my cloned external, the device seems to work fine except there are more than a handful of recordings that say "This recording did not record because there was no video signal hooked up to the device" (paraphrase).

These recordings worked before the failing drive, so I'm assuming the cause of this is that they did not fully copy over to the cloned drive. Would it be worth my time to 'retry' cloning the external again to attempt to get those recordings back? I don't want to use my Tivo even to watch TV for fear of losing those recordings due to mismatched files.

Again, apologize for the length of time on this bump.


----------



## jmbach (Jan 1, 2009)

Hardcore Legend said:


> I know this is an ancient bump but I finally got around to hooking this TIVO back up. When I hooked up my cloned external, the device seems to work fine except there are more than a handful of recordings that say "This recording did not record because there was no video signal hooked up to the device" (paraphrase).
> 
> These recordings worked before the failing drive, so I'm assuming the cause of this is that they did not fully copy over to the cloned drive. Would it be worth my time to 'retry' cloning the external again to attempt to get those recordings back? I don't want to use my Tivo even to watch TV for fear of losing those recordings due to mismatched files.
> 
> Again, apologize for the length of time on this bump.


If you have enough drive space, you might give DvrBARS a try and do the modified backup. Now if you tried to record anymore programs with the new external and old internal drive it might not work. Essentially you will have to hook both drives up to your computer when you run DvrBARS. A modified backup will copy all your shows as well as the TiVo OS to a compact VHD file. You can then use that program to restore as well.


----------



## jmbach (Jan 1, 2009)

Also sometimes if you wrap the failing drive in a towel and freeze it overnight it might work longer before it fails.


----------



## Hardcore Legend (Sep 27, 2012)

So this is what I've done:

-Had 1 internal, 1 external (A).
-External (A) was dying.
-Cloned external (A) to new hard drive(B).
-That cloning process did not 'complete', copying 300 GB first time, 600 GB next time, 8 GB following time, etc before locking up.
-Accidentally overwrote first 8GB of original external (A). Ubuntuu now reads that partition as an 8GB partition instead of the original TIVO partition.
-External drive (B) works in TIVO but does not have all data from (A).

I'd like to get the remaining data off the dying drive (A) which I haven't booted in about 4 months but am afraid the changed partition will mess up drive (B). All my recordings up until a certain date have survived, so I'm thinking it is because Drive A only copied to a certain point on drive B.


----------



## jmbach (Jan 1, 2009)

Well it looks like you will have to cut and paste. You should be familiar with and comfortable using hex editors in order to do this. If you are not then call it a day and move on. If you are, then the first thing I would do is use DvrBARS full backup mode to make VHD backups of your old and new external drive. The full backup mode just does a basic copy of any disk into a compressed VHD. Once you have that, then you have the ability to manipulate the data to cut and paste to try to recover the drive. Depending on how full the drive is, you might need another TB drive or two to store the VHD.


----------

