Clone HDD to another HDD

General Discussion of atomic repo and development projects.

Ask for help here with anything else not covered by other forums.
aus-city
Forum Regular
Forum Regular
Posts: 685
Joined: Thu Oct 26, 2006 11:56 pm

Clone HDD to another HDD

Unread post 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!
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Unread post by breun »

You can use dd and grow a partition afterwards.
Lemonbit Internet Dedicated Server Management
aus-city
Forum Regular
Forum Regular
Posts: 685
Joined: Thu Oct 26, 2006 11:56 pm

Unread post 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?
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Unread post 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
Lemonbit Internet Dedicated Server Management
Post Reply