[K12OSN] copy system to another computer

Les Mikesell les at futuresource.com
Fri Jul 15 22:08:11 UTC 2005

On Fri, 2005-07-15 at 13:08, mike webb wrote:
> neither the computer or the hard disk will be the same in the new 
> computer, both will be better.the instuctions so far are as so:
> 1. piggy back the new hard disk into the computer as a "slave"
> 2. insert install cd and type "linux rescue" at the boot prompt (without 
> quotes).
> 3. my old hard disk is hda1, my new harddisk will be hda2, so type "dd 
> if=/dev/hda1 of=/dev/hda2" (without quotes).

No, the number at the end indicates a partition, for IDE drives the
letter matches the controller/connector: hda is the primary drive
on the first connector, hdb is the secondary drive on the same cable,
hdc is the primary drive on the 2nd controller, hdd the second drive
on the 2nd cable.  Note that you may get away with leaving the drive's
jumpers set to 'cable select' on either connector or you may have to
change to match it's primary or secondary position.

In this mode you omit the partition number because you want the whole
drive, something like if=/dev/hda of=/dev/hdc.

Scsi drives are named in the order detected so the first is /dev/sda,
the next sdb, etc. which will be in increasing drive select numbers
within a controller but not necessarily tied to cable position.

> 4. drink a six pack :)
> 5. after dd is finshed reboot

You left out moving the disk to the other machine...  Also, don't
connect to the network yet because you'll have an IP conflict. 

> 6. run system-config-network from a terminal to change name and ip address.

> i think i can handle that so far but i don't think it will work on a 
> hard disk that not the same size because of the partion info. could you 
> please explain further how to copy the system to a new computer if the 
> computer and harddisk are different???

OK, now you are talking about real work because you have to make some
decisions about partition sizes, etc.  You can do this either in rescue
mode or live.  Rescue mode is probably safer but I've never had a
problem duplicating a running system with a file-based copy which is
what you need when changing partition sizes.

But first, does your existing system use LVM?  I haven't moved one
of those.  If it isn't, I can go through the steps to create new
partitions and filesystems, copy over, and make it bootable.  If the
command 'lvm vgdisplay' shows a volume group you have LVM.

  Les Mikesell
   les at futuresource.com

More information about the K12OSN mailing list