dropdown menu

AIX UPDATE - COMMANDS

COMMANDS:

oslevel                             shows the actual BOS level
oslevel -r                          shows the TL level (or earlier ML)
oslevel -s                          shows what SP level installed
oslevel -sg 5300-09-01-0847         shows which fileset is greater than the given service pack (it is used with bos.rte.install)
oslevel -rl 5300-10                 shows which filesets are below the given TL level (TL level is from instfix -i | grep ML)
oslevel -sl 53-09-020849            shows which filesets are below the given servicepack (used after bos.rte.install has been updated)

------------------------------
bffcreate -ld <dir>                 shows info about the packages in a dir (I:install, U:updatte package)
bffcreate -c -d /bb1                it will change the bff name from U#### to normal fileset name in bb1 !!!overwrites original bff!!!
------------------------------

export INST_DEBUG=yes               setting up debug mode prior install/geninstall/nimadm operation, provides useful info of the failure

------------------------------

installp                            installs and maintainins LPP packages
        -a (apply)
        -c (commit)
        -p (preview)
        -g (apply prerequisites)
        -X (expand file systems, if needed)
        -Y (accept license agreements)
        -d (device or directory location of software)
        -q (quiet mode)

installp -apgXYd . bos.rte.install  preview install of given fileset from current (.) location
installp -agXYd /home/bb all        installs all fileset from given location
installp -aF -d /home/bb all        force install all filesets from given location

installp -s                         list of applied updates that can be committed or rejected
installp -c all                     commit all applied filesets

installp -C                         remove all files which were installed in failed state
installp -ld /dev/cd0               list what installable software is available on a device (cd rom)
installp -ld <file.bff>             lists what filesets are in the given bff file
installp -u <fileset>               removes a fileset (installp -ug <fileset> <--it will remove dependencies as well)
installp -upg X11*                  preview remove all X11 related software and prerequisistes

------------------------------

geninstall                          generic installer that installs software of various package formats: LPP, RPM etc.
           -I (use installp flags)
           -p (preview)
           -d (device or directory location of software)

geninstall -I "-acgXY" -p -d /home/bb all   preview install for all files in given location (using installp format)
geninstall -I "-acgXY" -d . bos.rte.install install a fileset from current (.) location (using installp format)

------------------------------

install_all_updates -pcYd .          preview of update
install_all_updates -cYd .           actually does the update
/var/adm/ras/install_all_updates.log here is the logfile of install_all_updates

------------------------------

instfix -i|grep ML (instfix -i|grep TL)    shows whether all filesets are installed
instfix -i | grep SP
instfix -icqk 5300-05_AIX_ML| grep ":-:"   shows missing software levels
instfix -ik IY24043                        shows if a fix (APAR) is installed on the system (instfix -ivk ... <--verbose mode)
instfix -k IY73748 -d /dev/cd0             install APAR iY733748 from /dev/cd0

------------------------------

lslpp -L                            displays info about all installed filesets or fileset updates
lslpp -L <fileset>                  displays info about that fileset
lslpp -h <fileset>                  shows the history of the fileset
lslpp -l | grep <fileset>           shows if it is installed or not
lslpp -lc| grep <fileset>           shows the state (Aplp., Comm., Broken..) in /etc/objrepos and in /usr/lib/objrepos of a fileset

lslpp -f <fileset> 
                 shows all files that are installed with  a particular fileset
lslpp -w /usr/local/bin/lsof        shows the fileset which contains the given file (binary) (which command shows full path: which lsof)

lslpp -p <fileset>                  shows requisite information for a specified fileset (-p means possibly prerequisite)
lslpp -d <fileset>                  shows filesets that are dependents on the specified fileset

------------------------------

lppchk -v                           verify the installed software is in consistent state
lppchk -v -m3                       if lppchk -v gives an error, with this we can get more info about it
lppchk -c -m3
                       makes a checksum on the filesets as well
------------------------------

