[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to replicate debian system on Local Network?





Paul E Condon wrote:
On Mon, Jun 21, 2004 at 04:19:38PM +1000, James Sinnamon wrote:

I have a Debian system set up on one PC and would like to replicate it onto another (to eventually replace my Redhat 9.0 system.).

What would be the easist way to accomplish this?

	1. use an NFS mount of /var/apt/cache/archives/ frommy first
           Debian system, and enter into /etc/apt/sources.list :

            deb file:///<nfs-mount-point>/<path-to-apt-archives>
            deb-src file:///<nfs-mount-point>/<path-to-apt-archives>
	

2. use my first Debian system as an ftp server and specify in /etc/apt/sources.list :

            deb ftp:/hostname/<path-to-apt-archives>
            deb-src ftp:/hostname/<path-to-apt-archives>

.... would they work? and even if they did, is there an easier way?



Look at the package apt-proxy. It caches the downloads from debian repositories in a way that fits with using apt-get on a second or third machine.

use linux-bbc or similar

have both networked

boot both machines from linux bbc

machine 1 = debian build
machine 2 = redhat build

fdisk machine 2 so its filesystem layout looks like machine 1

eg

/dev/hda1 = root
/dev/hda2 = swap
/dev/hda3 = home
/dev/hda4 = var

machine 1
boot into linux-bbc
bring up the network
trivial-network-config
mount the local filesystem
mkdir /mnt/machine1 (or whatever you like)
mount /dev/hda1 /mnt/machine1
mount /dev/hda3 /mnt/machine1/home
mount /dev/hda3 /mnt/machine1/var

machine 2

you have booted into linux-bbc
bring up the network
trivial-network-config

mount the real filesystem

 mkdir /mnt/real
mount /dev/hda1 /mnt/real
mkdir /mnt/real/home
mount /dev/hda3 /mnt/real/home
mkdir /mnt/real/var
mount /dev/hda4 /mnt/real/var

cd /mnt/real


machine 1
cd /mnt/machine1

find . -print0 |cpio --format=crc -0 -o |ssh root@(machine2 ip address) cd /mnt/real \; cpio --verbose -v -i -d


when finished you may have to play with /etc/modules etc to bring up network cards but builds will end up being the same






Reply to: