Chapter 30

Setting up an Installation Server
 

 
 
In this chapter:
 
 
* Benefiting from an installation server
* Copying the SuSE CDs into a central archive
* Setting up NFS and FTP to allow access to the installation source tree
* Performing an installation from scratch with the installation server
 
 
 
The SuSE installation scheme is fairly straightforward. This book doesn't cover the normal installation, yet there are some aspects of installing SuSE Linux which are worth discussing in an advanced users manual.
 
In this chapter, we will see how to set up an installation server for SuSE Linux. Installation servers are particularly useful when you must maintain a large network of Linux machines. If you maintain a small network, setting up an installation server may not be worth the effort and disk space required.
 
NOTE An installation server gives you the ability to install or update machines without the need for handling CDs. This means you can start an installation and run it automatically until all packages are installed.
 
 
The basic component of automatic installation is a server that has all needed data available for the installation clients. SuSE supports two ways of installing programs over the network. One is via FTP (File Transfer Protocol), the other is the NFS (Network File System). We'll walk through how to set up a server with both installation methods.
NOTE Using a network server as an installation medium is probably the most well tested method. Network installations are a common part of SuSE's ongoing development. A network-based installation source results in faster turnaround time than burning a set of CDs for testing. Don't be hesitant to use this feature. If you have a number of machines to install, you will soon appreciate this method.
 
 
30.1 Copying the five CDs into a single tree
 

Obviously, the first step is to gather all SuSE CDs into a single installation source tree. Start with CD1, which will need some special handling. In the root directory of CD1, you'll see a number of subdirectories. Table 31-1 gives an overview of the structure of SuSE's CD1.
 
 

Table 30-1 Top-Level Subdirectories on SuSE's CD1
 
Directory Contents
disks Images of boot floppies
docu The SuSE manual and some general howtos
dosutils Some useful utilities as DOS binaries
full-names SuSE packages in long-name version (not crippled to 8.3)
rr_moved Empty
setup Help and menu texts for DOS installer
support Templates for support requests
suse The main installation tree
unsorted Miscellaneous packages and documentation
  With the exception of full-names and the empty directory rr_moved, it's a good idea to copy everything. You may need to create a boot floppy from one of the images in disks, or look up something in the docu directory. The directories setup and suse are mandatory for the installation process. The templates in support are handy if something goes awry.
 
Besides the directories, there are some additional files in the CD's root directory. They are listed in table 31-2 .  
Table 30-2 Top-Level Files on SuSE's CD1
 
File Content
ARCHIVES.gz Meta Index of all CDs (see text)
COPYING GNU General Public License
COPYING.tex GNU General Public License (LaTeX format)
COPYRIGHT Copyright notice (German)
COPYRIGHT.yast YaST and SuSE Linux license terms
ChangeLog SuSE's change log
INDEX.gz File index of all CDs
LIESMICH Last minute information (German)
LIESMICH.DOS Last minute information (German, in DOS format)
README Last minute information
README.DOS Last minute information (in DOS format)
ls-lR.gz File index of all CDs ('ls -lR' output)
setup.exe DOS installer
setup.mnu DOS installers menus
 
 
TIP The only mandatory files here would be the DOS setup related files. I recommend that you copy all files. The only one you may consider not copying is ARCHIVES.gz because of it's size, which is about 3.5 mega bytes. Even though it's a bit hefty, this archive file is great on hand if you have to search for a special file on the CDs. It contains the contents of all the archives across all CDs. For example, if you want to know which package a specific file is in, you'd simply search for it in the ARCHIVES.gz file.
 
 
One file you'll see on the CD is missing in this list: TRANS.TBL. This file is found only on CD-ROMs and only needed on the ISO9660 file system. It contains a translation table from short to long names and is in every directory on the CD. There's no need to copy it to the hard drive. In fact, once we're done copying the CDs, we will remove all TRANS.TBLs from each directory.
 
And one file you don't see with by doing a regular ls has also not being mentioned. The CD version and number mark. If you issue the command ls -a in the CDs root directory, you'll see the file .S.u.S.E-disk-001.1999041916. This file us used by YaST to determine which CD is in the drive. It's mandatory that this file is copied to the installation directory.
 
Now that you know what to copy, you have to know where to put it. Since we want to allow installation via FTP and NFS, the installation tree should be within the FTP server's file hierarchy under /usr/local/ftp/pub.
 
