[CS-FSLUG] Linux Drive Cloning

Marco Tedaldi marco.tedaldi at gmx.ch
Mon Jul 26 06:14:07 CDT 2010


Hello Timothy

> Hi everyone,
> 	I'm wondering if anyone could offer some advice on cloning a disk? 

maybe...

> I want
> to take a 250 GB ext3 hard disk full of data (and the Linux system and
> boot files, too) and clone its data onto a 500 GB disk. I've done this on the
> Mac in Disk Utility, and if I tell it to put the contents of a certain
> partition onto a larger partition, that works just fine.
> 
> 	Would the same be true in Linux? Any pointers?

I'd suggest, you use dd to copy the whole disk over..
like
dd if=/dev/sda of=/dev/sdb

But pay attention. dd does not ask any questions and it is really easy to write to the wrong place and destoy your data!

after that use something like qtparted to resize the partition and the filesystem.

> 
> 	Typically, I've done a fresh install when moving a Linux install to a
> different drive. I guess I could copy the partitions to the new drive while
> keeping them the exact same size and then resize them afterwards, but that
> sounds less efficient.
> 
But that's the best way to go in my oppinion.

You could also just partiton the new dist, make the filesystem and copy anything with cp -rp (as root).
After that you would have to install the bootloader in the mbr of the new drive and get it to boot the kernel from the new drive. Not too hard and most probably the fastest way (grub-install and stuff).


I normally keep my /home on a different partition (or like at home, on the server) so I can do a fresh install and just keep my /home intact.

Marco
-- 
Sicherer, schneller und einfacher. Die aktuellen Internet-Browser -
jetzt kostenlos herunterladen! http://portal.gmx.net/de/go/chbrowser




More information about the Christiansource mailing list