Getting Started With OpenSolaris
Previous Next

Updating Software on Your System

In the OpenSolaris releases, you upgrade an entire image or boot environment by using the pkg image-update command to update all the packages in that image that have available updates.


Note - To upgrade from the OpenSolaris 2008.11 release to the OpenSolaris 2009.06 release, you must use a particular procedure, which is described at Updating Your System to OpenSolaris Development Builds.


Use one of the following methods to upgrade an image or boot environment:

  • You can use the Package Manager GUI to update all installed the packages in your image to the latest available version for each package. You accomplish this task by selecting the Update All option in the GUI.

    For information, see The Package Manager.

  • The OpenSolaris operating system includes an Update Manager tool on the desktop that notifies users when updates are available for the packages that are installed on their system. You can use this tool to update all the packages in your image.

    To manually start the Update Manager, from the Main Menubar, select System > Administration > Update Manager.

    For information, see The Update Manager.

  • Alternately, you can use the pkg image-update command to perform that same task.

    pkg image-update [-nv]

    The pkg image-update command updates all packages installed on your image that have available updates. Use the -n option to perform a test run of the updates. With the -n option, the command executes, but makes no persistent changes to the image. Or, you can use the -v option. With the -v option, the update is performed with progress messages displayed during the operation.


    Note - The pkg image-update command does not support zones in boot environments prior to the OpenSolaris 2008.11 release. Delete these zones before you upgrade your image to the OpenSolaris 2009.06 release. If you are using the OpenSolaris developmental builds, the pkg image-update command has no support for zones prior to build 98.


Using either the Package Manager or the pkg image-update command, the process of updating all the packages automatically creates a clone: a new, bootable environment (BE). The process of updating all the packages applies the changes to the clone instead of to the original boot environment. After the successful completion of the changes to the clone and reboot of the system, the new clone is provided as the default, active boot environment in the GRUB menu. The original boot environment remains on the GRUB menu as an alternate selection.

A clone of the boot environment includes everything hierarchically under the main root dataset of the original boot environment. Shared file systems are not under the root dataset and are not cloned. Instead, the boot environment accesses the original shared file systems.


Note - The pkg image-update process does not upgrade zones. If you have included zones in your OpenSolaris environment, the pkg image-update process clones these existing zones into the new boot environment, but these zones are not upgraded. You must manually upgrade each of these zones.


After upgrading an image or boot environment, you can use the beadm list command to see a list of the boot environments on the system, including the new boot environment that was created by the pkg image-update command. See the following example.

os# pkg image-update
A clone of opensolaris exists and has been updated and activated. 
On next boot the Boot Environment opensolaris-1 will be mounted on '/'. 
Reboot when ready to switch to this updated BE.

os# beadm list

BE            Active Active on Mountpoint Space
Name                 reboot               Used
----          ------ --------- ---------- -----
opensolaris   yes    no        legacy     57.5K
opensolaris-1 no     yes       -          2.59G 

In this example, the initial boot environment created by the installer is named “opensolaris.” The boot environment created by the pkg image-update command is automatically named “opensolaris-1.”

After rebooting to the changed boot environment, any inactive boot environment can be destroyed to save space by running the beadm destroy command. For instructions, see Managing Boot Environments..

For further information about the pkg command, see the OpenSolaris 2009.06 Image Packaging System Guide or the pkg(1) man page.

Updating Specific Packages

As an alternative to upgrading an entire image or boot environment, you can update specific installed packages or package groups in the image or in the active boot environment by using either the Package Manager GUI or the pkg install command. Either method automatically checks for newer versions of specific packages or package groups, and installs them if they are available. Any dependent packages are also automatically updated.

For further information about updating specific packages, see The Package Manager, the OpenSolaris 2009.06 Image Packaging System Guide, or the pkg(1) man page.

Previous Next