A patch list that is created by the smpatch command can be used by luupgrade to apply patches to an inactive boot environment. You can also use the luupgrade command to remove patches from an inactive boot environment based on showrev information. See the luupgrade(1M) and showrev(1M) man pages.
This procedure assumes that you have created a second boot environment that is a duplicate of the active boot environment. See the lumake(1M) man page for information about creating boot environments.
Become an appropriately authorized user or assume a role that includes the Software Installation profile or the solaris.admin.patchmgr.* authorization.
The System Administrator profile includes the appropriate profiles. To create the role and assign the role to a user, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.
Perform a patch analysis on the active boot environment to obtain the list of appropriate patches to apply to the inactive boot environment, and remove the synopsis for each patch entry.
# smpatch analyze | sed 's/ .*//' > patch-list-file |
The modified file will be a list of patches, one patch ID per line.
Download the patches from a patch list to your system.
# smpatch download -x idlist=patch-list-file |
Apply patches from a patch list to the inactive boot environment.
# luupgrade -t -n BE-name -s dir-name `cat patch-list-file` |
You must specify the name of the inactive boot environment to update, BE-name, and the directory where the patches are stored, dir-name.
(Optional) To remove a patch from the inactive boot environment, use the following command:
# luupgrade -T -n BE-name patch-id |
You must specify the name of the inactive boot environment to update, BE-name, and the patch to be removed, patch-id.
The following example shows how to use Patch Manager and Solaris Live Upgrade commands to apply a list of patches to an inactive boot environment. For this example, a duplicate boot environment, be2, of the active boot environment has been created.
First, use the smpatch analyze and sed commands to analyze the active boot environment and create a patch list, plist, that includes one patch ID per line. The sed command removes the synopsis from each patch entry. Use the smpatch download command to download the patches in the list. Then, use the luupgrade command to apply the list of patches to the inactive boot environment of the system. The inactive boot environment is called be2, and the directory where the patches reside is /var/sadm/spool on the active boot environment.
# smpatch analyze | sed 's/ .*//' > plist . . . # smpatch download -x idlist=plist . . . # luupgrade -t -n be2 -s /var/sadm/spool `cat plist` . . . |
The following example shows how to use Patch Manager and the Solaris Live Upgrade commands to remove a patch from an inactive boot environment. For this example, a duplicate boot environment, be2, of the active boot environment has been created.
Use the luupgrade command to remove patch 107058-01 from the inactive boot environment of the system, be2.
# luupgrade -T -n be2 107058-01 . . . |