FAI the Fully Automatic Installation framework for linux
Posted by nevermind on Fri 9 Sep 2005 at 13:06
Here we're going to introduce a different approach for Debian installations, the Fully Automated Installation system (FAI). FAI is an automated installation tool used to install Debian on a cluster, or number of different hosts.
- DHCP means something to you.
- You know about networks.
- You have configured an NFS server at least once.
- It would also be advantageous to know something about the Debian installer.
So before you continue reading, make sure you know these things, or start reading about them first...
Let's assume you have got a Debian machine already running, and want to switch one or more other machines on a LAN to Debian.
The normal approach would be for you and your coworkers to fetch a set of Debian installation CD-ROMs, and setup each machine by hand which will probably take alot of time, (even when you use the pre-seeding to have the installation questions automatically answered).
There is a by far more elegant way to do this.
All you need to do is setup the FAI system upon your main Debian server. Install it by running:
aptitude -r install fai fai-kernels Reading Package Lists... Done Building Dependency Tree Reading extended state information Initializing package states... Done Reading task descriptions... Done The following NEW packages will be automatically installed: binutils debootstrap dhcp3-server mtools nfs-kernel-server rsh-server syslinux tftpd-hpa Do you want to continue? [Y/n/?]
Just answer the question with "Y" and it will fetch the set of packages for you. (If you prefer you can use "apt-get install fai fai-kernels").
After the installation finishes, you have to follow some configuration steps:
First of all, edit the main configuration file to fit your needs, it may be found in the directory /etc/fai, and is called fai.conf.
See the documentation for a full list of the available parameters.
The documentation also gives information on how to setup a local Debian mirror, which might come in handy.
The next step is to edit the file /etc/fai/make-fai-nfsroot.conf to point to the desired location of the NFSroot for your installations.
After you have finished the above steps, just run fai-setup.
The most important lines that fai-setup echos are the following:
make-fai-nfsroot finished properly. <= * FAI setup finished. <= *
Of one or other of these aren't shown then something went wrong, so you should check your current setup to fix it.
The next thing to do is to restart your NFS server, then your FAI server should be complete.
Now we go on to create our client configurations, examples may be found in /usr/share/doc/fai/examples/simple/.
Again a full list of possible options and possibilities for the client configuration may be found online:
There are three possible options on how to boot your clients into their setup:
- network boot
- floppy boot
- CD-ROM boot
If possible, you might want to go for the first one, as it includes the smallest amount of time and effort.
there is one thing you might wanna take care about, your FAI client user has to have write access to /boot/fai
For more information on booting the clients the chapter on booting clients in the documentation.
Under point 3.2 you will find the info for network booting with PXE.
If you go this route you will need to add the MAC Address of your client to the FAI server's dhcpd.conf. Then you can just run:
fai-chboot -IFv demohost
As soon as the installation finishes, you may login as your defined user or root user with the password "fai".
That is pretty much all there is to it!
Note: the whole thing might sound complicated, but if you want to setup alot of clients, it is going safe you a lot of time.
I hope you enjoyed it as much as I did.