This chapter gives some overview information about installing Linux over a network. All examples and information here can be considered generic between different Linux distributions. If you want more specific information for a particular distribution then please read one of the following relevant chapters.
The following is a list of advantages and disadvantages of installing Linux over a network and the automatic installation features available with many distributions of Linux. The list is in no specific order:
This section briefly compares the differences between automatic (or unattended) installations with the more common manual installations available. This should give you a good idea of which system is right for your usage.
Automated or unattended installation is probably less used and less well known for installing systems than manual installation. This instantly gives rise to the challenges of trying to educate people about what it is and how to use it. Once you understand the basics of networked installation then automatic installation is a natural next step to take when installing and configuring your systems.
Automatic installation has the major drawback of a longer setup period required at the start of your process. This is to set up the install server (which you need to do for any network install environment) but you must also make up one or more configuration files for your install client to read. It is this setup time and slight added complexity that you must weigh up before deciding whether to do manual or automatic installations. Basically, as a rule of thumb, the more machines you have to install, the more time will be saved by using automatic installation techniques.
Automated installations are very easy to perform once you have the initial setup completed. You boot your client system in any way shape or form you like (usually by floppy disk) but you also provide access to your configuration file to the client at install time (usually either on the floppy disk or over the network connection). The configuration file contains all the required information that your client will need for installation, from what mouse/keyboard to use right through to the packages that you want installed on your system.
Another large bonus point of using the automated installation techniques is that most Linux distributions also provide means to add customised packages to the system at install time. This means that you can install packages that are not provided by the particular Linux distribution you are installing. There are normally also further configuration steps available such as the ability to write scripts for your installation that will get performed before, during, or after the install is complete. This all adds up to providing much faster installation of a complete system that is already setup in a customised way for your particular environment.
This is the method of Operating System (OS) installation that most people are used to. Commonly we install our base OS using CDROM disks and boot from CDROM or floppy disk before proceeding through a program of menus that allow us to customise certain options. This is probably the greatest benefit of Manual Installation i.e. most people are familiar with the process. However, it can bring other benefits too such as a quick/easy/simple installation and this method of installation is used more (therefore tested more) than other methods of installation so it might just be more reliable too.
The problems with manual installation come when you update your system very regularly, you are installing a large number of systems, or you want to have a particularly customised setup. Manual installation will not allow you to add extra programs to your OS at install time, you will have to install the OS then boot it before configuring the programs you want in the way that you would like. Also, this method can be quite time consuming if you are installing lots of systems, particularly if you only have a few sets of CDs.
Manual installation can still be done using a networked install environment. You can do this on any compatible OS that allows you to boot your client machine ready for installation before loading your network drivers and contacting your install server. All the data that would otherwise have been copied from CD images is now sent over the network instead.
You do not require any special hardware in order to install Linux over a network in either manual or automated mode. The basic requirements are:
Some examples where you might require specific hardware may be if you have a specialised network or if you need to attach more storage to your server, for example. In the example of attaching storage to your server, it does not matter in any way to the installation process where the install image is held, it can be on a local hard disk, in a RAID array, on a distributed filesystem or anywhere that the server machine can access reliably and quickly.
It goes without saying that if you don't have a network or your network is unreliable or slow then do not attempt network installations as they may fail or take a very long time to complete.
You will require a basic understanding of some of the services that run on a Linux based machine in order to setup your install server. These are services that make your install image available over your local network to the client machines that you want to install. In addition you will also need basic Linux administration skills in order to set up and maintain your server well.
Most Linux distributions have a network installation method that makes use of between one and three methods of transferring data cross a network. These services may or may not have an impact on the installation you are going to perform at the client end. The differences between the services will depend on the Linux distribution you are installing and any distinctions that this distribution makes between these services.
The three data transfer services are NFS (Network Filesystem), HTTP (Hypertext Transfer Protocol) and FTP (File Transfer Protocol). Each of these services is slightly different in the way that it operates, the function that it is designed for, and the way that you administrate it. Basic guidance is provided throughout this HOWTO about what these differences are but you are recommended to familiarise yourself with each of them so that you can manage your system responsibly and make informed choices about the services that you run.
This section gives a brief run down of setting up an install server for a 'general' Linux distribution. The terms and theory here are as general to all Linux distributions as they can be and are designed specifically to give you a very quick overview of what network installations involve. If you want to perform network installations on your own machines then you are advised to read the relevant sections of this HOWTO in full. If the HOWTO does not contain a section for the distribution that you want to install then you can either change the distribution you are installing over the network to match the HOWTO or use the following as a very rough guide on how to do it.
This section explains how to set up your server machine to be an install server for a generic Linux distribution. For most distributions you can use any other distribution as the install server. For example, you can install Redhat over your network using a server installed with SuSE.
This guide starts from the point where you have a machine installed with Linux which is already up and running and connected to your network. If you require help with installing Linux on your server then please consult the Further Information section of this HOWTO in Appendix A.
In order to set up an install server you will need to put on all the required data that will be needed to perform a full installation of the Linux distribution you are going to serve. For example, if you are used to installing Linux using CDs then you will need space on your server to copy ALL the contents of each CD onto your server.
So, before you even think about setting up your machine as an install server, you must check that you have the required space available. This sounds like a trivial thing to check but it is very important and easily forgotten when you're setting up.
A guide for the amount of space that you will require will be the amount of space on your install media that you are intending to copy from later. This might be one of the following approximate examples:
You will need the appropriate amount of space available to your system on some local filesystem. It does not matter what form this takes, whether it's a RAID device, local disk (either SCSI or IDE), etc. Ensure that the space you intend to use is formatted with your chosen filesystem and is mounted.
You can check this space with the command:
df -h
If this output shows you have enough space to copy your install media then great, you can continue installation. If not then it's time to think about an upgrade to your intended server machine!
Once you know you have enough space available it's time to start copying your install media to your chosen filesystem and directory. This might involve copying the entire contents of all your CDs to one install directory on your server or copying the data over the network by some method, etc.
Time to make your install data available to other machines on the network. Most distributions allow installation over the network using NFS, HTTP and FTP protocols. You can select which of these will be used at install time on the client. If one of the services is not setup on the machine then it will still be available for selection by the client but the install will not work. Therefore, it is either best to enable all three services on your server (so they all work on each client machine) or if you don't enable all three then advertise the fact very well and say which service should be used for your particular install server.
To install over NFS you need to meet certain conditions on the server:
To export your install directory edit the /etc/exports
file and add an
entry for your installation target directory to it. If you are not sure about
exporting filesystems then see your man page for the exports file at
exports (5).
To install over FTP you need to allow FTP access to the directory that you have setup on the server as the installation directory. This can be either anonymous FTP access or access through a named account with a password. Anonymous access is probably best unless you have a reason to protect your install server via a password.
If you want anonymous FTP to point to a different directory then you can use sym links to point to the directory that you have set up as the install directory on the server. This will allow FTP into a chrooted environment but still give you access to the install images in a different location.
If you have a web server running and want to enable HTTP access to your install server then add sym links from your document root to the install server directory and this will grant access. If you are not familiar with web servers or are not comfortable with this approach then leave out HTTP access from your install server as it provides no benefits over NFS or FTP installs which may be simpler to set up.
If you do choose to use HTTP then basically all you have to do is make the install directory visible to your web server by making it appear under the document root by some means.
You have now completed the basic setup of your install server. Different distributions will grant you different options for further customisation techniques of the installation process. The most commonly found customisation is the option to install packages that do not come as standard with the distribution you are installing. However, there may be further customisations you want to do on your particular server or that are available for your particular Linux distribution.
This section gives a brief run down of setting up a client machine using your install server. The terms and theory here are as general to all Linux distributions as I can be and are designed specifically to give you a very quick overview of what network installations involve. If you want to perform network installations on your own machines then you are advised to read the relevant sections of this HOWTO in full. If the HOWTO does not contain a section for the distribution that you want to install then you can either change the distribution you are installing over the network to match the HOWTO or use the following as a very rough guide on how to do it.
You only need to read/follow this section if you are intending to use an automated install process, if you intend to do a manual installation over your network then skip this section. Here we go through the process of creating configuration files that the installer will read in order to create the configuration of our client machines we are installing during an unattended network installation.
In order to start creating your config files you will need to install the relevant config file editor. Each distribution that is capable of installing in unattended mode over the network will provide some means of editing config files. Make sure you have these installed on some Linux machine that will allow you to create and save all the different configurations you might want to install on your network.
Once you have confirmed that you have the configuration program package installed, you can start to create configuration files. For most situations the basic configuration described here will be sufficient to perform your installations.
Start the configuration program that you have on your system. In most cases, you will now be presented with a window that allows you to configure most of your installation options as if you were installing a new machine or performing an upgrade. You can proceed through each menu, configuring your options for a particular system or set of similar systems that you wish to automatically install.
Once you have progressed through each configuration screen, you are ready to save out your configuration file to disk. Click the save button and choose a location on your system to store configuration files. If you are creating lots of different configurations then it might be worthwhile creating your own configuration repository - don't forget to name the files sensibly so you know which is which.
Before attempting advanced configuration please make sure that you have first created a valid basic configuration file as described above. It is perfectly possible to create your own configuration files from scratch but it is far easier to use the tools provided to do the job for you!
Once you have your configuration file saved, you can open it in your favourite text editor. You can use or modify any of the existing tags in your file, just so long as the tags, options, and syntax you use are legal. Once you have edited the file manually then save it back out in text format again. The best use of editing the configuration file manually is probably for adding your own customised packages to the installation.
The most common method of booting a client ready for installation over a network is to use a floppy disk.
dd if=your-file.img of=/dev/fd0
Don't forget that some distributions will allow you to boot from other media as well as floppy images to perform network installations. Also, each distribution normally has a set of extra boot options that you can use if the above method does not work on your hardware. These extra configuration options are normally for less common hardware but are provided to make sure you can perform network installs.