[Watford] Ghosting a Linux HDD

Alain Williams addw at phcomp.co.uk
Fri Feb 8 17:20:17 GMT 2008


On Fri, Feb 08, 2008 at 05:10:47PM -0000, walt wrote:
> Hi guys,
> 
> Is there a way and/or a utility which allows me to create and image of a
> linux hard disk incl.  all partitions and then write that to another hard
> disk?  Rather like ghost in Windows.  
> 
> Although ghost will clone a linux disk it gets it wrong somewhere and the
> new disk wont boot. I suspect its that ghost cant handle ext3 correctly or
> grub needs to be changed in some way (or both).

Depends on quite what you are doing, but I would:

1) partition the new disk (fdisk)
2) make new file systems (mkfs)
3) mount them up - will need to create mount points in the RFS first

You prob need to do the above from a Linux Live CD of some sort.

Copying data over, lots of ways:

a) rsync - if you have a network connection
b) tar to create archives, copy the archives, untar

The above will get an image across, but it won't boot. To do that you need to:

1) Get a shell under the newly copied system, something like:
	chroot /mnt/system /bin/bash

2) Install grub, something like:
	# grub
        grub> device (hd0) /dev/hda
        grub> root (hd0,0)
        grub> setup (hd0)


-- 
Alain Williams
Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer.
+44 (0) 787 668 0256  http://www.phcomp.co.uk/
Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php
Chairman of UKUUG: http://www.ukuug.org/
#include <std_disclaimer.h>



More information about the Watford mailing list