# deploying FreeBSD to many workstations advice



## lifanov (Jan 28, 2010)

I run a mixed network with a few FreeBSD servers on it, but soon will be a good time for me to reinstall some (~40) workstations and for several reasons I prefer them to run FreeBSD over Arch Linux (what they run now).
With Arch I could configure one perfect workstation and clone it with Clonezilla SE, which would have to do a sector copy for UFS, which would be slow.
This won't be my first time setting up a FreeBSD workstation, but it will be my first time setting up many.
What are some of the quicker ways to install FreeBSD and configure it on many workstations at once?
I would appreciate any advice.


----------



## francisco1844 (Jan 28, 2010)

There are a few options depending on how much time you want to spend on your "build".
You could create scripts for sysinstall, you could do a base install and have packages and configuration for the apps you will use, you could use a program to create an image and use the image to set the other machines.

I suspect a combination of a small sysinstall script and a tar file with the packages you want will be something you can do relatively quickly and that can automate a good part of your task.

Will all the machines do the same?
How much time do you have to spend on your "build" if you have say at least a day you could likely get a decent starting point and improve it as you install it on new machines.


----------



## lifanov (Jan 28, 2010)

Hello.
Thanks for your reply.

I will have two days for everything and the machines are, thankfully, the same.
What I didn't tell you is that I also have a pxeboot server that I have a small Linux image on for system rescue.
I thought about installing one system properly (distcc to speed things up), exporting root through nfs, and have my pxeboot image mount the nfs share, partition the first hard drive, and copy the files from the nfs share over automagically through a runlevel script.
Then I just need to change hostnames and regenerate ssh keys.
What bothers me about this idea is the terrible slowness with which the pxeboot clients will pull files from a single nfs share.

I would rather not even go through sysinstall. I have nothing against it, but it glitched out on me several times in the past and left me not liking it.
You gave me an idea of tarring up the one good filesystem and untarring it where I want it, which will probably be cleaner than copy and take care of the configs. The two big config considerations are openldap authentication with nss_ldap and mounting the old user homes (nfs) at boot.

I would rather automate as much of it as possible even if it does take extra preliminary work because this work might become useful again in the future.


----------



## vermaden (Jan 28, 2010)

@lifanov
g4u (ghost for unix) with FTP server (create one image, spread on many).

That way you can install all needed software on one system, and then spread it across all the others.


----------



## SirDice (Jan 28, 2010)

For future updates I would suggest reserving a box. On that box you can pre-build all the ports you need. Building from source has the benefit of being able to add/remove options. Package everything on that server and export the package directory. Use it to update the software on your workstations. Similarly you could also setup your own freebsd-update server.


----------



## lifanov (Jan 28, 2010)

@vermaden
Thank you. g4u is exactly what I was looking for; it will make my life a whole lot easier.

@SirDice
I was going to have a shared ccache over nfs and I have a caching web proxy to avoid re-downloading source, but I do have an extra machine to act as a package server. Thank you.


----------



## vermaden (Jan 28, 2010)

lifanov said:
			
		

> @vermaden
> Thank you. g4u is exactly what I was looking for; it will make my life a whole lot easier.



You are welcome.



			
				lifanov said:
			
		

> @SirDice
> I was going to have a shared ccache over nfs and I have a caching web proxy to avoid re-downloading source, but I do have an extra machine to act as a package server. Thank you.



If you want to have shared *ccache*, then check *distcc*:
http://distcc.samba.org/


----------



## Ruler2112 (Jan 28, 2010)

I do the same thing in my company, though for windoze.  I use dd to image the first 10 meg of the drive (partition table, file system descriptors, FATS, etc) from a file, fdisk /dev/sda and w right away to update the partition table in memory, and then use partimage to restore each partition from separate images I built of a cleanly installed/tweaked box.  XP requires an extra step resetting the product key and re-activating because of the hardware change from the box I built the image on, but it's otherwise very efficient.  (Instead of spending 6-7 hours installing windoze and all the applications we use in our company, it takes literally 10 minutes and I'm 100% that it has everything installed that we use.)  I use the gentoo based system rescue CD, but it shouldn't be too difficult to set up to run over the network.


----------



## J65nko (Jan 28, 2010)

You can script or automate [man=]sysinstall[/man]





> RUNNING SCRIPTS
> The sysinstall utility may be either driven interactively through its
> various internal menus or run in batch mode, driven by an external
> script.  Such a script may be loaded and executed in one of 3 ways:


This is the first option mentioned by *francisco1844*:


> You could create scripts for sysinstall



But some people just prefer to do something as described in FreeBSD Install Without Sysinstall
The recent guide posted by Mr.Vermaden to do a combined UFS/ZFS install uses this approach:http://forums.freebsd.org/showthread.php?t=10334


----------



## lifanov (Jan 29, 2010)

@Ruler2112
Check out http://www.drbl-winroll.org/
It's very quick and very automated.
Also, XP installs in 5-6 minutes under Xen (NetBSD as dom0) and works much faster than on real hardware.

@J65nko
I run FreeBSD on ZFS on two storage servers, which made me prefer the method of installing without the sysinstall.


----------

