Transfer to New Computer

Matrix Mole matrixm at gmail.com
Wed Dec 26 17:58:53 MST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Carlton Brooks wrote:
> I know this has been discussed before but can not seem to find the info.
> 
> I have just purchased a new hard drive and would like to transfer my 
> entire Ubuntu 7.1 setup and data, etc to the new drive.
> What presteps do I need to do to the new drive to prepare it, then how 
> do I copy the files.


There are quite a few ways of doing this in *nix. I think that Matt
Graham has the most complete solution available since he explains in
detail how to go about performing this function. There are other methods
though. All these other options assume that the second drive is
connected up after the primary on the controller (all suggestions use
/dev/hda as old drive, and /dev/hdb as new drive).

You could try 'cat /dev/hda > /dev/hdb' although if the drives aren't
the same size you'd have to non-destructively change some of the
partitions to get more size on any of them if you chose to do so instead
of creating new partitions (assumin not using LVM which iirc can
increase VM size from existing free space).

Another option is the dd command. You could do 'dd if=/dev/hda
of=/dev/hdb' but that most likely leave you with a large amount of
unpartitioned space as the cat solutio above. Another option with dd is
to partition the second drive into the same partitions as the first
drive, although increasing their size if you wish to do so, then use 'dd
if=/dev/hdx of=/dev/hdbx' where x is the partition number you are mirroring.

I don't have any spare drives to practice with to see how well either of
these options work at this time. It's entirely up to you how you go
about doing it, but any of the three options (Matt's or the two above)
should work to some degree.

Matrix Mole
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHcvjNNtosHRPp48MRAm2qAKCFbdqUApeLmMz1Fj7gb240PsJNqACgoTF+
w8SWN7X7Z1eXoSTzaitKOsw=
=dl1l
-----END PGP SIGNATURE-----


More information about the PLUG-discuss mailing list