dropdown menu

Showing posts with label UPDATE. Show all posts
Showing posts with label UPDATE. Show all posts

UPDATE - IFIX


IFIX:

An interim fix, or ifix (previously called an emergency fix or efix) is a code update to resolve a specific known problem, or APAR, while an official PTF is undergoing the formal development process.

An APAR is an Authorized Problem Analysis Report. IBM acknowledges that there is some sort of defect in a software program. This report sums up the problem and instructs the software lab to fix it. (IXnnnnn or IYnnnnn number - and not long ago IZnnnnn)

A PTF is a Program Temporary Fix and provides a solution for a problem. (Unnnnnn number for AIX) I guess the U is for UNIX).

Most people use PTF and APAR interchangably. PTF's have the word temporary in them but really are not temporary, they are just a patch.
A temporary patch would be an efix (ifix) that you would get directly from IBM. Ifixes need to be uninstalled before a TL update (as these ifixes should be contained in the new TL level). The terminology is confusing but just think of both PTF's and APAR's as patches. There could be some sort of technical difference between the two but it doesn't really matter.

Starting in AIX 5.3 TL 10 and AIX 6.1 TL 3, the installp command will automatically remove an ifix from the system if you are installing the Technology Level, Service Pack, or PTF that provides the official fix for the problem.

more info: http://www-304.ibm.com/support/docview.wss?uid=isg3T1012104

install:
emgr -de /mnt/IZ12345.epkg.Z    displays some info about an ifix package (-e: e(i)fix package name; emgr -dv3 -e <ifix>: verbose output)
emgr -pe /mnt/IZ12345.epkg.Z    preview of the install of given ifix package
emgr -e /mnt/IZ12345.epkg.Z     installs the specified ifix (the ifix package should be in compressed state)

listing:
emgr -l                         lists interim fixes (emgr -lv3: verbose mode listing)
emgr -l -L IZ12345              you can list information about a specific installed ifix by running the command (v3 (verbose) can be used)
emgr -c -L ifix_label           an ifix can be verified by running the command (if -L <ifix> is omitted all installed ifixes are checked)

removal:
emgr -r -L iy77276              removes the given interim fix
emgr -r -n 1                    removes the specified interim fix with the given ID (ID can be obtained: emgr -lv3)
emgr -r -u VUID                 removes the specified interim fix with the given VUID (VUID can be obtained: emgr -lv3)

You can also specify different levels of verbosity by using the -v flag. Level 1 is the default and level 3 is the maximum.
(I usually use v3.)

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

Concurrent ifix

A concurrent ifix is initially installed to memory, then is optionally committed to disk, either at the time of installation, or at a later time. A concurrent ifix that is installed only in memory will not be loaded when the system reboots. Concurrent ifixes may also be installed in the traditional manner.

A concurrent ifix:
-a feature introduced in AIX 6.1, may be available for ifixes which fix a problem in the kernel, or certain kernel extensions.
-it can update the kernel or kernel extension in memory, without requiring a reboot.
-it is initially installed to memory, then is optionally committed to disk, either at the time of installation, or at a later time.
-if it is installed only in memory will not be loaded when the system reboots.

emgr -i IZ12345.epkg.Z          installs a concurrent ifix in memory only (the ifix will not be loaded when the system reboots)
emgr -C -L IZ12345              commits a fix that is only installed in memory to disk, allowing it to be loaded when the system reboots
emgr -Ci IZ12345.epkg.Z         installs an ifix in memory and commit it to disk in a single operation

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

ifix states

S = Stable                      ifix was successfully installed in the traditional way (using the -e flag)
Q = Reboot Required             ifix was installed successfully, but a reboot is required. After reboot it will be moved to the S state
P = Patched
                    concurrent ifix has been installed only to memory. A reboot will clear the ifix from memory.
N = Not Patched                 concurrent ifix is not loaded in memory (conc. ifix is installed only in memory, then system was rebooted)
SP = Stable + Patched           concurrent ifix has been installed in memory and committed to disk
QP = Reboot Required + Patched  concurrent ifix was installed to memory and committed to disk, but the system has not been rebooted
B = Broken                      something has gone wrong with the installation or removal of the ifix and should be corrected

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

Unable to set up Trusted Execution environment for Installation to proceed.

I wanted to install an ifix (emgre -e ...) and received the above error.
IBM says we need to cleanup old/failed installation. lppchk and installp -C did not show any error, then I found a hanging "fuser" process since weeks (ps -ef), and I saw this emgr also does some checks, and uses fuser ...  and now I had another hanging "fuser" process. I tried to kill both processes without success, so I did a reboot after that ifix install was successful.


