[plug] copying an install?

Craig Ringer craig at postnewspapers.com.au
Mon Jul 1 14:32:39 WST 2002


> I want to image the contents of the linux install and copy it to the new 
> harddisk. In order to do this, my best guess is to create an iso image with 
> the install (minus /dev and /proc) and use tomsrtbt as a boot image. 
I would think that's the hard way. If possible, just yank the drive from 
the new machine, dd /dev/<old-server-drive> /dev/<new-server-drive> 
after booting the machine from a boot disk or (risky?) the hdd using 
"linux init=/bin/bash"

Then you should be able to whack the new drive back in the new server, 
boot off a floppy, mount and chroot into your root partiton, re-install 
the boot sector after editing /etc/lilo.conf (lilo - may be different 
for grub)  and reboot. This is how I've always done it, but as with many 
things there's no "right" answer. This _will_ _not_ _work_ if you have 
different sized disks, and will be really counter-productive if you want 
to change partition sizes etc.

In that case, its much the same but copy the files after partitoning and 
formatting the new disk, rather than using dd. Harder, because you have 
to deal with funny business with named pipes, etc but works well enough 
- I've done that too.

> b) how do I then install grub or lilo afterwards from tomsrtbt?
I don't know tomsrtbt specifically, but in most cases just boot off the 
media, mount your old root under /mnt/root or /tmp/root or 
/blah/whatever, chroot /blah/whatever, vi /etc/lilo.conf and run "lilo" 
then umount  and reboot. Change last steps for grub.

> c) Any better ideas?
Different, not better, as outlined above.

-- 
Craig Ringer
GPG Key Fingerprint: AF1C ABFE 7E64 E9C8 FC27  C16E D3CE CDC0 0E93 380D
	-- if it ain't broke, add features 'till it is. (or:)
	while (! broken) { feature ++ ; }




More information about the plug mailing list