Alan Hargreaves's Weblog

Installing OpenSolaris 2008.05 under Virtual Box and Upgrading it

Alan Hargreaves
Senior Principal Technical Support Engineer

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 http://dlc.sun.com/osol/docs/content/IPS/virtualbox.html. 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 pkg.opensolaris.com.

  2. Before proceeding to the next step, verify your OpenSolaris build

    $ 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

    \*\*\*\*\*\*\*\*\*\* 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:

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.