Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 05 Sep 2001 08:33:04 +0200 (CEST)
From:      Micke Josefsson <mj@isy.liu.se>
To:        Yonatan Bokovza <Yonatan@xpert.com>
Cc:        questions@FreeBSD.ORG, Gavin Kenny <gavinkenny@yahoo.co.uk>
Subject:   RE: Cloning an Installation
Message-ID:  <XFMail.010905083304.mj@isy.liu.se>
In-Reply-To: <EB513E68D3F5D41191CA00025558810150D697@mailserv.xpert.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On 04-Sep-01 Yonatan Bokovza wrote:
>> -----Original Message-----
>> From: Gavin Kenny [mailto:gavinkenny@yahoo.co.uk]
>> Sent: Tuesday, September 04, 2001 13:06
>> To: questions@freebsd.org
>> Subject: Cloning an Installation
>> 
>> 
>> Hi All,
>> 
>> I've got to set up 5 laptop installations. I've set up
>> the first one and spent a bit of time getting it to
>> run exactly how I want it. Is there an easy-ish way of
>> just cloning this machine into the other 4 and then
>> changing a few specifics, or is my only option to do
>> an install from CD and then go through all the
>> tweaking that I did for the 1st machine?
> 
> I'd like to know the answer to that too.

I have 55 boxes, all dual-boot windows/FreeBSD. For the FreeBSD part I install
everything I want onto one (1) machine, then clone this onto the others.

The coarse steps are:
1. Make a complete good installation
2. use dump to get every partition into a file. I put the three files (for /,
   /usr and /var) onto a central server
3. boot each new machine with the CD and enter "fixit" mode with 2ns CD off
   a distribution
4. partition the client disk. Sizes can be larger than the original filesystem,
   but not smaller.
5. Use restore to get the dumped files back 
6. Reboot the client.

Step 5 requires that you use rsh to automatically log in to the server. Edit
/root/.rhosts to your liking for this to work and then also enable rshd in
/etc/inetd.conf. From the client you should be able to ls a directory on the
server: #rsh <servername> ls

With the disk partitoned as /dev/ad0s1a, /dev/ad0s1f and /dev/ad0s2e do
something like:

#mount /dev/ad0s1a /mnt2
#cd /mnt2
#restore rvf <servername>:/path/to/root.dump
#cd ..
#umount /mnt2
#mount /dev/ad0s1f /mnt2
#cd /mnt2
#restore rvf <servername>:/path/to/usr.dump
#cd ..
#umount /mnt2
#mount /dev/ad0s1e /mnt2
#cd /mnt2
#restore rvf <servername>:/path/to/var.dump
#cd ..
#umount /mnt2

Given that the slice names are OK and the same on the "master" client, you
should now be able to reboot.

Oscar Bonilla also wrote an excellent article about this and PicoBSD
http://www.daemonnews.org/199911/fbsdlab.html 


In fact I clone the 50 boxes in no time using his tips.

Good Luck!
/Micke

> Also!
>> 
>> I've got access to my corporate network using DHCP,
>> (can't believe how easy it was) and netscape can hit
>> my companies web servers on the intranet but I can't
>> get out to the Net. However I can ftp outside! Any
>> ideas on what's wrong? My corporate net is all MS so
>> if there is information I need to get, can someone
>> tell where is hides in MS.
> 
> Many organizations I know deny outgoing HTTP traffic from 
> all local machines, but the HTTP proxy. That is done so all
> local machines will be forced to use the proxy and will not
> waste bandwidth. That might be your case. Find out what's
> your local proxy and use it.
> 
>> cheers
>> 
>> Gavin
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message

----------------------------------
Michael Josefsson, MSEE
mj@isy.liu.se

This message was sent by XFMail
running on FreeBSD 4.4-RC
----------------------------------

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?XFMail.010905083304.mj>