Installing a patch cluster using Solaris live upgrade on X86

Installing a patch cluster using Solaris live upgrade on X86

You know, I have seen so many docs on this and they are all wrong. So
let’s do it right!

==============================================
1. let’s look at our BE’s (boot envirements)
==============================================

bash-3.2# lustatus
Boot Environment Is Active Active Can Copy
Name Complete Now On Reboot Delete Status
————————– ——– —— ——— —— ———-
s10x_u10wos_17b yes yes yes no –

=======================
2. Let’s make a new one
=======================

bash-3.2# lucreate -n 07272012
Checking GRUB menu…
System has findroot enabled GRUB
Analyzing system configuration.
Updating boot environment description database on all BEs.
Updating system configuration files.
Creating configuration for boot environment <07272012>.
Source boot environment is .
Creating file systems on boot environment <07272012>.
Populating file systems on boot environment <07272012>.
Analyzing zones.
Duplicating ZFS datasets from PBE to ABE.
Creating snapshot for on .
Creating clone for on .
Creating snapshot for on .
Creating clone for on .
Mounting ABE <07272012>.
Generating file list.
Finalizing ABE.
Fixing zonepaths in ABE.
Unmounting ABE <07272012>.
Fixing properties on ZFS datasets in ABE.
Reverting state of zones in PBE .
Making boot environment <07272012> bootable.
Updating bootenv.rc on ABE <07272012>.
Saving existing file in top level dataset for BE <07272012> as //boot/grub/menu.lst.prev.
File propagation successful
Copied GRUB menu from PBE to ABE
No entry for BE <07272012> in GRUB menu
Population of boot environment <07272012> successful.
Creation of boot environment <07272012> successful.
bash-3.2#

========================================
3. Unzip the patch cluster into /var/tmp
========================================

bash-3.2# unzip 10_x86_Recommended.zip

bash-3.2# cd /var/tmp/10_x86_Recommended

bash-3.2# ls
10_x86_Recommended.README installpatchset
10_x86_Recommended.html patch_order
Copyright patches
LEGAL_LICENSE.TXT patchset.conf
installcluster

==========================================================================================================
4. What the man pages don’t tell you is that live upgrade will fail if the commands are in the wrong order
==========================================================================================================

bash-3.2# luupgrade -n 07272012 -O ‘-d’ -s /var/tmp/10_x86_Recommended/patches -t `cat patch_order` -N -o /tmp/lu_log -l /tmp/lu_error

System has findroot enabled GRUB
No entry for BE <07272012> in GRUB menu
Validating the contents of the media .
The media contains 334 software patches that can be added.
ERROR: The media does not contain these requested patches: .

================================================================================================
5. -s and -t have to be last! -N is dry run, which keeps us from shooting ourselves in the foot.
================================================================================================

bash-3.2# luupgrade -n 07272012 -O ‘-d’ -N -o /tmp/lu_log -l /tmp/lu_error -s /var/tmp/10_x86_Recommended/patches -t `cat patch_order`

Validating the contents of the media .
The media contains 334 software patches that can be added.
Mounting the BE <07272012>.
Adding patches to the BE <07272012>.
Execute command: .
Unmounting the BE <07272012>.
The patch add to the BE <07272012> completed.
bash-3.2#

=========================================
6. OK, the dry run worked so let’s do it.
=========================================

bash-3.2# luupgrade -n 07272012 -O ‘-d’ -o /tmp/lu_log -l /tmp/lu_error -s /var/tmp/10_x86_Recommended/patches -t `cat patch_order`

—-snip-snip—-
Checking installed patches…
Executing prepatch script…
Installing patch packages…

Patch 145201-10 has been successfully installed.
See /a/var/sadm/patch/145201-10/log for details
Executing postpatch script…

Patch packages installed:
SUNWthunderbird

Unmounting the BE <07272012>.
The patch add to the BE <07272012> failed (with result code <1>).

=============================================================================================================
7. Don’t panic. We are installing one patch at a time, so this error is just for a patch that was not needed.
And result code <1> is usage error
=============================================================================================================

bash-3.2# cd /tmp
bash-3.2# cat lu_error
bash-3.2#

