View Full Version : Copy program from 1 drive to another?
tim2009
10-31-2003, 01:51 AM
It looks like my drive (Maxtor/160g) drive is broken. I have around 50 hours worth of recording on it. I want to save my record programs to another drive. I have been doing some searching and know the following command might work:
dd conv=noerror,sync if=/dev/hdc of=/dev/hdb bs=1024
My question is this:
Can I use a 120g drive to be copied to? Or it must be 160 to 160?
Will this command eliminate all the bad sector or data in the source drive?
Since this is a 2 drive HDVR2 system, after I copy everything from the old drive to the new drive, can I just plug it back to the tivo and it will automatically recognize the drive? Or do I need to something else?
Need some advice before I go out to buy another drive. Thanks.
captain_video
10-31-2003, 10:33 AM
If you're doing a direct disk-to-disk copy of your drives the target drive must be at least the same size or larger than than the source drive. You can use two drives as the target to get the same capacity. Your 160GB drive will only be indicated as a 137GB drive so you should be able to use a 120GB drive and anything about 20GB or larger for the 2nd drive. Check Hinsdale's for the commands to use two target drives.
tim2009
10-31-2003, 01:22 PM
Thanks captain_video for the information. I went through Hinsdale again but didn't find anything on the dd command to copy from 1 drive into 2 drive but I wonder if this is what you are talking about:
mfsbackup - Tao - /dev/hdc | mfsrestore -s 127 -xzpi - /dev/hda /dev/hdb
Is that correct? And if I need to reverse the process, do I just do this:
mfsbackup -Tao -/dev/hda /dev/hdb | mfsrestore -s 127 -xzp - /dev/hdc
A couple more question please:
1. If I am using the dd command to copy the drive, how do I implement the -s 127 in the drive for the increases of the swap?
2. If the source drive I am using has been done through the mfsrestore -s 127 mtheod, will using the dd command transfer that over to the new drive too?
3. If I plan to pull out the B drive in my Tivo and leaving only the A drive (both are 160g upgrade drive and used the mfrestore -s 127 method and then mfsadd method), can I just do this:
mfsadd -x /dev/hdc
Will this command let the tivo know that now I an using only 1 drive?
Thanks.
captain_video
10-31-2003, 02:29 PM
Look in Hinsdale's, section 8, subparagraph b for copying a single drive to new A and B upgrade drives:
dd if=/dev/hdb of=/dev/hdc /dev/hdd bs=1024k
This assumes you have your existing Tivo drive as the primary slave, the new A drive as secondary master, and the new B drive as secondary slave.
1. You don't need to include the -s 127 command while copying the drives because the existing swap file is being copied at the same time. You are essentially cloning your old drive to two new ones. If you didn't increase the swap file when you set up your 160GB drive then you'll need to do it now. There's a sticky thread on this topic over at the Tivo Community Forum. I see that you also posted this question over there so you already know where to look for the info on the swap file.
2. See my answer to #1.
3. You can't reverse the process and remove your B drive once it's been married to the A drive. You'd have to make a backup image of the dual drive configuration and then erestore the backup image to a single drive. This will lose all of your recordings.
tim2009
10-31-2003, 06:01 PM
Thanks captain_video for the information. After doing more searching and reading post from both forum, I have a much better understanding on how to rescue the disk. I will go forward with the dd_recuse and see if that will fix my problem. Also, I wonder if you can tell me from the following message if both of my drives are bad or I just need to dd_rescue on both drive:
IDE drive(0): Disk not responding to device selection
read_sector device_select failed
IDE drive(1): Disk not responding to device selection
read_sector device_select failed
IDE drive(0): Disk not responding to device selection
read_sector device_select failed
autoboot failed to read boot sector
Any idea?
One more thing, I really want to thank you for the information, not only it save me time, it just save me some money too. I was going to get a 200g drive to copy the bad drive stuff over, return the broken 160g to the factory and restore it back when it is fixed. The 200g drive is on sale (cheaper than a 160g drive) but reading your post make me realize I can ONLY copy the same size drive or copy to a bigger size drive. Thanks again.
vBulletin® v3.7.3, Copyright ©2000-2009, Jelsoft Enterprises Ltd.