tutorial | upgrading OpenSolaris to Oracle Solaris 11

As Solaris 11 can be used without fee for personal, non-commercial and non-production use, I planned to upgrade my OpenSolaris to Solars 11.

Oracle provides a straight upgrade path from Solaris 11 Express or the early adapter version, but for OpenSolaris user they still using the last stable release (2009.06) or the last  developer release (b134) it’s hard to find information, Oracle does not provide any official documentation.

Anyway there is the way of a a multi-step upgrade, the difficulties are in step 2 as  the pkg command always try to upgrade to the latest available version,  there is no support (yet) to update to a specific build or branch even in the repository are the old builds available. For this issue are some workarounds described.

Step 1: Updating to OpenSolaris final version (b134)
Step 2: Updating to Solaris 11 Express
Step 3: Updating to Solaris 11/11

Step 1: Updating OpenSolaris to final version (b134)

Only the final version of OpenSolaris supports the –non-sticky option for managing publishers. The final version you can find at the legacy repository hosted by the OpenIndiana project.

pfexec pkg install SUNWipkg SUNWipkg-um SUNWipkg-gui
pfexec pkg set-publisher -O http://pkg.openindiana.org/legacy opensolaris.org
pfexec pkg image-update -v--be-name opensolaris-clean

In case that the system is already OpenSolaris 134 a new boot environment should be created by

pfexec beadm create opensolaris-clean

This keeps the old production system untouched. All changes of the system (change of publishers, removal of problematic packages) will only impact the new boot environment (That’s why I love Solaris).
Reboot to the new created boot environment.

Step 2: Updating to Solaris 11 Express
Setting the OpenSolaris repositories to non-sticky

The –non-sticky option instructs the system to install packages from the new preferred repository (solaris) over the repository they were originally installed from (opensolaris.org)
pfexec pkg set-publisher --non-sticky opensolaris.org
pfexec pkg set-publisher --non-sticky extra

Connecting to a Solaris 11 Express publisher

This is the most problematic point as Oracle do not provide a separate repository for Solaris 11 Express. You still can find some mirrors alive, some of your friends may have a local package repository that you can access. That would be the easiest way, than you have just set up the new preferred publisher like this

pfexec pkg set-publisher -g http://server:port_number/

If there is no separate package server available you have several options.
Option 1: Setup your own package server and populate it with the packages from the repository DVD for Solaris 11 Express released by Oracle
Option 2: Setting up a package server and pulling the packages of a specific build (151) from Oracle’s repository
Option 3: Using the entire package to update to a specific build from Oracle’s repository

For option 1 and 2 follow the instructions in the tutorial “setting up a local repository on OpenIndiana/Solaris 11” and set the publisher to your local repository

pfexec pkg set-publisher -g http://yourserver:port_number/

For option 3 you can find a step by step uide from Brian Leonard on his blog “The Observatory“.

Removing problematic packages

Some packages, such as PostgreSQL, have been removed from Solaris 11 Express. The image update will terminate the update if it finds these problematic packages installed. The release notes contain a complete list of the features removed. Also note the comment about removing any packages you may have installed from the contrib repository. You can find problematic packages by only testing an upgrade with the -n flag.

pfexec pkg image-update -nv

and remove them  (in this case postgresql).

pfexec pkg uninstall -rv SUNWpostgr-83-libs


Before we can update the image we have to update the package system

pfexec pkg install pkg:/package/pkg

Now we are able to update in to a new boot environment

pfexec pkg image-update -v--be-name solaris-11-express --licenses | more

Step 3: Updating to Solaris 11/11

Assume the role of root, change the publisher solaris and update the package management

su -
pkg set-publisher -g http://pkg.oracle.com/solaris/release
pkg publisher
pkg set-publisher -P solaris
pkg set-publisher --non-sticky solaris-express
pkg update pkg:/package/pkg

Reboot, update the system and reboot again

su -
pkg update --accept

and here we are.

Links and Credits:
Oracle Documentation: Transitioning From Oracle Solaris 10 to Oracle Solaris 11
Brian Leonard on The Observatory

Leave a Reply

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