Fixes and Alternate Disk Copy

When using the Alternate Disk Copy method for AIX updates, it sometimes happens that the installed fixes prevent a successful update. In this case the installed fixes can be removed directly in the altinst_rootvg. For this the emgr command can be called directly in the altinst_rootvg using the chroot command.

After creating the altinst_rootvg, e.g. with the alt_disk_copy command, the altinst_rootvg must be activated first:

# alt_rootvg_op -W -d hdisk3
Waking up altinst_rootvg volume group ...
#

The installed fixes can be listed as follows:

# /usr/sbin/chroot /alt_inst /usr/sbin/emgr –l

ID  STATE LABEL      INSTALL TIME      UPDATED BY ABSTRACT
=== ===== ========== ================= ========== ======================================
1    S    102m_ifix  10/14/18 10:48:18            IFIX for Openssl CVE on 1.0.2m       
2    S    IJ03121s0a 10/14/18 10:49:04            IJ03121 for AIX 7.1 TL5 SP00         
3    S    IJ05822s2a 10/14/18 10:49:18            a potential security issue exists    
…

When removing fixes in altinst_rootvg, the environment variable INUCLIENTS is important. It signals the emgr command not to restart services and not to change devices dynamically. Without setting these variables, uninstalling some fixes will fail in the altinst_rootvg!

# INUCLIENTS=1 /usr/sbin/chroot /alt_inst /usr/sbin/emgr –r -n 3
+-----------------------------------------------------------------------------+
Efix Manager Initialization
+-----------------------------------------------------------------------------+
Initializing log /var/adm/ras/emgr.log ...
Accessing efix metadata ...
Processing efix label "IJ05822s2a" ...
...
Operation Summary
+-----------------------------------------------------------------------------+
Log file is /var/adm/ras/emgr.log

EFIX NUMBER       LABEL               OPERATION              RESULT           
===========       ==============      =================      ==============   
1                 IJ05822s2a          REMOVE                 SUCCESS          

Return Status = SUCCESS
# INUCLIENTS=1 chroot /alt_inst /usr/sbin/emgr -r -n 2
…
# INUCLIENTS=1 chroot /alt_inst /usr/sbin/emgr -r -n 1
…

Now there are no fixes in the way of an OS update!

After the OS update, new fixes can be installed similarly to altinst_rootvg before rebooting. We first mount the directory with the fixes under /alt_inst/mnt:

# mount aixnim:/export/nim/lpps/aix710503lpp /alt_inst/mnt
#

And then we install the fixes directly in the altinst_rootvg, again with the help of chroot and INUCLIENTS:

# INUCLIENTS=1 chroot /alt_inst /usr/sbin/emgr -e /mnt/emgr/ppc/102p_fix.181127.epkg.Z
+-----------------------------------------------------------------------------+
Efix Manager Initialization
+-----------------------------------------------------------------------------+
Initializing log /var/adm/ras/emgr.log ...
Efix package file is: /mnt/emgr/ppc/102p_fix.181127.epkg.Z
…
EPKG NUMBER       LABEL               OPERATION              RESULT           
===========       ==============      =================      ==============   
1                 102p_fix            INSTALL                SUCCESS          

Return Status = SUCCESS
# INUCLIENTS=1 chroot /alt_inst /usr/sbin/emgr -e /mnt/emgr/ppc/IJ09621s3a.181001.epkg.Z
…
# INUCLIENTS=1 chroot /alt_inst /usr/sbin/emgr -e /mnt/emgr/ppc/IJ11545s0a.181127.epkg.Z
…

Finally the altinst_rootvg has to be deactivated, and a new boot image should be created in the altinst_rootvg, otherwise the system will hang (depending on the fixes installed) when booting from altinst_rootvg!

# alt_rootvg_op –S -t
Putting volume group altinst_rootvg to sleep ...
forced unmount of /alt_inst/var/adm/ras/livedump
…
forced unmount of /alt_inst
Fixing LV control blocks...
Fixing file system superblocks...
#

(Note: The ‘-t‘ option forces the creation of a new boot image!)

Now, as usual, the boot list can be changed and the system can be rebooted after the update.