Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Sep 2000 22:34:42 +0300
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        bentley <bentley3@mediaone.net>
Cc:        freebsd-questions <freebsd-questions@FreeBSD.ORG>
Subject:   Re: ghost prog for FreeBSD?
Message-ID:  <20000910223442.F274@hades.hell.gr>
In-Reply-To: <39BAB976.C53CBB30@mediaone.net>; from bentley3@mediaone.net on Sat, Sep 09, 2000 at 06:28:07PM -0400
References:  <39BAB976.C53CBB30@mediaone.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Sep 09, 2000 at 06:28:07PM -0400, bentley wrote:
> is there a Ghost Program for imaging a hard drive to another
> machine or disk?
>
> if so , where can i obtain this? obviously Free/ Open Source

First of all, please do not post your messages in HTML.  Some people do
not like reading mail in anything else that plain good ol' ASCII (author
of this reply, included).

I do not know of any program that can `ghost' FreeBSD disks, in the same
manner that Ghost does for Windows machines, if that is what you're
looking for.  However, FreeBSD comes with all the tools that you need to
mirror one machine to some other.

[-- copying disks the freebsd way --]

What I usually do, when I have to transfer an installation of BSD to
another disk / partition is:

1. Create the slices / labels on the second disk.
2. Mount them under /mnt.
3. Use cpio(1) to copy the files from / to /mnt.
4. Use boot0cfg on the new disk to set up the boot loader on it.
5. Reboot into the new installation.

Care should be taken in commands like:

	# cd /mnt
	# ( cd / ; find . | cpio --create ) | cpio --extract

because find(1) might descend /mnt too, and recursively copy all the
files in there many times.  Another directory structure that need not be
copied is /proc, so the command I use to copy an installation to /mnt is
usually:

	[ mount the new filesystems under /mnt first ]

	# cd /mnt
	# ( cd / ; find . | grep -v '^\./mnt' | \
	    grep -v '^\.proc' | cpio --create --format=newc ) | \
	  cpio --extract

I'm using the newc format, because as the cpio(1) manual says, it
supports filesystems with more than 65535 i-nodes, and it avoids the
"i-node number truncated" message that some times I used to get.

You might also find it useful to pass --preserve-modification-time
option to the --extract invocation of cpio.

As you can see, there is no Ghost program in FreeBSD, but there is a
very nice and relatively easy way to copy an installation of FreeBSD to
some other disk.

Sorry for the lengthy mail, but I hope that I've helped a little in
making things a bit easier for you, even without the existence of Ghost
for FreeBSD.

- giorgos


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000910223442.F274>