NOTE We'll take /usr/local/ftp/pub/SuSE-6.1 as root for the installation source tree. You can change if you'd like, but keep in mind that the commands and everything else shown in the following instructions use this as the path for the installation tree.
 
 
OK, enough talking, let's have some action! First we create the target directory:
 
 
# cd /usr/local/ftp 
# mkdir -p pub/SuSE-6.1 
 
 
CAUTION In the directory /usr/local/ftp you should already have the subdirectories bin, dev, etc, lib, msgs and usr which are needed for anonymous FTP access. If not, install the package ftpdir (A sample "FTP configuration") from the network series (n) to get them. Anonymous FTP won't work without it.
 
 
Now we copy everything we need from CD1 to this directory:
 
 
# mount /cdrom 
# cd /cdrom 
# cp -v A* C* I* L* R* setup.* ls* /usr/local/ftp/pub/SuSE-6.1 
# cp -av d* setup support suse unsorted /usr/local/ftp/pub/SuSE-6.1 
# cp -v .S.u.S.E-disk-* /usr/local/ftp/pub/SuSE-6.1 
# cd / 
# umount /cdrom 
 
 
You see we assume you mount CD1 to /cdrom and change to this directory. The used wildcards will copy all the files we talked about earlier to /usr/local/ftp/pub/SuSE-6.1.
CAUTION Before you copy the files, make sure that you have enough disk space available. For all five CDs, you'll need about 3.2 gigabyte of free disk space.
 
 
TIP At this point it's a good idea to think about a separate partition for the FTP server's file tree. This way you don't risk filling up your root or /usr file system while copying files into the FTP tree.
 
 
Once the first CD is copied, we can go on with the remaining CDs. You'll find the files INDEX.gz and ls-lR.gz on each CD. They are exactly the same as those on CD1. There is no need to copy them again or keep different versions of those files. Only two subdirectories are on CD2 through CD5, suse and full-names. Again, we can omit the full-names directory and copy only the suse directory. As we want to merge the CDs in our archive, we don't create a new directory, only copy it into the existing tree. The subdirectories of suse are different on each CD, so there is no risk of over-writing anything.
 
Our installation is the same procedure for CD2 through CD5, meaning mount the CD and copy the directory suse into our installation source tree:
 
 
# mount /cdrom 
# cd /cdrom 
# cp -av suse /usr/local/ftp/pub/SuSE-6.1 
# cp -v .S.u.S.E-disk-* /usr/local/ftp/pub/SuSE-6.1 
# cd / 
# umount /cdrom 
 
 
Earlier we talked about the TRANS.TBL files and saw that these files are only important for the ISO9660 file system on the CD-ROM. As a last step, we want to remove those files from the installation directory:
 
 
# find /usr/local/ftp/pub/SuSE-6.1 -name TRANS.TBL -exec rm {} \; 
 
 
The installtion tree is now complete and we can get on to the business of using it.
30.2 Using the installation server via FTP
 


 
When all CDs are copied, you're nearly up and running. In fact, the installation via FTP should already work. If your FTP server is active, simply connect a client machine in your network and select FTP as the installation source (Installation from an FTP site in YaST). For the server name you enter the name or IP number of the machine you copied the CDs to and as server directory you'll use /pub/SuSE-6.1. After you press F10, YaST will check if this is a valid installation source and download a couple of index files for later use. After this is done you can go on and change your configuration by adding or removing packages just as you would if you'd used a CD in the local CD-ROM drive.
 

NOTE You will notice that you get additional messages about downloaded packages during the installation. This shows that the installation was actually done via FTP.
 
 
30.3 Using the installation server via NFS
 

To install using the NFS as the network protocol, you have to allow you clients to have NFS access to the installation source tree. We saw in chapter 20 how to set up a NFS server. All you have to do is to edit the file /etc/exports and add the directory /usr/local/ftp/pub/SuSE-6.1 to the exported file systems. A line like this will do the trick for all machines in the domain simpsons.com:
 

 
/usr/local/ftp/pub/SuSE-6.1     *.simpsons.com(ro) 
 
 
NOTE The NFS server has to be restarted in order to register changes in the exports file:
 
 
# /sbin/init.d/nfsserver restart 
Shutting down NFS server                                 done 
Starting NFS server                                      done 
 
 
 
Now test the NFS installation by selecting NFS (Installation cd via NFS) in YaST. Again, the NFS server is the machine you copied the CDs on and which exports the installation source tree. As SuSE directory on the server you enter /usr/local/ftp/pub/SuSE-6.1/suse. YaST runs another check to see if the source medium is valid. Try to add some packages to your machine to see if it works.
 
30.4 Installing from Scratch Using the Installation Server
 

So far, we've seen how to use already installed machines with the fresh installed server as installation source medium. In this section we will start a network based installation from scratch.
 
To do this, boot the new machine using either the SuSE CD1, or the boot floppy shipped with the SuSE distribution. In Linuxrc, enter your settings for language, display, and keyboard and load the modules you need for this machine. Most important at this point is the driver for the network card. Make sure you load the right module for your card.
 
Now go to the installation menu and select Start Installation and then Network (NFS) as source media for the installation. You will be asked if you want to use bootp for automatic configuration. Select No. Now enter the IP address of this machine. The next two questions are about netmask, gateway, and name server. Enter the referring values in the forms. Now Linuxrc asks for the address of the NFS server. This is the address of our installation server. Enter it. The last form asks for the SuSE directory on the server. In our case this is /usr/local/ftp/pub/SuSE-6.1 just like in the example above.
 
Now Linuxrc should mount the directory, load the boot system into the RAM disk and power up YaST. From this point there is now difference between the regular installation from CDs and the network based installation over NFS.
 
 

Summary:
  For installing more than than a few machines it makes sense to set up a network installation server. It makes handling CDs obsolete and guarantees that the installation procedure will run through without the need to constantly change CDs.
 
In this chapter we saw how easy it is to set up such an server. Copying the CDs to the local disk of the server and setting up FTP and/or NFS to make this directory hierarchy available on the network are the basic steps you have to do.
 
In some short examples we saw that using the server for updates or new installation is pretty much the same as the conventional method where CDs on the local machine are used.
 
--
Back Up Contents Next
--

Copyright (c) 1999 by Terrehon Bowden and Bodo Bauer
To contact the author please sent mail to bb@bb-zone.com