[Watford] Ghosting a Linux HDD

walt walt at helvatron.co.uk
Fri Feb 8 21:16:54 GMT 2008


I'll go with Alain's instructions first and then I'll have a go at Yvan's
way of doing things.

OK, I  have partitioned a new drive (/dev/hda), then setup a folder named
new-drive (in /dev/sda2) and now I want to mount a partition on the new
drive: /dev/hda2.

The command 'mount /dev/hda2 /dev/sda3/new-drive' keeps generating error:
	'/dev/sda3/new-drive' is not a directory

And I have no idea why because it is.  I have copied stuff into it from a
console and from KDE. I have also checked the permissions which are 'full
control' eg read write modify etc etc.

Any ideas?

Thanks Walter.

-----Original Message-----
From: watford-bounces at mailman.lug.org.uk
[mailto:watford-bounces at mailman.lug.org.uk] On Behalf Of Alain Williams
Sent: 08 February 2008 17:20
To: watford at mailman.lug.org.uk
Subject: Re: [Watford] Ghosting a Linux HDD

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>

_______________________________________________
Watford mailing list
Watford at mailman.lug.org.uk
https://mailman.lug.org.uk/mailman/listinfo/watford




More information about the Watford mailing list