[K12OSN] Cloning Fedora mailproxy box

Les Mikesell les at futuresource.com
Sat Sep 16 16:26:54 UTC 2006


On Sat, 2006-09-16 at 01:06, Marty Willie wrote:

> Mailproxy1 is currently running Fedora Core 5, and my objective
> is to create an image of this machine before it inevitably tips
> over and we have to put the pieces back together - Based on the
> tech dept’s current Linux knowledge, this would be a disaster. 

> We have located an image of this machine from two years ago,
> however when we recently attempted to pull this image down
> onto what we had hoped would become mailproxy2, the machine
> would not boot.

> Can you image a Linux box running Fedora? If

You can - and there are several ways to do it.  Only a
complete raw disk image (best done when booted from a
CD) will boot without additional setup.

>  so, does the image have to be pushed down onto an identical
>  set of hardware, as is the case with a Windows box?

With the raw disk image, the target disk must be identical.
With other means, the only requirement is that the boot device
needs to have a similar controller and there are ways to work
around that.

> Thanks in advance for any help you can supply.

For your purpose I'd recommend 2 different approaches for
practice on spare hardware or under vmware.  First do a
fresh install from scratch, then find the config files
that were modified on the running server to make it
do it's current job.  If you aren't used to Linux this
may seem complicated, but once you find the right files
and see what they do you'll be able to rebuild an up to
date machine from scratch and you will be much more
comfortable depending on its services.  Since nearly
all config files are stored under /etc, a real brute-force
way to do this is to copy the whole /etc tree from your
working machine to somewhere else on the new one and do
a 'diff -r' of any interesting subdirectories between
the new and old versions.  If, as the name indicates,
the box was a mail relay, you'll probably find the relevant
changes under /etc/mail and it might be running DNS too.

The 2nd approach is to try to boot your image copy with
the fedora install CD with 'linux rescue' at the boot
prompt.  It may detect the installed system, mount it
and suggest a 'chroot' command to access it.  If it does
you can execute 'grub-install' from there and probably
have everything working.  If it doesn't detect the system
you can find the partitions with 'fdisk -l', mount them
somewhere and try to figure out what went wrong.  The
goal is to get grub installed and to have the labels
that grub and /etc/fstab expect applied to the partitions.
Once you understand this procedure you will be able to
reconstruct a machine from file based tar or dump images
of the partitions that don't include the disk boot record
(and aren't tied to the same partition sizes or layout).

This may seem like a lot to learn in a hurry but it is all
fairly consistent and when you have specific problems there
are usually step-by-step howto's for each operation.

-- 
  Les Mikesell
   lesmikesell at gmail.com





More information about the K12OSN mailing list