[K12OSN] How to drive copy Linux

Les Mikesell les at futuresource.com
Mon Feb 7 20:18:49 UTC 2005


On Mon, 2005-02-07 at 11:30, Ehrhart, Jay wrote:
> I am running Red Hat 3 AS with one 36 GB SCSI drive.  I have the drive
> partitioned, home, usr, /, var.  I want to copy the entire drive to
> another SCSI drive attached to the cable so I can install the drive
> drive in an identical server.  Then I can rename and renumber the
> server and be done.  I used Ghost 7.5 which copied the data but would
> the system would not boot.  It got to Grub in the boot squence and
> stopped.  How can I get this to work?  Or what is the method to copy
> or clone a Linux drive to another?

You can probably fix your existing copy by booting the install CD
with 'linux rescue' at the boot prompt.  If it identifies your
partitions, mounts them, and suggests that you 'chroot /mnt/sysinstall'
to repair it, do that, then enter 'grub-install' and it should make
the drive bootable.  If it doesn't find the installed system you may
have to mount the root partition yourself and edit /etc/fstab and
/boot/grub/grub.conf to use the device names for partitions instead
of labels. Or use e2lable while in rescue mode to add the correct
labels.  If you have to make changes, type exit (twice if you did the
chroot) to reboot and try again.

If the target disk is identical, you can copy the whole thing, boot
sector, partition table, labels and all but booting the install
disk in rescue mode or using a knoppix boot cd and doing something
like:
dd if=/dev/sda of=/dev/sdb
(to copy the 1st scsi drive to the 2nd).

-- 
  Les Mikesell
   les at futuresource.com





More information about the K12OSN mailing list