Page 1 of 1

Clone HDD to another HDD

Posted: Wed Aug 08, 2007 7:48 pm
by aus-city
I am about to swap motherboard and CPU around.

Since the same processor type (i686) not to many problems expected.

However as the new MB has sata now, I want to get rid of this pata drive with F7 on it onto the new sata drive.

Disk /dev/sda: 300.0 GB, 300069052416 bytes
255 heads, 63 sectors/track, 36481 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 36481 292929210 8e Linux LVM

Okay, how can I copy both these partitions and boot over to a new hdd? New one will be larger, so I dont want to dd and trash all the extra space.

I have another machine with pata and sata, so I can mount the drives in there for copying, or simply boot up knoppix and do it this way.

Any idea's how to copy it all properly?

Thanks!

Posted: Thu Aug 09, 2007 4:42 pm
by breun
You can use dd and grow a partition afterwards.

Posted: Thu Aug 09, 2007 6:03 pm
by aus-city
Hi Breun,

Perfect! Can you please tell me how to grow it afterwards?

(its the second /dev/sda2 14 36481 292929210 8e Linux LVM) will be the one I want to grow and fill to the end of the drive.

Also someone recommended gnuparted, will this work also?

Posted: Fri Aug 10, 2007 5:45 am
by breun
Check the excellent LVM Howto. Especially section 11.9 'Extending a logical volume' may be of interest to you: http://tldp.org/HOWTO/LVM-HOWTO/extendlv.html