For more detailed information and examples, see the man pages for the appropriate commands.
There are several AIX commands to manipulate the /etc/inittab file without directly editing it. While it is possible to directly edit /etc/inittab, the supported commands for modifying the records in the file are:
It is possible to render a system inoperable and recoverable only by network boot by messing up the /etc/inittab file. Be careful!
lsitab { -a | Identifier }
The lsitab command displays a record in the /etc/inittab file. You
can display all of the records in the /etc/inittab file, or use the
Identifier parameter to display a specific record. The Identifier
parameter is a 14-character field that uniquely identifies an object.
The -a flag specifies to list all records in the /etc/inittab file.
To list entry 'hardmon' in /etc/inittab:
lsitab hardmon
chitab { [ Identifier ] : [ RunLevel ] : [ Action ] : [ Command ] }
The chitab command changes a record in the /etc/inittab file. The
Identifier:Run Level:Action:Command parameter string is the new entry
to the /etc/inittab file. You can search for a specific record by
using fields in the Identifier portion of the parameter string. The
command finds the specified Identifier and changes that record.
mkitab [ -i Identifier ] { [ Identifier ] : [ RunLevel ] : [ Action ] : [ Command ] }
The mkitab command adds a record to the /etc/inittab file. The Identifier:RunLevel:Action:Command
parameter string specifies the new entry to the /etc/inittab file.
You can insert a record after a specific record using the -i Identifier
flag. The command finds the field specified by the Identifier parameter
and inserts the new record after the one identified by the -i Identifier
flag.
To create entry 'hardmon' in /etc/inittab:
mkitab "hardmon:2:once:/usr/bin/startsrc -s hardmon"
rmitab Identifier
The rmitab command removes an /etc/inittab record. You can specify
a record to remove by using the Identifier parameter. The Identifier
parameter specifies a field of one to fourteen characters used to
uniquely identify an object. If the Identifier field is not unique,
the command is unsuccessful.
To remove entry 'hardmon' in /etc/inittab:
rmitab hardmon
The BOS install scripts are found in /usr/lpp/bosinst. The more interesting
script is bi_main. This controls almost all of the install process from a CD or if
installing over a network, after NIM is out of the way.
One of the more useful install debugging techniques is turning on the bos
install -x option so you can see the script commands as they happen. In order
to do this, you will have to have access to the front panel key.
The procedure to enable the bos install debug output is as follows:
Boot your system in install mode (from CD, Tape, or Network)
When the 'c40' led is displayed, turn key to SECURE
Wait for the led to display 'eee', then turn key to SERVICE
Wait for the led to display 'ddd', then turn key to NORMAL
To do this on an SP system, a bit more setup is involved. The following procedure
does not take into account the ability to have more than one version of AIX installed
on the SP complex.
Creating a debug SPOT can be very useful in debugging installation problems. In order to
create a debug spot, issue the following commands:
The chservices command adds, deletes, or changes entries in the /etc/services
file. These entries are related to known services used in the DARPA Internet and
also related to information used by the inetd server. The entries for the inetd
server determine how the system handles Internet service requests.
It is possible to edit this file directly, but the
supported commands to manipulate the file are:
For additional information, see the man page for chservices(1).
If you have ever booted an RS/6000, you will notice the front of the box has a
3 digit number changing as the thing boots. (Of course you won't see them without
additional tools on an SP2 node, but the LED is still there.) These LED codes are
not random, but actually indicate what the machine is doing. Numbers in the 100's
are generally POST diagnostics running. Numbers above that are AIX specific and
will usually be generated from the /sbin/rc.boot script. The LED will go blank at
the end of /sbin/rc.boot when control is returned to init. rc.boot is usually the
second line of /etc/inittab.
You can set the LED to any arbitrary value by using the /usr/lib/methods/showled
command and supplying a hex value as an argument.
Reading the values can be a bit confusing, especially on older, true 3 digit
displays. The newer SP2 nodes and desktops are able to display better. Below are
what the hex a-f values will display. 0-9 are what you would expect them to be.
BOS Install and NIM tips
lnsim -t spot (SPOT_NAME)
lsnim -t lpp_source (LPPSOURCE_NAME)
Your AIX_LEVEL is everything following the '_' in the spot and lpp_source names.
Producing Debug Output for NIM BOS Installations
nim -o check -a debug=yes SPOTNAME
lsnim -l SPOTNAME
where SPOTNAME is the name of your SPOT. Write down the enter_dbg address for the
client you are going to boot.
st enter_dbg_value 2
g
nim -o check -a debug=no SPOTNAME
You will continue to get the debugger's prompt for any client booted with this SPOT
until you remove debug.
To check the psspspot after PTFs installed:
To rebuild the psspspot resource for install:
/usr/lpp/ssp/bin/SDRChangeAttrValues Node bootp_response=disk
/usr/lpp/ssp/bin/setup_server
/usr/sbin/nim -o remove psspspot
/usr/lpp/ssp/bin/SDRChangeAttrValues Node bootp_response=install
/usr/lpp/ssp/bin/setup_server
Manipulating /etc/services
Adding or Activating an entry
chservices [ -a ] -v ServiceName -p protocol -n port [ -u "Alias ..." ]
Changing an entry
chservices -c -v ServiceName -p protocol -n port [ -V NewServiceName ] [ -P
NewProtocol ] [ -N NewPort ] [ -u "Alias ..." ]
Deactivating an entry
chservices -d -v ServiceName -p protocol -n port [ -V NewServiceName ] [ -u
Alias ..." ]
Manipulating the /etc/exports file
The /etc/exports file controls the access and availability for remote hosts to mount
filesystems from a host. It is possible to edit this file directly, but after editing
or changing /etc/exports it is necessary to run /usr/bin/exportfs to make changes effective.
Supported commands for modifying /etc/exports are:
To remove an NFS export from the /etc/exports file
/usr/sbin/rmnfsexp -d Directory [-f Exports_file] [ -I | -B | -N ]
Example: To add an NFS export to the /etc/exports file
Example: To change an NFS export entry in the /etc/exports file
/usr/sbin/chnfsexp -d Directory [ -f Exports_file ] [ -t [ { rw | ro | rm -h
HostName [ ,HostName ... ] } ] ] [ -a UID ] [ -r HostName [ , HostName ... ] ] [
-c HostName , HostName ... ] ] [ -s | -n ] [ -I | -B | -N ] [ -P | -p ]
Example: To show an NFS export entry in the /etc/exports file
/usr/sbin/lsnfsexp [ -c | -l ] [ Directory ] [-f Exports_file ]
Example: To re-export entries in the /etc/exports file
/usr/sbin/exportfs [ -a ] [ -v ] [ -u ] [ -i ] [ -fFile ] [ -oOption [ ,Option ... ] ] [ Directory ]
Example: The RS/6000 LED
Setting the LED
Reading the LED
'A' or 'a' in scripts appears as 'c' on LED display
'C' or 'c' in scripts appears as 'u' on LED display
'F' or 'f' is off
'a' 'b' 'c' 'd' 'e' 'f'
_ o
_ _ |_| |_ |_ f
|_ _| _ |_ f
Some specific LED values and their meanings
611
LED 611 comes from /sbin/rc.boot when the SPOT is not available
during network booting. Check that an entry in /etc/exports exists for
the filesystem
/spdata/sys1/install/\
Miscellaneous
To reconfigure/recover ethernet adapter problems:
ifconfig en0 down
ifconfig en0 detach
rmdev -d -l en0
rmdev -d -l ent0
cfgmgr [ -v ]
configure the interface using smitty
The 3590 tape device driver (Atape) and the 3494 tape library
device driver can be downloaded from the following site:
index.storsys.ibm.com (drivers:deepb1u) /devdrvr
as of 05/28/98.
Older versions of bos install has a problem creating a /usr SPOT when the system
is upgraded to a higher level of AIX. Use the lpp set of the base
installed AIX level on the SPOT server. If impossible to do then
look at the file: /usr/lpp/bos.sysmgt/nim/methods/c_sh_lib.
Change the lslpp arguments from 'lcIqOu' to 'lcqOu'.
AIX Quick Command Reference
To add a service to crontab:
. /usr/lpp/ssp/install/bin/ssp_functions
updcrontab -d 0 filename
Customizing a node with PSSP 2.2 is done by setting the
bootp response to 'customize' and rebooting the node. NOT
by doing a network boot.
mklv -c <# copies>
-u <# PPS for alloc>
-s (separate pvs for alloc)
-y
chlicense -u <# licenses>
chdev -l aio0 -P
-a minservers='1'
-a maxservers='10'
-a maxreqs='4096'
-a kprocprio='39'
-a autoconfig='available'
chdev -l sys0 -a maxuproc='2048'
NIM update:
nim -o sync_roots psspspot
nim -Fo check psspspot
inittab: fbcheck checks for the /etc/firstboot script and runs it
during node boot. It then renames the firstboot script to
fb_
Customization of nodes:
After netinstall of a node, the node must be customized to change
the network interfaces, add the pssp software if not already on
the system, configure the switch and hostnames, etc. The script
/spdata/sys1/install/pssp/pssp_script is run to do the customization
of the nodes. This script uses tftp to transfer two files from
the control workstation that are used to further customize
the node. The two files are /tftpboot/script.cust and
/tftpboot/tuning.cust. First the tuning.cust is run, then the
script.cust script is run.
Files to remove from nodes before install image is made:
/var/adm/SPlogs/sysman/*
/etc/fb_*
/etc/niminfo
/etc/niminfo.prev
more...
Things to check after pssp upgrade:
Check that the /spdata/sys1/install/pssp/pssp_script does not
have any chmod 777 calls in it. Change these to 755 if found.
File collection note:
/usr/lpp/ssp/install/bin/rc.sp runs a script named filec_config
which attempts to put the password and group files in the
user.admin file collection if they are not found to alredy be
installed. Therefore the lines for etc/passwd and etc/group and
their related etc/security files must be in the file collection
but commented out.