AIX - UPDATE BASICS

Basics

BOS INSTALL:

The following installation methods are available on AIX:

New and Complete Overwrite
This method installs AIX 6.1 on a new machine or completely overwrites any BOS version that exists on your system.

Preservation
This method replaces an earlier version of the BOS but retains the root volume group, the user-created logical volumes, and the /home file system. The system file systems /usr, /var, /tmp, /opt, and / (root) are overwritten. Product (application) files and configuration data stored in these file systems will be lost. Information stored in other non-system file systems will be preserved.

Migration
The migration installation method is used to upgrade from an existing version or release of AIX to a later version or release of AIX. A migration installation preserves most file systems, including the root volume group, logical volumes, and system configuration files. It overwrites the /tmp file system.

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

AIX PACKAGE-NAMING CONVENTION

LPP.Package.Fileset.Suffix

The standard dictates that the first part of the package name is the product name, the second is the package name, the third is the fileset name, and the fourth is the suffix that describes the contents of the fileset


LPPs (Licensed Program Product)
It is a complete software product collection including all packages and filesets required. For example, the Base Operating system (bos) itself is a LPP, which in turn is a complete collection of packages and filesets

Package
A package contains a group of filesets. A package is also a single unit that can be installed. Several packages make up an LPP or product offering. For example, bos.net is a package.


Filesets
A set of files that are installed together as a single unit. All licensed program products (including AIX itself) are packaged and delivered as one or more filesets. A fileset is the smallest individual unit that can be installed. It provides a specific function. For example, bos.net.tcp.nfs is a fileset in the bos.net package.

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

SOFTWARE UPDATE:

5.3.0.0
V.R.M.F    <-- Version.Release.Modification.Fix

TL (Technology Level, earlier ML: Maintainance Level)
A TL contains new hardware and software features and service updates,  all requisites are added to it, so that the whole TL is installed.

SP (Service Pack)

A Service Pack (SP) consists of service-only updates that are released between Technology Levels to be grouped together for easier identification.

CSP (Concluding Service Pack)
CSP is the last Service Pack for a Technology Level

APAR (Authorized Program Analysis Report)
IBM acknowledges that there is some sort of defect in a software program. An APAR is a number used to identify reported problems and it sums up the problem and instructs the software lab to fix it. A fix to an APAR can be made up of one or more fileset updates. (IXnnnnn or IYnnnnn number - and not long ago IZnnnnn) --> instfix

PTF (Program Temporary Fix)
A PTF is a Program Temporary Fix and provides a solution for a problem. (Unnnnnn number for AIX) I guess the U is for UNIX) --> instfix

INTERIM FIX (efix, ifix)
It's a temporary correction -->emgr

Most people use PTF and APAR interchangably. PTF's have the word temporary in them but really are not temporary, they are just a patch.
A temporary patch would be an efix (ifix) that you would get directly from IBM. Ifixes need to be uninstalled before a TL update (as these ifixes should be contained in the new TL level). The terminology is confusing but just think of both PTF's and APAR's as patches. There could be some sort of technical difference between the two but it doesn't really matter.

Starting in AIX 5.3 TL 10 and AIX 6.1 TL 3, the installp command will automatically remove an ifix from the system if you are installing the Technology Level, Service Pack, or PTF that provides the official fix for the problem.

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

 When to do updates:

"How often should you upgrade your systems and install service packs? What about the firmware and the HMC, how often are these updated? The short answer is: there’s no right or wrong way. Some clients need an environment that requires maximum uptime and availability. These clients typically wait until new TLs are available for several months, and at least three SPs have been released prior to deploying a new release.

Other folks prefer to be current so they can fully take advantage of all of the features and functionality a new TL brings, while at the same time ensuring that they have the latest security patches and OS patches. Regarding firmware, unless there’s a compelling reason, I prefer to wait until I’m more than one level down prior to upgrading. This way, I’m reasonably current but not too bleeding edge; I like to let others work out the hardware bugs."

http://www.ibmsystemsmag.com/aix/administrator/systemsmanagement/Managing-AIX-Updates/?page=5

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

Install terminology:

In order to support diskless or dataless client workstations, machine-specific portions of the package (the root part) must be separated from the machine-shareable portions of the package (the usr part).

root part
The root part of the software contains files that must be installed on the target system. It contains the part of the product
that cannot be shared among machines. Each client must have its own copy.

usr part
The object classes in this repository can be shared across the network by /usr clients, dataless and diskless workstations. Software installed in the /usr-part can be shared among several machines with compatible hardware architectures.