smitty install                      software installation and maintenance menu
smitty update_all                   update installed software to latest level
smitty remove                       removing installed software
smitty reject                       removes applied filesets
smitty commit                       commits softwares
smitty software_maintain            many functions like reject, commit...

------------------------------

restore -Tqvf EMCpower_install      show which files will be changed by the fileset
/usr/lpp/PackageName                here are the previous version of the updates which are in applied state (not commited yet)       
inutoc <path>                       creates a .toc file in the given path
ldd /root/gzip                      lists the path names of all dependencies (lists dynamic dependencies)
which_fileset <command>             searches the /usr/lpp/bos/AIX_file_list file for a specified file name or command
/usr/lib/instl/lppmgr -d /nim/5304 -rub    the directory will be checked and all duplicate filesets will be removed
                                    (-r: remove, -u:check update filesets, -b: check base level filesets)
multibos                             http://www.ibmsystemsmag.com/aix/aprilmay08/tipstechniques/20226p1.aspx
---------------------------------------------------------------------

INSTFIX CORRECTION:


1. instfix -i | grep ML
    All filesets for 5.3.0.0_AIX_ML were found.
    All filesets for 5300-01_AIX_ML were found.
    All filesets for 5300-04_AIX_ML were found.
    Not all filesets for 5300-05_AIX_ML were found.
    ...
2. instfix -vick 5300-05_AIX_ML | grep :-:
   (instfix -icqk 5300-05_AIX_ML | grep ":-:"                         <--this command was used in the NIM redbook)

5300-05_AIX_ML:X11.adt.motif:5.3.0.50:5.3.0.0:-:AIX 5300-05 Update    <-- shows what is missing

3.lslpp -L X11.adt.motif                                              <-- shows if it is installed and what is the current version
  Fileset                      Level  State  Type  Description (Uninstaller)
  ----------------------------------------------------------------------------
  X11.adt.motif              5.3.0.0    C     F    AIXwindows Application
                                                   Development Toolkit Motif


4. if we have found it in a dir: installp -l -d .
  Fileset Name                Level                     I/U Q Content
  ====================================================================
  X11.adt.motif               5.3.0.50                   S  N usr     <--shows if reboot needed after install (N= not affected, no reboot)
                                                                     (Y and B: it affects the currently running programs)
                                                                     (B and b: causes bosboot to occur + reboot is needed)

5. smitty update_all (or smitty install)


6. now it is OK: instfix -i | grep ML
    All filesets for 5.3.0.0_AIX_ML were found.
    All filesets for 5300-01_AIX_ML were found.
    All filesets for 5300-04_AIX_ML were found.
    All filesets for 5300-05_AIX_ML were found.
---------------------------------------------------------------------

FIXING FILESETS in ODM:

lppchk -v shows problems with a fileset and you don't want to remove it:

devices.common.IBM.iscsi.rte 5.2.0.0    (not installed; requisite fileset)

1. save ODM
   tar -cvf /tmp/odm.etc.tar /etc/objrepos
   tar -cvf /tmp/odm.usr.lib.tar /usr/lib/objrepos


2. check lpp_id
   odmget -q name=devices.common.IBM.iscsi.rte lpp
   output will show lpp_id:
    ...
    lpp_id = 355

3. delete from ODM
   odmdelete -q name=devices.common.IBM.iscsi.rte -o lpp
   odmdelete -q lpp_name=devices.common.IBM.iscsi.rte -o product
   odmdelete -q lpp_id="355" -o history
   odmdelete -q lpp_id="355" -o inventory

4. reinstall base fileset with force flag (then update)
   installp -aF -d /home/bb/bb1 all

----------------

36 comments:

Anonymous said...

Hi,

whether .toc (inutoc) is mandatory for all kind of fileset installation. without .toc whether the installation of filesets will not happen ?

aix said...

Yes, without .toc file (table of conntent) AIX will not recognize installable filesets.

abubasim said...

