[ale] cloning drive using gparted

Michael H. Warfield mhw at WittsEnd.com
Sun Dec 4 14:10:22 EST 2011


On Sun, 2011-12-04 at 09:11 -0500, Narahari 'n' Savitha wrote: 
> Friends:
> 
> I created a VMPlayer VM containing Lubuntu 11.10.  It is working perfect.
> 
> When I created the VM though, I made it dynamically expanding upto 12GB
> instead of "allocate all space now".  Let us call this DISK1
> 
> I am trying to convert from dyanmically expanding to "allocate all space
> now" but I could not do it directly withing VMPlayer.
> 
> I then created another disk of size of 12GB the vmdk file with "allocat all
> space now" option.  Let us call this DISK2.
> 
> I mounted both drives and then logged in with GParted and used that to copy
> the DISK1 Partition to DISK2 Partition.

This is actually a little vague here.  Are you saying you copied the
logical partitions or the entire disk image?

> However when I make DISK2 the only drive and then start the VM it just
> hangs.

> I am not sure what else I am supposed to do like copying MBR or anything
> else.

If all you did was clone the logical partitions from the first disk to
the second disk, yeah, your MBR and bootloader didn't get copied.

I don't think I would have used gparted for this.  Assuming that the
capacity of the drive images are identical, I would have just used dd to
copy one whole drive image over the other like this:

dd if=/dev/sda of=/dev/sdb bs=16M

That will overwrite your MBR and partition table as well as do all the
partitions.

If the sizes are NOT identical, you can still do this so long as the
target is larger (you can expand the partition after).  It might cause
VMPlayer to expand out the source as you access blocks that were not
previously accessed but I imaging gparted would have the same effect and
I imagine you're planning on discarding it later once you have the new
image tested and working.

> Please shed some light.

> -Narahari

Regards,
Mike
-- 
Michael H. Warfield (AI4NB) | (770) 985-6132 |  mhw at WittsEnd.com
   /\/\|=mhw=|\/\/          | (678) 463-0932 |  http://www.wittsend.com/mhw/
   NIC whois: MHW9          | An optimist believes we live in the best of all
 PGP Key: 0x674627FF        | possible worlds.  A pessimist is sure of it!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 482 bytes
Desc: This is a digitally signed message part
Url : http://mail.ale.org/pipermail/ale/attachments/20111204/8f6b221c/attachment.bin 


More information about the Ale mailing list