Installing on multiple machines

Carlos Alloatti calloatti at gmail.com
Tue May 24 19:32:15 PDT 2005


On 5/24/05, Ewald Jenisch <a at jenisch.at> wrote:
> Hi,
> 
> I'd like to install 5.4 on several machines. The hardware is similar,
> but not exactly equal (different size HDs, different amount of
> memory).
> 
> Is there any way to install 5.4 on different machines with the same
> options, i.e. same set of packages, same settings (e.g. keyboard)
> etc. without manually going through the installation on every machine?
> 

Doing a "Norton Ghost" like copying of the hard disk is ok for you? Try this:

Install and configure FreeBSD in one machine. Now start an install of
Freebsd in another machine, up to the FreeBSD Disklabel Editor. After
creating slices with "A" or manually, press "W" to save changes.
Remove disk, install as MASTER in SECOND IDE CONTROLLER on first
machine, start FreeBSD , create /edit this script:

#!/bin/sh
mkdir /backup
mkdir /backup/root
mkdir /backup/usr
mkdir /backup/var

newfs /dev/ad2s1a
newfs /dev/ad2s1d
newfs /dev/ad2s1f

mount /dev/ad2s1a /backup/root
mount /dev/ad2s1d /backup/var
mount /dev/ad2s1f /backup/usr

( dump -0f - / ) | ( cd /backup/root ; restore -rf - )
( dump -0f - /var ) | ( cd /backup/var ; restore -rf - )
( dump -0f - /usr ) | ( cd /backup/usr ; restore -rf - )

umount /backup/root
umount /backup/var
umount /backup/usr

tunefs -n enable /dev/ad2s1a
tunefs -n enable /dev/ad2s1d
tunefs -n enable /dev/ad2s1f 

#eof

Restart in single user mode, run this commands:

# fsck -p 
# mount -u / 
# mount -a 
# swapon -a 
# adjkerntz -i

Now run the script you created, wait forever.... now you have "cloned"
your original hard disk. Remove second hard disk, install on new
machine, and it should start. Edit some files: rc.conf, hosts, etc
thats it.

This can also be used to change/backup hard disk.


More information about the freebsd-questions mailing list