This is not the case with AIX 6.1 and 7.1. If you have write access to the directory containing the filesets, SMIT will create the .toc file if it is missing.

Anonymous said...

I have a strange problem, friends.
I am unable to delete the AIX command history on a server that runs AIX 7.1 (oslevel -s => 7100-01-04-1216)
did the usual > /.sh_history & and echo " " > /.sh_history, to zero out the contents, but it didn't help.
pls help.

regards.

aix said...

Did you check the content of the file .sh_history after delete? (If it is cleared it should not show you command history)

Anonymous said...

Yes I did.
I did a cat /.sh_history and it did show me only the "cat /.sh_history" inside it.
also did an ls -la /.sh_history and the size was just a few bytes. Saw it increase in size, as I kept typing more commands, but a #history -400 or an Esc+K was able to fetch all the 400 commands when I had just typed 3 or 4 commands since the time I last cleared the contents of the history file.
This is very strange.
Any help will be much appreciated.
thanks.

aix said...

After logout /login was the same?

Anonymous said...

yes. was the same, after a logout and a re-login.
Was also the same, after a # shutdown -Fr.

aix said...

I think i have found it :) The problem is with the "/".
You wrote "> /.sh_history", but I guess your home dir is not "/" (probably it is /root).
You should try to clear the .sh_history file in your home dir (for example: "> /root/.sh_history")

Anonymous said...

Hello.
AIX does not create a /root as the root user's home directory. It's always a /.
I've always been clearing histories, for more than 6 years now. This symptom is clearing getting me frustrated. pls help.
thanks.

aix said...

Hello, if you use /root as a home dir, then you can keep / filesystem clean, so your files will not be mixed up with other system files. In our environment we use /root for root home dir and I know many other sysadmin doing the same way.

I think you should run a find command on your full system to search for sh_history files, probably you will find another one, where your commands are logged.

Anonymous said...

Your website is amazing. Preparing for the AIX 7 certification. What version of AIX are you using in your environment?

Anonymous said...

I asking because I see that the AIX 7.1 Differences Guide is 400+ pages, meaning there is a lot of new stuff when comparing it to 6.x or 5.x

aix said...

We are still using mostly 6.1 and only a few 7.1. I'm not the decision maker at our company about AIX levels, and it depends on the applications as well, if they can run on 7.1 or not.

Anonymous said...

Hi,

I am trying to update my VIO server from 2.2.0.10 to 2.2.1.1 then to 2.2.1.3. So I ran updateio command and which completed successfully and when i do ioslevel can it shows 2.2.1.1 but when I ran lppchk -v It's showing some inconsistent filesets. I checked the log and it shows the following error, even the .toc file is inplace.

0503-466 installp: The build date requisite check failed for fileset bos.rte.security.
Installed fileset build date is 1015. Selected fileset does not have a build date, but one is required.
0503-466 installp: The build date requisite check failed for fileset bos.rte.security.
Installed fileset build date is 1043. Selected fileset does not have a build date, but one is required.
installp: Installation failed due to BUILDDATE requisite failure.

Can you please help.

Thanks,

aix said...

Hi,

2 things came to my mind:

1. remove .toc file and create a new one with command inutoc (as root) in the install directory. Then try again updateios.

2. Remove problematic fileset, check oslevel and install missing requirements step by step

