Automating Operating System Configuration
In an environment that includes a central network information
(NIS) and a network file system (NFS) server that attends
desktop clients, a script can configure the client workstations
efficiently, uniformly, and reliably. The install_client
script I present here automatically sets up UNIX workstations
in a local area network. After you've loaded an operating
a workstation from a CD-ROM installation, you can run
configure the workstation for network operation.
CD-ROM Installation of Operating System and Commercial
The procedure for loading UNIX from CD-ROM to the system
from platform to platform. Most manufacturers offer
some type of standard
partition table and collection of filesets which constitute
installation. However, there are a number of options,
so it's good
practice to keep field notes regarding the decisions
you make during
the install; you can then simply repeat those steps
for all subsequent
installations on clients of the given model.
A consistent CD-ROM installation process within a given
that the same files and directories will reside on the
for each workstation (a prerequesite for the install_client
script). The volume of the standard operating system
a minimum size requirement for the internal hard disks
in the computers,
which act as system disks. For smaller disks, you can
to a larger size, or reduce the number of files to be
Most UNIX operating system vendors also sell compilers
tools and other application programs which they hardwire
edition of UNIX. These programs, which are integrated
into the operating
system after the CD-ROM installation, change or add
to the operating
system files and directories and affect its operations.
Hewlett Packard's Softbench installs itself into /usr/softbench
and overrides many of the actions of HP-VUE, the HP
environment, which resides in /usr/vue. After Softbench
installed, the VUE environment is driven by the files
rather than /usr/vue. Using an automated script to configure
workstations requires a specific arrangement of files
on the system disk. For the install_client system to
add-on programs must be implemented immediately after
system has been loaded and are then treated as if they
were part of
the default operating system installation.
Manual Installation Preparation Steps
Certain steps in installing the operating system must
manually. If, for instance, a site prefers xterms over
or the C shell over the Bourne shell, or if there is
a need to adjust
the Delete key's actions on the computer's keyboard,
the initial root
environment has to be set up accordingly. Most computers
the ifconfig setting for the network cards to function
Also the proper entries for the default route need to
Usually, workstations get defined as NIS clients during
system installation. On some platforms, however, the
NIS client setup
entails turning on certain flags from the root account
after the primary
installation has been completed. The NFS system must
and the flags and states that turn a workstation into
client must be initiated. The workstation then needs
to be rebooted
to begin functioning as an NIS and NFS client.
Once the correct environment has been established, the
functioning properly, and the flags and states to turn
into an NIS and NFS client have been turned on, the
can take over. You initiate the process by ftping the
script to the workstation, preferably to the /tmp working
area. The script must be set to be executable. After
the reboot, it's
a good idea to make sure that NIS and NFS automount
are indeed working.
That done, the install_client script is ready to be
The install_client procedure relies on data that resides
the file server. Before the main loop can begin, install_client
needs to establish access across the network to the
part of the file
server which holds the maps and modifications used to
operating system. To illustrate: if the files that the
are in the /usr/local/adm/clients subdirectory, then
must be created in /usr to point to it.
A map called ic.txt outlines the changes to be made
operating system. It uses the same type of format conventions
UNIX /etc/passwd file. Figure 1 lists the fields of
map and shows examples of their use. install_client
fields as parameters for the commands that turn a standard
operating system into a client workstation. Special
you to safely edit the ic.txt map file. They are similar
nature to Solaris's useradd, usermod, and userdel
instructions, which manage the /etc/passwd and shadow
A directory named lib, in the client's data area, holds
altered version of files from each separate operating
For instance, if an inetd.conf file is configured to
connections through a TCP/Wrapper, then the updated
the inetd.conf file should be kept in the lib subdirectory.
Every release of an operating system has a different
dedicated to storing its files in the client's area.
A link to the
latest version of an operating system maintains access
to the most
current version that is used by the install program.
client versions must be prepared specially by changing
the link back
to an older version. Figure 2 shows how the lib subdirectory
of the client's data area can be organized.
Using the ic.txt map to prepare workstations requires
administrators to keep track of variations in the operating
As alterations occur to the operating system, the updated
be copied to the install_client staging area. In practice,
the ic.txt map and associated records serve a dual purpose:
new nodes on a network, and they often help quantify
have been made and where to the many UNIX workstations
that act as
The uname command seems to have standard usage across
many flavors of UNIX. It enables a program to figure
out the exact
identity of the computer and the version of the operating
it is running. A number of environment variables can
from the output of the uname command. Then a path must
generated which best utilizes the resources of the particular
A unique time stamp must be generated once the location
of the date command is known. The time stamp is appended
to all saved
files during the main loop. It allows install_client
run multiple times without overwriting or destroying
Previous renditions of a file or directory are moved
to a copy with
the same name and a distinct suffix.
Automated Core Installation
The tasks required to install a client workstation can
in several categories. Custom actions must be run before
the main loop. Directories must be constructed. Files
must be created
or copied. And links must be implemented. The order
in which these
tasks must be done constitutes the structure of the
script, in Listing 1.
Several steps must be taken before the main loop begins.
statement guided by the platform on which ic is running
which actions must be taken. For example, sendmail must
stopped before the install_client process begins, because
you cannot copy a preferred and secure UC Berkeley sendmail
binary into /usr/lib while sendmail is up and running.
The main loop creates directories, files, and links.
The main loop
interprets each record of the ic.txt map file and takes
appropriate steps to implement them, one by one. A log
on the screen as the respective directories, files,
and links are
created in the operating system.
After the main loop finishes, various procedures get
a switch statement controlled by the platform on which
ic is running
determines which actions must be taken. For example,
on the HP-UX
platform, you might want to create a /dev/rscsi device
the aid of /etc/mknod so that users can listen to compact
discs on their workstations.
Manual Post-Installation Steps
Depending on the operating system being initialized,
operations may need to be performed after the ic program
For instance, a custom kernel rebuild or special patches
may be required.
These steps may not be lend themselves to being automated
and so should
be done separately from the install_client script.
After the installation process is completed, the machine
rebooted again. When the machine becomes available,
users should be
able to login and use their accounts on the client workstations.
special features of the computer are in place. The desktop
has been fully furnished with all of the standard amenities.
process normally takes approximately one to two hours
of system administration
time, including data loading from media, per node. Since
most of the
phases of the process are automated, this installation
offers greater reliability and efficiency for setting
up nodes in
a client/server environment than manual construction
About the Author
Jack Tuszynski is a System Administrator and Programmer
NASA's Jet Propulsion Laboratory (JPL), Advanced Multimission
Technology Group (AMST). He has administered Vax systems,
UNIX workstations for ten years. He holds a Master of
Science in Computer
Science degree from California State University, Northridge.