prereq
A prerequisite indicates that the specified fileset must be installed at the specified fileset level or at a higher level before the current fileset can install successfully.

coreq
A corequisite indicates that the specified fileset must be installed for the current fileset to function successfully. At the end of the installation process, the installp command issues warning messages for any corequisites that are not met. A corequisite can be used to indicate requisites between filesets within the same package. (filesets listed as coreq must be installed at the same time as the fileset what we want to install)

ifreq
The (InstalledFilesetLevel) parameter is optional. For example, if the RequiredFilesetLevel is 4.1.1.1 and no InstalledFilesetLevel parameter is supplied, the InstalledFilesetLevel is 4.1.1.0. If the RequiredFilesetLevel is 4.1.1.0 and no InstalledFilesetLevel parameter is supplied, the InstalledFilesetLevel is 4.1.0.0.

instreq
An installed requisite indicates that the specified fileset should be installed automatically only if its corresponding fileset is already installed or is on the list of filesets to install. An installed requisite also is installed if the user explicitly requests that it be installed.

Group Requisite
A group requisite indicates that different requisite conditions can satisfy the requisite. A group requisite can contain prerequisites, corequisites, if-requisites, and nested group requisites. The Number preceding the { RequisiteExpressionList } identifies how many of the items in the RequisiteExpressionList are required. For example, >2 states that at least three items in the RequisiteExpressionList are required.

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

Example #1 (prereq, coreq, ifreq):

Fileset new.fileset.rte 1.1.0.0 contains the following requisites:

*prereq database.rte 1.2.0.0
*coreq spreadsheet.rte 1.3.1.0
*ifreq wordprocessorA.rte (4.1.0.0) 4.1.1.1
*ifreq wordprocessorB.rte 4.1.1.1

The database.rte fileset must be installed at level 1.2.0.0 or higher before the new.fileset.rte fileset can be installed. If database.rte and new.fileset.rte are installed in the same installation session, the installation program installs the database fileset before the new.fileset.rte fileset.

The spreadsheet.rte fileset must be installed at level 1.3.1.0 or higher for the new.fileset.rte fileset to function properly. The spreadsheet.rte fileset does not need to be installed before the new.fileset.rte fileset is installed, provided both are installed in the same installation session. If an adequate level of the spreadsheet.rte fileset is not installed by the end of the installation session, a warning message will be issued stating that the corequisite is not met.

If the wordprocessorA.rte fileset is installed (or being installed with new.fileset.rte) at level 4.1.0.0, then the wordprocessorA.rte fileset update must be installed at level 4.1.1.1 or higher.

If the wordprocessorB.rte fileset is installed (or being installed with new.fileset.rte) at level 4.1.1.0, then the wordprocessorB.rte fileset update must be installed at level 4.1.1.1 or higher.

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

Example #2 (instreq):

Fileset Super.msg.fr_FR.Widget at level 2.1.0.0 contains the following install requisite:

*instreq Super.Widget 2.1.0.0

The Super.msg.fr_FR.Widget fileset cannot be installed automatically when the Super.Widget fileset is not installed. The Super.msg.fr_FR.Widget fileset can be installed when the Super.Widget fileset is not installed if the fileset is listed explicitly on the list of filesets to be installed..

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

Example #3 (group reqisite):

At least one of the prerequisite filesets listed must be installed (both can be installed). If installed, the spreadsheet_1.rte fileset must be at level 1.2.0.0 or higher or the spreadsheet_2.rte fileset must be at level 1.3.0.0 or higher.

>0 {
*prereq spreadsheet_1.rte 1.2.0.0
*prereq spreadsheet_2.rte 1.3.0.0
}

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

Supersede

A newer fileset supersedes any older version of that fileset.

For example, the fileset update farm.apps.hog 4.1.0.1 delivers an update of /usr/sbin/sellhog. Fileset update farm.apps.hog 4.1.0.3 delivers updates to the/usr/sbin/sellhog file and the /etc/hog file. Fileset update farm.apps.hog 4.1.1.2 delivers an update to the /usr/bin/raisehog file.

Update farm.apps.hog 4.1.0.3 supersedes farm.apps.hog 4.1.0.1 because it delivers the same files and applies to the same level, farm.apps.hog 4.1.0.0.

Update farm.apps.hog 4.1.1.2 does not supersede either farm.apps.hog 4.1.0.3 or farm.apps.hog 4.1.0.1 because it does not contain the same files and applies to a different level, farm.apps.hog 4.1.1.0. Update farm.apps.hog 4.1.1.0 supersedes farm.apps.hog 4.1.0.1 and farm.apps.hog 4.1.0.3.

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

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