Installing AIX
Bruce H. Hunter
IBM's AIX operating system is making its presence known
on RISC/6000
systems around the country, and UNIX administrators
need to learn
about it.
AIX is "POSIX compliant," which means that
it looks like UNIX
to the user, but underneath that user interface are
several major
differences and a lot of extensions. These differences
are hidden
from the user; for example, where the user sees an lp
or lpr
command, these commands are actually controlled by another
spooler
entirely, a versatile AIX spooler.
It's easier to describe AIX to UNIX administrators by
identifying
what it is not: it is neither UNIX System V nor BSD.
However, it is
innovative and many parts of AIX resemble UNIX. For
instance, unique
AIX configuration files maintain a certain consistency
through the
use of structures called stanzas, which are somewhat
reminiscent
of termcap and printcap.
This article describes a setup for a network installation
of AIX and
talks about some of its differences and strong points,
such as smit
(the administrator's front end), LVM (the logical volume
manager),
and ODM (the object data manager).
Installing AIX
The first step in RISC/6000 ownership is installing
AIX, by copying
off the OEM distribution. You may install by tape or
diskette, but
since a diskette installation takes a very long time,
a tape installation
works better for the first installation. The smaller
RISC/6000 systems,
like the 530s, are typically purchased without tape
drives, but it's
worth your while to have at least one with a QIC drive.
After the first installation is done, network installation
is the
quickest method. Although this method takes some care
in setup and
execution, it allows you to install a RISC/6000 system
in one and
a half to two hours.
To prepare for a network installation, you must take
an image of a
working system. The image doesn't have to be from an
identical machine
-- a 550 will do for a 530 image -- but the image must
be small
enough to fit. Most useful would be an image of the
most typical machine.
Creating an Image
To avoid replicating trash from machine to machine,
you want the cleanest
image possible. Therefore, ready the donor system by
cleaning out
all its trash -- /tmp, lost and found directories, the
log
files, printer and uucp spools, mail, and /var/spool/cron/crontabs.
Keeping in mind that you will be creating an image of
the entire system,
cut the system down to only the files needed (taking
an image from
a 560 to fit on a series of 530s, for example, will
require quite
a bit of pruning). To begin, remove all NFS-mounted
file systems.
If you have local user work areas, remove those as well.
Do a df
or a du to see if you have the image down to a size
that will
fit on donor systems.
Before taking the image, ask all users to log off and
tell them that
the system will be unavailable for an hour or so. When
everyone has
logged off, edit the rc file that controls nfs, /etc/rc.nfs,
by inserting a comment before the mount command. This
prevents
the system from mounting its NFS files.
#
#else
# mount -t nfs
#fi
sleep 5
As you spend time with AIX, rc.nfs will become
an old friend, so get to know its contents.
AIX shutdown is similar to a BSD 4.X shutdown (and unlike
a XENIX
or System V shutdown). Bring it down with a shutdown
-h for
a halt or a shutdown -r to reboot. The -F flag will
save more time by omitting shutdown messages.
If you brought the system down using the -h, -x, or
halt option, reboot using the yellow restart button
with the
front panel key in normal or run position. Those new
to RISC/6000 systems wil find this key disconcerting
at first, but
it's simply like the key to an automobile -- each position
has
a different meaning. Getting the key position right
is critical, as
you'll quickly discover if you try to boot a newly built
system from
the maintenance or the run position.
To prepare to create the image, clear out any pre-existing
image from
the area
/usr/work/inst.images/risc_sys6000/3.1
Here 3.1 is the current revision number. If an old image
file exists, it will be called bos.obj.backup. With
NFS mounts
disabled and the image area cleared, you are ready to
start. Initiate
smit with the startup option (not found on the regular
smit menu).
smit Startup
Moving through the menu options, take the backup
option and enter the path and file name
/usr/work/inst.images/
risc_sys6000/3.1/bos.obj.backup
The screen menu will display a message to back up the
system. Type or select the appropriate values in entry
fields, entering
a string at square brackets and toggling for yes/no
arrangements.
You toggle some smit items merely by selecting them;
others
you select with a tab. When you have made all necessary
changes, press
Enter.
It will take about 20 minutes for the command to execute
and create
the system image on disk. If it fails for lack of space,
it will tell
you to mount vol 1 on the /usr/work/inst.images/risc_sys6000/3.1/bos.obj.backup.
If all goes well, the command finishes and quits. You
then scroll
to the bottom of the smit screen to check all the messages.
Inexperience can trap you here, because smit writes
all sorts
of things at the bottom of its menus, assuming that
you know to scroll
to the bottom when you're done. Leave smit when you're
certain
all is well, uncomment your work in rc.net, and reboot
your
system.
You should now have an image you can use both for a
full system backup
and for a network installation.
The Installation
Gather the primary information that will be needed to
set up and complete
the net installation, such as the system's new name
and Internet number
and the Internet number of the system that will serve
the image; if
you have to go through a gateway, you also need the
Internet address
of that gateway or router.
As an example, this article sets up a machine called
tiger at
129.243.40.25. This system is on one of several subnets.
The
immediately necessary information for this image install
is:
image server: lion
internet #: 129 243.75.33
mask: 255.255.255.0
router: 129.243.29.100
Note that the mask is for a class B network with a subnetwork
part.
This is the information needed to get the new system
going. With the
infant 6000 wired and on the network, boot from the
special installation
set of diskettes. There will be two start diskettes
in addition to
the regular repair diskette. Boot to the first diskette
with the key
in maintenance mode.
Remember to switch full clockwise to service position
and then
power on. The RISC/6000 systems have a set of diagnostic
lights on
the front panel that give you direct alphanumeric messages,
but these
messages will be a bit confusing until you understand
the ODM. The
C messages will make a little more sense: two common
ones are are
C09 for reading and C07 for "load next floppy."
To start, insert the first floppy and wait for the C07
to tell
you to load the second diskette. The first two diskettes
will run
silently, with no screen display. When diskette 2 has
been read, the
system will tell you that you can now go interactive
and see what
you are doing. Hit the F1 function key, then an Enter,
and install the third (maintenance) diskette.
BIOS Installation
The third diskette loads the memory-resident BIOS, the
basic input
output system. The menu displayed at this point allows
you to do some
basic setup and prepare to read the image over the net.
First, however,
you must check the system's date from another system,
because you
will have to reset the system's date. Select menu option
3 (>>>3
settings) and you are ready to set up. Start by setting
the time
(option [7] set TZ), including time zone and DST/no-DST
option.
Next, use option [4] to set installation from the diskette
drive to network.
Fill in the host name and Internet number, the master's
Internet number,
and the router's Internet number. Once done with this,
select the
image file and path you set up when you created the
image in the first
place. The menu will walk you through, but it does so
circuitously.
If you have completed everything satisfactorily, the
image will read
in. Full path names and basenames will scroll up the
screen for an
hour. When scrolling stops, the screen will say that
you can boot.
Don't believe that message. You still have more work
to do, starting
with moving the key to normal so that you actually can
boot.
Post-Net Installation Customization
The new system needs to be brought up to something close
to single-user
mode. However, if it processes through the network part
of the installation,
it will become unhinged and go off into never-never
land. To prevent
this, halt rc's part of the boot with a Control-C. You
must act quickly to short-circuit the process before
the network services
can be activated, so hit Control-C as soon as the daemon
message
for TCP/IP and NFS displays.
Remember to key over to normal from service before booting.
After cancelling rc, you will get a login. Because you
now
have the full system image taken from the donor system,
log on as
root using the root password of the donor.
Edit Critical System Files
Since the system's working image is a copy, the next
step entails
providing unique system identifiers. As with any UNIX
system installation,
you must be ensure that the system has its correct hostname,
Internet
number, and route information. These are hidden in different
places,
but they must all be found and changed. Use smit to
change
the hosts and rc.net files' information and thereby
update
the ODM.
Hosts
If you are using NIS, any good hosts file is just a
two-liner, so
add the new system's name and Inet number, keep loopback,
and delete
all others. If you like easy readability, remove all
the comments.
If you don't use YP, edit the very long hosts file by
entering your
system's name and Internet number as the second line,
just after the
loopback address.
rc.net
Administrators who have previously been exposed only
to BSD systems
must prepare themselves for a shock. The convenience
of having only
a few rc files, like rc.boot, rc, and rc.local,
is gone; in their place are dozens of rc files and rc
directories. The network initiation files, /etc/rc.net
and
rc.nfs, set the hostname and hostid, add routing
information, and open the Ethernet port. The files contain
a number
of lines, many of them comments; for customization purposes,
find
the lines for hostname, route, and ifconfig.
Let's set up tiger:
/bin/hostname tiger >>$LOGFILE 2>&1
/etc/route add 0 129.243.70.100 >> $lLOGFILE 2>$1
/etc/ifconfig en0 inet 'hostname up >> $LOGFILE 2>&1
All of these lines must be uncommented and changed.
This
part of the installation is critical; if you make a
mistake here,
you won't be able to boot successfully. Instead, the
system will fail
and will display a misleading message, "YP master
not found,"
which will cause you to look in the wrong place to troubleshoot
the
problem. The system needs an Internet number, good routing
information,
and its hostname, and it has to bring up its Ethernet
port.
Otherwise there will be no network and no system. If
you can't get
the hostid check back on, see if anything is wrong with
the
hostname line. hostid is set near the bottom of rc.net
and is a function of hostname. If hostname is not set,
neither is hostid. The trick is to find the hostid command,
and if you get back an answer like 0xf, you haven't
succeeded.
You must get this part right, because a lot of your
software licenses
will key off the hostid.
If you neglected to clean out the cron directory or
any other
trash collection directories when you created the image,
do it now
and resolve to be more careful the next time you create
an image.
Move to /var/spool/cron/crontabs and remove all but
root's
cron file. These are the most important files, but there
may
be others, like /etc/filesystems, AIX's answer to BSD
fstab.
If your file systems are unique, customize them now.
You can put your custom files on your own diskette and
use tar
to read them in. If you do, the device is /dev/fd0 as
in
#tar xvf /dev/fd0
The high-density diskette is fd0h, but this isn't
required for single file transfers.
Make Some Room and Then Create New Partitions
The as-shipped system may not have enough room. If your
/usr/work
partition is too large to allow for adequate swap space,
shrink the
partition by removing it (that's as small as it can
get).
Mount /usr/work and then remove the entire logical volume
by
playing with LVM through
smit (rmfs /usr/work or rmlv /dev/lv00)
To create the file system again also requires using
smit.
Follow this menu path
smit -> phys -> file sys ->
add/change/show.. ->JFS -> add a JFS
which moves you from smit's first window to physical
storage to file systems to add/change/show --
and on through to journaled file systems. Select the
add
option. You will get a brief root message, then you
will be asked
the size of the file system and its name:
size of [50]
mount point [/usr/work]
mount auto
Questions like
mount automatically no
can be toggled to "yes" by using the Tab
key. If you succeed, smit will confirm that the job
is done.
Press F10 to exit and go on to more useful work.
Increase Paging Size
chps changes the attributes of the paging space and
can be
used to provide the larger amount of page space required
by engineering
and scientific systems. The -s option specifies the
number
of logical partitions to add. For example,
chps -s4 myvg
adds four logical paritions to the myvg paging
space. Using quotation marks helps even more, as in
the following
fragment that sets two paging areas:
chps -s'8' hd6
chps -s'8' hd61
Change Protections
Typically, you will have to change some protections
like /etc/swcons
to /dev/kmem. kmem is always shipped with excessive
protection, but since some of your applications need
to read from
it, you'll need to reset it:
chmod 644 /dev/kmem
Post-Custom and Debug
As noted earlier, if anything goes wrong with the network
portion
of the installation, your boot will hang and display
messages like
"YP server not responding." The recovery is
to backtrack your
customization starting with /etc/rc.net, looking for
missing
comments and typos.
A good debugging technique is to run smit to get its
version
of what the net interface looks like. Use the following
menu path:
smit ->communications... -> \
TCP/IP ->minimum config -> \
ne0 -> ->NFS -> NFS -> conf
If you find that the gateway (router) address has not
been entered, provide the required information including
mask, host
number, and hostname, and smit will write it to the
AIX system's database. You may have a few odds and ends
of your own;
do them.
Now you are ready to boot all the way to multi-user
mode. Try a shutdown
-r and celebrate, or go back in again and see where
you went wrong.
About the Author
Bruce H. Hunter is the co-author, with Karen Hunter,
of UNIX
Systems, Advanced Administration and Management Handbook
(Macmillan:
1991).
|