cloning a boot partition

Mark Knecht markknecht at gmail.com
Thu Jun 16 20:04:06 UTC 2005


On 6/16/05, Rick Stevens <rstevens at vitalstream.com> wrote:
> Mark Knecht wrote:
> > Hi,
> >    What tools do people find most simple/fast/fool-proof for cloning a
> > drive, and expecially cloning a boot partition? I've got a small
> > system with an 8GB drive but only about 2.5GB on the system. There is
> > a boot partition, swap and root. I'd like to clone this drive three
> > times to larger 80GB drives.
> 
> Do you mean make three copies on the 80GB drive?  That could suck up a
> lot of your partitions.

No - sorry for any confusion. As I said

"clone this drive three times to larger 80GB drives"

and not

"clone this drive three times to a larger 80GB drive"

A few weeks ago I purchased an Asus Pundit-R for use as a MythTV
frontend. It's up and running fine using a very old 8GB drive. This
week I purchased 3 more to go in other rooms and other houses but I
had to buy drives this time so I got 80GB drives for each machine. I
want each machine to start life this afternoon as a copy of the one
that's been running for a few weeks already.

> 
> >    I can boot the system with a LiveCD or the FC2 CD in resuce mode
> > which should make the existing drive just storage and copyable. It
> > would be perfect if the clone did NOT use the additional drive space
> > since I'd like to make this a new partition on the new machines.
> 
> If you're doing the three copies on one drive, I'd set it up with one
> boot partition (make it a primary, e.g. hda1), one swap (could be in an
> extended partition, e.g. hda5) and three root partitions (also could be
> in the extended partition, e.g. hda6, hda7 and hda8).  Use fdisk to set
> those up, then use "cp -a" to copy the root stuff over to the three new
> root partitions.  You can't use "dd" as that would do a block-for-block
> copy and your geometries aren't even close to the same.  You'd then need
> to edit the /boot/grub/grub.conf file to set the "root=" bits on the
> kernel lines to point at the right places.
> 

OK, so this addresses how I can do it. (Don't use dd.) That's fine.
But what I really want to do is make the boot partition on each drive
bootable, put grub on it and make the master boot records identical.
(I think.) Therefore my unclear question from before was really 'how
do I clone the boot partition on a working 8GB drive onto a new unused
80GB drive?'

I could also just install grub by hand, somehow, but I was hoping to
get the drive completely ready before I ever power the machine up
since the new machines have no CDROM drives...

Sorry if this is confusing.

Thanks,
Mark




More information about the Redhat-install-list mailing list