[mythtv-users] How do I "clone" the HD on a FE?

Ryan Steffes rbsteffes at gmail.com
Thu Oct 11 02:24:00 UTC 2007


On 10/10/07, Craig Huff <huffcslists at gmail.com> wrote:
> I have been having problems with the swap partition not being recognized
> on my system, so I was going to put a second hard drive in and use qtparted
> to format, label, and assign UUIDs to the second drive and then copy over
> the contents of the first drive.  After testing the copy as a replacement
> disk,
> then I would be free to reconstruct the first copy without risking losing my
> frontend's setup.
>
> Great theory.  I think in the end I used both gparted and qtparted, but it
> looked
> like I succeeded in duplicating the partitioning on the second (larger -- 40
> vs.
> 20 GB) drive, but...
>
> I couldn't figure out how to copy the data over from / to the second disk.
> I realized a little late that I can't reference a disk device like /dev/hda1
> as the
> input for tar as I would for copying a subdirectory.  Also, I was tired of
> the
> awkward position I was working in anyway.  Do I need to do a dump piped
> into a restore to do this?  I suppose there's a way to use dd, but I think
> I've
> used dd only two or three times in the 15 years I've been administering
> Solaris systems at work and now my Linux machines at home.  What
> recommendations do you have?
>
> (BTW, after I got the second drive out and rebooted the FE again, of course,
> THIS TIME it came up with swap working automatically.  Go figure!  The true
> test is if it works every time through the weekend.)
>
> Craig.


The easiest way frought with the most damage from a mistype is dd,
which is extremely straight forward:

dd if=/dev/INDEVHERE of=/dev/OUTDEVHERE

If the drives are mounted, then it's a bit safer and easier to use
something like tar or cp -a.  Google for "linux clon* drive" for lots
of info.


More information about the mythtv-users mailing list