If ioslevel output is correct, it means all filesets for correct VIO server functionality are installed, but I would also try to fix this missing fileset problem. There is a known issue with 2.2.1.1 (http://www-01.ibm.com/support/docview.wss?uid=isg400000800). If you check at the and of this link, it will list some filesets which requisites are failed to install, but it can be ignored. So what we do, we don't bother with missing filesets at 2.2.1.1 and if ioslevel is correct, we update VIO server to 2.2.1.3 and only after that we correct missing fileset problems. (This is our approach, but I don't remember we had this specific issue what you had.)

(A good backup scenario is also needed before trying to correct these things.)

Hope this helps,
Balazs

Anonymous said...

Thanks again for your reply!
Below are the filsets I see after running lppchk -v. Not sure how to make these filesets consistent/reinstall. BTW I tried to run 2213 updates form new source and created new .toc.

# lppchk -v
bos.rte.security 6.1.7.0 (usr: COMMITTED, root: not installed)
bos.rte.shell 6.1.7.0 (not installed; requisite fileset)
bos.sysmgt.serv_aid 6.1.7.0 (not installed; requisite fileset)
bos.sysmgt.trace 6.1.7.0 (not installed; requisite fileset)
bos.sysmgt.trace 6.1.6.15 (not installed; requisite fileset)

# lslpp -L | grep bos.rte.security
bos.rte.security 6.1.7.0 ? F Base Security Function


# lslpp -L | grep bos.sysmgt
bos.sysmgt.loginlic 6.1.6.0 C F License Management
bos.sysmgt.nim.client 6.1.7.0 C F Network Install Manager -
bos.sysmgt.quota 6.1.6.0 C F Filesystem Quota Commands
bos.sysmgt.serv_aid 6.1.6.1 C F Software Error Logging and
bos.sysmgt.smit 6.1.7.0 C F System Management Interface
bos.sysmgt.sysbr 6.1.7.0 C F System Backup and BOS Install
bos.sysmgt.trace 6.1.6.1 C F Software Trace Service Aids

Anonymous said...

Hi admin,
Thanks for the excellent document it is very helpful, need to know we can perform multibos migration?
Thanks & Regards
Abdul

aix said...

Hi, info about multibos can be found here: http://aix4admins.blogspot.hu/2011/09/by-default-bos-filesystems-in-rootvg.html

aix said...

You can get more details by running "lppchk -v -m3". I would probably try to re-install them 1 by 1. First remove problematic fileset then install it, and do it for the others as well. If removing does not work you can clean up fileset from the ODM (see "FIXING FILESETS in ODM", a little above), but if you make something wrong you can mess up the whole ODM.

Usually, if I am not sure what to do, I am opening an IBM call, I would suggest this to you as well...

Anonymous said...

You can force the re-install. We ran into the same issue and forced the re-install.
installp -F -ac -d /source_of_filesets/installp/ppc bos.rte.security

Unknown said...

Here i can find all box packages? and what is bos file? anyone please help

Unknown said...

I upgraded the tl 05 to tl06.but it is showing old version.give me the prerequisites all

Anonymous said...

its urgent can u tell me how to copy a specific fileset from CD into a directory??

Anonymous said...

how can I check of a installed ifix with instfix command?

Anonymous said...

Please reply

Anonymous said...

During your active session, .sh_history will be an open file. As the previous poster said, you need to logout and log back in to see that your command history has been deleted.

Anonymous said...

Your home will be ~root and will also be stored in $HOME. Unless you are doing a sudo or a su (without the "-"), the only .sh_history you will need to deal with will be the on in ~root.
The old biggies (AIX, Solaris, HP-UX, Digital UNIX, etc) put root's home in /. I had not seen it put in /root until LINUX.
If you are going to be an SA, you need to get used to knowing where you are and what you are doing as root. Otherwise, you might destroy your system.

Anonymous said...

If you have a multi-user system and remove all of the .sh_history files that a find as root will show, you will have some irritated users.

Unknown said...

Hi...Gyz who one interested for online Aix server remote for training purpose.so please contact me (mr.ravi751@gmail.com)and get more details.

Unknown said...

does it have to be a mountpoint to stage the patch? or any path will work?

Anonymous said...

you shouldn't delete history

basic said...

Can you tell me the command to install packages without dependencies in AIX 6/7

Sumit Roy said...

Can I revert back to previous version of TL by rejecting the Apllied filesets of newer version ?

aix said...

Hi, rejecting the applied filesets works for few filesets, but in a TL there are so many filesets, so it is not recommended to do that.

Anonymous said...

how to check aix version is licensed or not?