Solaris Express Live Upgrade

February 5th, 2008 by tyr

I’ve been having some problems establishing DomU’s with my new Solaris Express install. Before spending to much time running into issues that may have already been fixed I thought it worth while to move to the latest release. Fortunately the default Solaris Express install is ahead of me and has saved a slice for a live upgrade boot environment. Here’s my experience of moving from snv_78 to snv_81.

When doing live upgrade it’s usually a good idea to install SUNWlur and SUNWluu from the release you are upgrading TO. eg

lofiadm -a /net/192.168.0.10/pool/iso/nevada/sol-nv-b81-x86-dvd.iso
mount -F hsfs /dev/lofi/1 /mnt
pkgadd -d /mnt/Solaris_11/Product/ SUNWlur SUNWluu

This gives a clear warning about patch installation at the end of SUNWluu install.

=========================================================================
IMPORTANT NOTICE  

Patches Needed to Run Solaris Live Upgrade  

Correct operation of Solaris Live Upgrade requires that a limited set of
patch revisions be installed for SunOS 5.11 for the i386 platform.  

Before installing or running Live Upgrade, you are required to install a
limited set of patch revisions.  Make sure you have the most recently
updated patch list by consulting sunsolve.sun.com. Search for the info doc
72099 on the SunSolve(tm) web site.  

Live Upgrade may fail to work properly if the latest limited set
of patch revisions are not installed on this system.  

For x86 systems: A reboot is required after patch application, else
Live Upgrade may fail.  

=========================================================================

Ok that’s pretty clear. However if you go hunting for 72099 on SunSolve with the SunSolve search tool you may not find it as it has been renumbered at 206844, you can get it here. In our case there’s not going to be any patches as we’re upgrading between Nevada installs but if we were moving from one of the listed releases we should patch with the listed patches.

Now we’re ready to run lucreate, using the spare slice created by the original installer.

bash-3.2# lucreate -c snv_78 -m /:/dev/dsk/c2d0s4:ufs -n snv_81
Discovering physical storage devices
Discovering logical storage devices
Cross referencing storage devices with boot environment configurations
Determining types of file systems supported
Validating file system requests
Preparing logical storage devices
Preparing physical storage devices
Configuring physical storage devices
Configuring logical storage devices
ERROR: The system must be rebooted after applying required patches.
Please reboot and try again.
bash-3.2#

Hmm, that’s not too smart. A reboot didn’t help. Since it’s failing when managing the devices I decided to boot outside the xVM hypervisor and try again, which worked as expected. On further investigation this is a known issue that is marked WONTFIX, so it seems live upgrade is not an option in a xVM environment, at least for the Dom0.

bash-3.2# lucreate -c snv_78 -m /:/dev/dsk/c2d0s4:ufs -n snv_81
Discovering physical storage devices
Discovering logical storage devices
Cross referencing storage devices with boot environment configurations
Determining types of file systems supported
Validating file system requests
Preparing logical storage devices
Preparing physical storage devices
Configuring physical storage devices
Configuring logical storage devices
Analyzing system configuration.
No name for current boot environment.
Current boot environment is named (snv_78).
Creating initial configuration for primary boot environment (snv_78).
The device (/dev/dsk/c2d0s0) is not a root device for any boot environment; cannot get BE ID.
PBE configuration successful: PBE name (snv_78) PBE Boot Device (/dev/dsk/c2d0s0).
Comparing source boot environment (snv_78) file systems with the file
system(s) you specified for the new boot environment. Determining which
file systems should be in the new boot environment.
Updating boot environment description database on all BEs.
Searching /dev for possible boot environment filesystem devices  

Updating system configuration files.
The device (/dev/dsk/c2d0s4) is not a root device for any boot environment; cannot get BE ID.
Creating configuration for boot environment (snv_81).
Source boot environment is (snv_78).
Creating boot environment (snv_81).
Checking for GRUB menu on boot environment (snv_81).
opening /devices//pci@0,0/pci8086,7270@1d,7/hub@3/storage@3/disk@0,0:q,raw failed errno 6
-snip more usb errors-
The boot environment (snv_81) does not contain the GRUB menu.
Creating file systems on boot environment (snv_81).
Creating (ufs) file system for (/) in zone (global) on (/dev/dsk/c2d0s4).
Mounting file systems for boot environment (snv_81).
Calculating required sizes of file systems for boot environment (snv_81).
Populating file systems on boot environment (snv_81).
Checking selection integrity.
Integrity check OK.
Populating contents of mount point (/).
Copying.
Creating shared file system mount points.
Creating compare databases for boot environment (snv_81).
Creating compare database for file system (/).
Updating compare databases on boot environment (snv_81).
Making boot environment (snv_81) bootable.
Updating bootenv.rc on ABE (snv_81).
opening /devices//pci@0,0/pci8086,7270@1d,7/hub@3/storage@3/disk@0,0:q,raw failed errno 6
-snip more usb errors-
Population of boot environment (snv_81) successful.
Creation of boot environment (snv_81) successful.

