Automatic installation

If you have a lab full of machines, or you have a number of machines that need to be set up with the same configuration (eg: you are building firewalls), you might be interested in a method of automatically installing machines.

RedHat Linux & derivatives (RedHatEnterpriseLinux, FedoraCore, CentOs)

Automatic installs on Red Hat are made very easy by the fact that RPMs do not ask you question when they are installed. Red Hat policy is to shoot first and ask questions later; if a file is going to be overwritten, a new file (file.rpmnew) is written in its place.

The 'standard' way to do a Red Hat automatic install is with KickStart. This is a feature that allows you to run ksconfig(8) and generate a configuration file that you can put on a floppy or the network. You then boot a system into anaconda (the Red Hat installer), have it automatically pick up an IP address by DHCP, mount a share for files and start installing based on the configuration file you built with ksconfig.

Debian and derivatives (ie. Ubuntu)

Since Debian replaced bootfloppies with debian-installer in Sarge, you have been able to pre-seed questions in an installation, in the same fashion as a Kickstart file. The best source of information is the Debian Installer manual - note the changes at the bottom of the file between sarge/warty-breezy and etch/dapper-onwards. There is also a section on automatic installation in the Debian manual, and a sample preseed file

You can use the preseed file manually, specified on the CD boot command line, via floppy/network, or you can burn it to the CD for a totally automated installation. See UbuntuRemastering for information on this.

FAI (Fully Automated Installation) is another system for doing lots of similar installs off an NFS server.

Manual "automated installation" of a Debian system

If you are quite happy to do a base install of Debian manually (which is pretty quick), and just want to restore a system to the state it was in:

apt-get install debconf-utils
dpkg --get-selections | gzip -9 > $BACKUP_DIR/dpkg-selections
debconf-get-selections | gzip -9 > $BACKUP_DIR/debconf-selections

Then, on your freshly installed system, you can do:

debconf-set-selections < debconf-selections
dpkg --set-selections < dpkg-selections
apt-get -u dselect-upgrade

This will install all the packages you had installed on the previous system, and preseeds the answers to al of the debconf questions you would otherwise have been asked.

Cross distro (Debian, SUSE, Fedora, Ubuntu)

InstaLinux asks you some questions about your network and then builds you a small downloadable automatically-installing CD boot image.

This page is part of our LinuxInstallationNotes.