================================
8. Now let’s activate our new BE
================================

bash-3.2# luactivate 07272012
System has findroot enabled GRUB
Generating boot-sign, partition and slice information for PBE
Saving existing file in top level dataset for BE as //etc/bootsign.prev.
A Live Upgrade Sync operation will be performed on startup of boot environment <07272012>.

Generating boot-sign for ABE <07272012>
Saving existing file in top level dataset for BE <07272012> as //etc/bootsign.prev.
Generating partition and slice information for ABE <07272012>
Copied boot menu from top level dataset.
Generating multiboot menu entries for PBE.
Generating multiboot menu entries for ABE.
Disabling splashimage
Re-enabling splashimage
No more bootadm entries. Deletion of bootadm entries is complete.
GRUB menu default setting is unaffected
Done eliding bootadm entries.

**********************************************************************

The target boot environment has been activated. It will be used when you
reboot. NOTE: You MUST NOT USE the reboot, halt, or uadmin commands. You
MUST USE either the init or the shutdown command when you reboot. If you
do not use either init or shutdown, the system will not boot using the
target BE.

**********************************************************************

In case of a failure while booting to the target BE, the following process
needs to be followed to fallback to the currently working boot environment:

1. Boot from the Solaris failsafe or boot in Single User mode from Solaris
Install CD or Network.

2. Mount the Parent boot environment root slice to some directory (like
/mnt). You can use the following commands in sequence to mount the BE:

zpool import rpool
zfs inherit -r mountpoint rpool/ROOT/s10x_u10wos_17b
zfs set mountpoint= rpool/ROOT/s10x_u10wos_17b
zfs mount rpool/ROOT/s10x_u10wos_17b

3. Run utility with out any arguments from the Parent boot
environment root slice, as shown below:

/sbin/luactivate

4. luactivate, activates the previous working boot environment and
indicates the result.

5. Exit Single User mode and reboot the machine.

**********************************************************************

Modifying boot archive service
Propagating findroot GRUB for menu conversion.
File propagation successful
File propagation successful
File propagation successful
File propagation successful
Deleting stale GRUB loader from all BEs.
File deletion successful
File deletion successful
File deletion successful
Activation of boot environment <07272012> successful.
bash-3.2#

============================================================
9. Now you can reboot. DO NOT USE reboot or halt. Use init 6
============================================================

bash-3.2# init 6
updating /platform/i86pc/boot_archive
propagating updated GRUB menu
Saving existing file in top level dataset for BE <07272012> as //boot/grub/menu.lst.prev.
File propagation successful
File propagation successful
File propagation successful
File propagation successful

=========================================================================================================
10. Now we are back up and running. I like to give the BE an intelligent name. How about the patch level?
=========================================================================================================

-bash-3.2# lustatus
Boot Environment Is Active Active Can Copy
Name Complete Now On Reboot Delete Status
————————– ——– —— ——— —— ———-
s10x_u10wos_17b yes no no yes –
07272012 yes yes yes no –

-bash-3.2# lurename -e 07272012 -n `uname -v|cut -d’_’ -f2`
System has findroot enabled GRUB
Renaming boot environment <07272012> to <147441-19>.
Saving existing file in top level dataset for BE <07272012> as //etc/bootsign.prev.
Changing the name of BE in the BE definition file.
Changing the name of BE in configuration file.
Changing the name of BE in Internal Configuration Files.
Changing zone paths.
Propagating the boot environment name change to all BEs.
Saving existing file in top level dataset for BE <147441-19> as //etc/bootsign.prev.
Saving existing file in top level dataset for BE <147441-19> as //boot/grub/menu.lst.prev.
Saving existing file in top level dataset for BE as //boot/grub/menu.lst.prev.
File propagation successful
File propagation successful
Boot environment <07272012> renamed to <147441-19>.

-bash-3.2# lustatus
Boot Environment Is Active Active Can Copy
Name Complete Now On Reboot Delete Status
————————– ——– —— ——— —— ———-
s10x_u10wos_17b yes no no yes –
147441-19 yes yes yes no –
-bash-3.2#

Leave a Reply

Your email address will not be published. Required fields are marked *