Friday May 22, 2009

Installing "extra" packages against OpenSolaris 2008.11 (with or without support repository updates)

It took me a bit to work out what was going on here (including a number of re-installs to make sure I hadn't screwed up), so I thought it worth sharing.

First, what a failure looks like:

After following Chris's instructions for adding the extra repository, I tried to install flash from it so the kids could play their browser based flash games.

$ pfexec pkg install pkg://extra/web/firefox/plugin/flash
Creating Plan |                        
pkg: the following package(s) violated constraints:
        Package pkg:/SUNWcsl@0.5.11,5.11-0.111 conflicts with constraint in installed pkg:/entire: 
                Pkg SUNWcsl: Optional min_version: 0.5.11,5.11-0.101 max version: 0.5.11,5.11-0.101 defined by: pkg:/entire

It turns out that what is at issue here is that the extra repository now has the "fat" packages that we will be using for 2009.06. The pkg command on 2008.11 (with any number of support repository updates - I was originally on SRU4 before re-install) can't handle these so it produces that cryptic message.

So, what can we do about it?

The first step is to have a look at all versions of the package we are interested in on extra.

$ pfexec pkg list -af 'pkg://extra/web/firefox/plugin/flash'
NAME (AUTHORITY)                              VERSION         STATE      UFIX
web/firefox/plugin/flash (extra)     known      ----
web/firefox/plugin/flash (extra)     known      u---
web/firefox/plugin/flash (extra)              9.0.151-0.101   known      u---
web/firefox/plugin/flash (extra)              9.0.125-0.101   known      u---
web/firefox/plugin/flash (extra)              9.0.125-0.101   known      u---

The version 9 packages will work ok, so we simply install one of those:

$ pfexec pkg install "pkg://extra/web/firefox/plugin/flash@9.0.151-0.101"
PHASE                                          ITEMS
Indexing Packages                            554/554 
DOWNLOAD                                    PKGS       FILES     XFER (MB)
Completed                                    1/1         3/3     2.46/2.46 

PHASE                                        ACTIONS
Install Phase                                  19/19 
Reading Existing Index                           9/9 
Indexing Packages                                1/1 

And done. The note to myself for 2009.06 is that that 4gb root disc is just not going to cut it anymore :) Time for something more reasonable.

Monday Sep 01, 2008

Installing OpenSolaris 2008.05 under Virtual Box and Upgrading it

I'm in the process of preparing a Transfer of information (TOI) for Support Services in Asia Pacific on some of the basic differences and things to watch out for in providing Support for OpenSolaris (as against Support for Solaris 10 which they are already doing). One of the things that I am asking folks to do is to have already installed and upgraded from the 2008.05 distribution. I went hunting for documentation on this and the closest that I could find was an email trail, and there were corrections to that process further down the trail.

As a result I rewrote the instructions after doing a lot of running through them to make sure I got it right.

I noticed someone in #opensolaris today having trouble and they had missed out one of the listed steps which he didn't see in the release notes. As a result I was asked to blog this stuff, so here we go.

As we don't really have an easy way to do the equivalent of a jumpstart from this image in our labs, I'm recommending folks try it with Virtual Box.

There is excellent documentation on installing both Virtual Box and Open Solaris available at This includes information on downloading the packages and the ISO image for OpenSolaris 2008.05. Unfortunately it does not discuss installing Virtual Box on Solaris. Fortunately, this is not too hard. Simply download the appropriate package and install it with pkgadd(1M).

Once you have the distribution installed, you will need to upgrade it to the currently available system. Doing this will step you through exactly what is required to do this using the live-upgrade replacement and taking advantage of the system using ZFS root.

General instructions on updating to the latest OpenSolaris development build from the 2008.05 ISO Image

  1. Before using the "image-update" subcommand, it is recommended that the latest available version of the IPS software be installed for your current boot environment

    $ BUILD=`uname -v | sed s/snv_//`
    $ pfexec pkg refresh
    $ pfexec pkg install SUNWipkg@0.5.11-0.$BUILD
    $ pfexec pkg install entire@0.5.11-0.$BUILD
    One thing that I noticed when walking through these instructions was that NWAM had not modified /etc/nsswitch to include dns on the line for hosts. If you have this problem, you can edit the file with "pfexec vi /etc/nsswitch.conf" to fix this if you are unable to resolve
  2. Before proceeding to the next step, verify your OpenSolaris build number

    $ echo $BUILD
  3. If you are running build 93 or greater, you can use "pfexec pkg image-update" and skip the remainder of this page. In this case we are installing from the 2008.05 image which is based on build 86.

  4. As you are using a build prior to 93, it is recommended one apply the update directly to an alternate boot environment. First, display the list of the existing BEs on the system

    $ beadm list
    BE         Active Active on Mountpoint Space
    Name       reboot      Used
    ----       ------ --------- ---------- -----
    opensolaris    no        no          - 33.92M
    opensolaris-1 yes       yes          - 17.06M

    Next, choose the name of a new BE - if the most recent created BE is of the form "opensolaris-N" where N is an integer, then a suitable choice for the new BE is "opensolaris-{N+1}". In the above example, the new BE would be "opensolaris-2".

    Then, execute the following sequence to create, mount, and update the new BE

    $ pfexec beadm create opensolaris-1
    $ pfexec beadm mount opensolaris-1 /mnt
    $ pfexec pkg -R /mnt image-update
  5. If you are running build 86 (which you will be if you used the 2008.05 image), one additional work-around is required.

    \*\*\*\*\*\*\*\*\*\* IMPORTANT \*\*\*\*\*\*\*\*\*\*

    Due to changes in the GRUB boot system, one must manually update the Master Boot Record (MBR) to include these latest changes. Failure to follow these instructions when updating from 2008.05 (build 86) to a later build will result in a system that does not boot by default and instead the original boot environment must be manually selected.

    Update the GRUB configuration on your ZFS boot device(s) using

    $ pfexec /mnt/boot/solaris/bin/update_grub -R /mnt
  6. Unmount the boot environment you just updated and activate it.

    $ pfexec beadm unmount opensolaris-1
    $ pfexec beadm activate opensolaris-1

    When you're ready to boot into the updated boot environment, you can reboot(1M) or init(1M) as usual.

Technorati Tags:


* - Solaris and Network Domain, Technical Support Centre

Alan is a kernel and performance engineer based in Australia who tends to have the nasty calls gravitate towards him


« July 2016

No bookmarks in folder

Sun Folk

No bookmarks in folder

Non-Sun Folk
Non-Sun Folks

No bookmarks in folder