[Gllug] Re: Cloning Servers over HTTP

Mike Brodbelt mike at coruscant.demon.co.uk
Thu Mar 9 20:38:47 UTC 2006


John Hearns wrote:
> On Wed, 2006-03-08 at 16:30 +0000, David Abbishaw wrote:
> 
> 
>>Unfortunatly it does need to http on port 80 and the only thing sofar that
>>seems to let me do this is yast, but that wont deploy an images, which makes
>>the process to hard for the build team to cope with - can you believe!

<snip>

> Quite seriously, you have to say 'I can't do the taks I have been asked
> to do under these constraints'. Explain why, and say what you do need in
> terms of firewall access. If you ask for something rational, eg. rsync
> via ssh, you should get it.

I may be missing something, but I really can't see what the problem is
with that he wants to do. Admittedly he's going to have to do some
scripting to make it work (and it may be less effort to get
firewall/server config changes made), but it shouldn't be that hard. I
use a very similar setup to what he's looking for at work to get a
minimal Linux install on all of our desktops - that is then used to
bootstrap automated installs of WinXP.

The way I do it is to have a boot CD with a minimal kernel/busybox/udhcp
setup that'll boot the target hardware, drive the NIC, and get an IP
address. I then have a small shell script that partitions the target
machine's drive, then installs a base debian setup and makes it
bootable. This is done over ssh, but there's no reason whatsoever you
couldn't do it with wget instead to meet the requirement for HTTP. When
I set this system up it took me a while to get the boot CD right, but
the shell scripting to automate the system install is pretty simple. I
dump the image like so:-

if ssh sysbuild at imageserver "cat xfsdumpimage.bz2" | bunzip2 | \
	xfsrestore -p 30 - /mnt/target
then
        echo "Base system installed successfully..."
else
        echo "Failed to install base system - unable to continue..."
        exit 1
fi

if lilo.real -r /mnt/target
then
        echo "System bootloader installed..."
else
        echo "Failed to install LILO - aborting..."
        exit 1
fi

My system images are just xfsdump backups done to file across the
network - one I have a machine set up the way I like it, I can re-create
the image with:-

xfsdump -l 0 -L "install_image" -J - /dev/hda2 | bzip2 -c | \
        ssh sysbuild at imageserver "cat > xfsdumpimage.bz2"

I distribute them over ssh, but I'm sure wget would be just as easy to
get working. My base debian install is a 91Mb compressed image, and
restores across the network in about a minute. I could probably optimise
that a bit more, but it hasn't been worth it. Once the machine is booted
into Linux then I can remotely trigger a re-install of Windows and
desired software packages, but that bit's all done in perl.

Mike
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list