Now try the luupgrade. Unfortunately it was less than successful

bash-3.2# luupgrade -u -n snv_81 -s /mnt
ERROR: The media miniroot mountpoint does not exist .

I’m not sure what it was expecting to find at the listed path but there usual collection of files were there

bash-3.2# ls /mnt/Solaris_11/Tools/Boot/
amd64             javaui.cpio.bz2   multiboot         pkg_db.cpio.bz2   unix              X.cpio.bz2
gnome.cpio.bz2    lpmisc.cpio.bz2   perl.cpio.bz2     pxegrub           X_small.cpio.bz2  x86.miniroot

Inexplicably running it again worked!

bash-3.2# luupgrade -u -n snv_81 -s /mnt
Copying failsafe kernel from media.
Uncompressing miniroot
Uncompressing miniroot archive (Part2)
13362 blocks
Creating miniroot device
miniroot filesystem is (ufs)
Mounting miniroot at (/mnt/Solaris_11/Tools/Boot)
Mounting miniroot Part 2 at (/mnt/Solaris_11/Tools/Boot)
Validating the contents of the media (/mnt).
The media is a standard Solaris media.
The media contains an operating system upgrade image.
The media contains (Solaris) version (11).
Constructing upgrade profile to use.
Locating the operating system upgrade program.
Checking for existence of previously scheduled Live Upgrade requests.
Creating upgrade profile for BE (snv_81).
Checking for GRUB menu on ABE (snv_81).
Checking for x86 boot partition on ABE.
Determining packages to install or upgrade for BE (snv_81).
Performing the operating system upgrade of the BE (snv_81).
CAUTION: Interrupting this process may leave the boot environment unstable
or unbootable.
Upgrading Solaris: 100% completed
Installation of the packages from this media is complete.
Deleted empty GRUB menu on ABE (snv_81).
Adding operating system patches to the BE (snv_81).
The operating system patch installation is complete.
ABE boot partition backing deleted.
Configuring failsafe for system.
Failsafe configuration is complete.
INFORMATION: The file (/var/sadm/system/logs/upgrade_log) on boot
environment (snv_81) contains a log of the upgrade operation.
INFORMATION: The file (/var/sadm/system/data/upgrade_cleanup) on boot
environment (snv_81) contains a log of cleanup operations required.
INFORMATION: Review the files listed above. Remember that all of the files
are located on boot environment (snv_81). Before you activate boot
environment (snv_81), determine if any additional system maintenance is
required or if additional media of the software distribution must be
installed.
The Solaris upgrade of the boot environment (snv_81) is complete.
Installing failsafe
Failsafe install is complete.

Success!

Let’s boot it

bash-3.2# luactivate snv_81
Saving latest GRUB loader.  

Generating partition and slice information for ABE (snv_81)
Boot menu exists.
Generating direct boot menu entries for ABE.
Generating xVM menu entries for ABE.
Generating direct boot menu entries for PBE.
Generating xVM menu entries for PBE.  

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

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. Do *not* change *hard* disk order in the BIOS.  

2. Boot from the Solaris Install CD or Network and bring the system to
Single User mode.  

3. Mount the Parent boot environment root slice to some directory (like
/mnt). You can use the following command to mount:  

     mount -Fufs /dev/dsk/c2d0s0 /mnt  

4. Run (luactivate) utility with out any arguments from the Parent boot
environment root slice, as shown below:  

     /mnt/sbin/luactivate  

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

6. Exit Single User mode and reboot the machine.  

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

Modifying boot archive service
GRUB menu is on device: (/dev/dsk/c2d0s0).
Filesystem type for menu device: (ufs).
Activation of boot environment (snv_81) successful.

An init 6 later and, boom, we’re running snv_81:

                   Solaris Express Community Edition snv_81 X86
           Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
                        Use is subject to license terms.
                            Assembled 15 January 2008

So, with a couple of bumps along the way, we’ve got to the desired result and I’m ready to look again at establishing some DomU’s.

Posted in Solaris

One Response

  1. system-log:tyr » Solaris Express Live Upgrade (Part 2)

    [...] while ago I showed how I upgraded my Solaris Express system using Live Upgrade. Now it’s time to upgrade again. [...]

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.