old-www/HOWTO/Network-Install-HOWTO-3.html

449 lines
20 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
<TITLE>Network Install HOWTO: Quick Guide </TITLE>
<LINK HREF="Network-Install-HOWTO-4.html" REL=next>
<LINK HREF="Network-Install-HOWTO-2.html" REL=previous>
<LINK HREF="Network-Install-HOWTO.html#toc3" REL=contents>
</HEAD>
<BODY>
<A HREF="Network-Install-HOWTO-4.html">Next</A>
<A HREF="Network-Install-HOWTO-2.html">Previous</A>
<A HREF="Network-Install-HOWTO.html#toc3">Contents</A>
<HR>
<H2><A NAME="quickguide"></A> <A NAME="s3">3. Quick Guide </A></H2>
<P>
<!--
network install!Quick Guide
-->
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.
<P>
<P>
<H2><A NAME="ss3.1">3.1 Advantages &amp; Disadvantages</A>
</H2>
<P>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:
<P>
<P>
<H3>Advantages</H3>
<P>
<UL>
<LI>Fastest installation (on a good network)</LI>
<LI>Automatic configuration available (unattended installation)</LI>
<LI>Very quick installation of many systems</LI>
<LI>No need for physical installation media</LI>
<LI>Customisable installation with packages not available from the standard distribution</LI>
<LI>Once the install system is setup and working installations are very simple</LI>
<LI>Multiple system configurations available for automatic installation with different config files</LI>
<LI>Simultaneous installation from a single source</LI>
<LI>No need for an install media library, space-saving</LI>
<LI>Very easy to update</LI>
<LI>No problems with reading install media</LI>
</UL>
<P>
<P>
<H3>Disadvantages</H3>
<P>
<UL>
<LI>Slow installation (on a bad network)</LI>
<LI>Added complexity of installation</LI>
<LI>Time needed initially to set up an install server</LI>
<LI>Relies on network and connectivity</LI>
<LI>Uses network bandwidth</LI>
<LI>A server machine is required (expensive)</LI>
</UL>
<P>
<P>
<H2><A NAME="ss3.2">3.2 Automatic vs Manual Installation</A>
</H2>
<P>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.
<P>
<P>
<H3>Automatic Installation</H3>
<P>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.
<P>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.
<P>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.
<P>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.
<P>
<P>
<H3>Manual Installation</H3>
<P>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.
<P>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.
<P>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.
<P>
<P>
<H2><A NAME="ss3.3">3.3 Hardware</A>
</H2>
<P>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:
<OL>
<LI>That you have a server machine available to you that has enough storage
space on it to hold the install image that you want to transfer over the
network.</LI>
<LI>Ensure that this server is powerful enough to cope with the load that is
going to be placed upon it.</LI>
<LI>A network connection between your server and the client you want to
install.</LI>
<LI>A client machine with the appropriate hardware for the installation that
you are intending to do.</LI>
</OL>
<P>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.
<P>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.
<P>
<P>
<H2><A NAME="ss3.4">3.4 Software/Services</A>
</H2>
<P>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.
<P>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.
<P>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.
<P>
<P>
<H2><A NAME="ss3.5">3.5 Generic Server Setup Guide</A>
</H2>
<P>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.
<P>
<P>
<H3>Begin Setup</H3>
<P>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.
<P>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
<A HREF="Network-Install-HOWTO-10.html#AppendixA">Appendix A</A>.
<P>
<P>
<H3>Setting Up Filespace</H3>
<P>
<!--
network install!generic
-->
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 <EM>ALL</EM>
the contents of each CD onto your server.
<P>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.
<P>
<P>
<H3>How much space will you need?</H3>
<P>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:
<UL>
<LI>Number of CDs x 650Mb</LI>
<LI>Number of ISO images x 650Mb</LI>
</UL>
<P>
<P>
<H3>How much space do you have?</H3>
<P>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.
<P>You can check this space with the command:
<PRE>
df -h
</PRE>
<P>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!
<P>
<P>
<H3>Copy Installation Media</H3>
<P>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.
<P>
<P>
<H3>Enable Remote Access</H3>
<P>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.
<P>
<P>
<H3>NFS</H3>
<P>To install over NFS you need to meet certain conditions on the server:
<UL>
<LI>Your install directory is exported</LI>
<LI>NFS is installed and running</LI>
<LI>Portmap is running</LI>
</UL>
<P>To export your install directory edit the <CODE>/etc/exports</CODE> 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).
<P>
<P>
<H3>FTP</H3>
<P>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.
<P>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.
<P>
<P>
<H3>HTTP</H3>
<P>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.
<P>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.
<P>
<P>
<H3>Basic Setup Complete</H3>
<P>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.
<P>
<P>
<H2><A NAME="ss3.6">3.6 Generic Client Install Guide</A>
</H2>
<P>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.
<P>
<P>
<H3>Create Config Files</H3>
<P>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.
<P>
<P>
<H3>Configuration Program Installation</H3>
<P>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.
<P>
<P>
<H3><A NAME="genericbasicconfig"></A> Create A Basic Config File </H3>
<P>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.
<P>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.
<P>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.
<P>
<P>
<H3>Advanced Config File Setup</H3>
<P>Before attempting advanced configuration please make sure that you have first
created a valid basic configuration file as described
<A HREF="#genericbasicconfig">above</A>.
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!
<P>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.
<P>
<P>
<H3>Boot the Machine</H3>
<P>The most common method of booting a client ready for installation over a network
is to use a floppy disk.
<OL>
<LI>If you have not already created a boot floppy then do it now (you only
need to do this step once, when you have a boot floppy you can install as many
machines as you like with a single floppy):
<UL>
<LI>Locate the floppy image that you need to use.</LI>
<LI>Copy the image to your floppy disk (make sure you have one
inserted in the drive, but not mounted) using the following command:
<PRE>
dd if=your-file.img of=/dev/fd0
</PRE>
</LI>
</UL>
</LI>
<LI>If you are doing an automated install (with the config file) then you
should follow this step (otherwise skip to next step):
<UL>
<LI>Copy your config file to the root directory of the floppy</LI>
</UL>
</LI>
<LI>Insert your floppy disk into the client machine that you want to install.
Make sure that the floppy disk is in the boot list of your BIOS and turn on your
machine to boot from the floppy.</LI>
<LI>At the boot prompt:
<UL>
<LI>If you are doing an automated install then start the automated
process</LI>
<LI>If you're not using config files then press ENTER for the
default installation</LI>
</UL>
</LI>
<LI>Finish the installation.</LI>
</OL>
<P>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.
<P>
<P>
<P>
<P>
<HR>
<A HREF="Network-Install-HOWTO-4.html">Next</A>
<A HREF="Network-Install-HOWTO-2.html">Previous</A>
<A HREF="Network-Install-HOWTO.html#toc3">Contents</A>
</BODY>
</HTML>