Riaan's SysAdmin Blog

My tips, howtos, gotchas, snippets and stuff. Use at your own risk!

Solaris

Solaris 11.1 Update from ISO

Sometimes you don't have a Solaris IPS local repo and just want to update to a newer SRU (Support Repository Update). You can check versions at Oracle support and last check this Doc ID contained a good list: Oracle Solaris 11.1 Support Repository Updates (SRU) Index (Doc ID 1501435.1)

Few things to note:

- In this example I updated from SRU 18.5 to SRU 19.6. Most of my updates was actually all the way from the GA release to the latest SRU. And for me I had to have both the Oracle online repo as well as the local incremental SRU set for the update to catch all possible dependencies.

- If updating to a latest SRU and coming from many versions back you might also see something similar to below when the update tries to activate the new BE (boot environment):
Error while accessing "/dev/rdsk/c2d1s0": No such file or directory
pkg: unable to activate solaris-1

I have not 100% figured out why this is happening and if its just related to LDOM's but so far once or twice when this occurred either one of the following or a combination of the following allowed me to manually activate the BE.  Reboot the updated guest, just doing a simple zpool status, destroying the newly created BE and redoing the update.  Like I said all or one of the above steps.  I have a suspicion its as simple as doing a zfs status and then the activate worked.

Update 7.18.14: The last upgrade I did I encountered the unable to activate error and a simple zpool status allowed me to do beadm activate.

Lets start by checking the existing version. This indicates we are at SRU 18.5 in this case.

# pkg list entire
NAME (PUBLISHER)                                  VERSION                    IFO
entire                                            0.5.11-0.175.1.18.0.5.0    i--

Since I have the luxury of staging on NFS we might as well mount the repo direct. Another option since this is a LDOM is to add a virtual cdrom the guest. Note below I am setting both the incremental repo as well as the Oracle support repo. Use pkg unset-publisher to clear entries you don't want.

# mount -F hsfs /software/solaris/sol-11_1_19_6_0-incr-repo.iso /mnt
# pkg set-publisher -g file:///mnt/repo solaris
# pkg set-publisher -P -g http://pkg.oracle.com/solaris/release/ solaris
# pkg publisher
PUBLISHER                   TYPE     STATUS P LOCATION
solaris                     origin   online F file:///mnt/repo/
solaris                     origin   online F http://pkg.oracle.com/solaris/release/

Now lets do the update. Since the README for SRU 19.6 explained license around java we need to include the --accept flag. Be warned the README might contain more information you need to adhere to for a successful update. In my case to be extra safe even though Solaris can maintain multiple BE's (boot environments), I also made a snapshot of the OS on the storage back end.

# pkg update --accept
           Packages to install:   1
            Packages to update:  72
       Create boot environment: Yes
Create backup boot environment:  No

DOWNLOAD                                PKGS         FILES    XFER (MB)   SPEED
Completed                              73/73     2018/2018    99.8/99.8    0B/s

PHASE                                          ITEMS
Removing old actions                         238/238
Installing new actions                       277/277
Updating modified actions                  3265/3265
Updating package state database                 Done
Updating package cache                         72/72
Updating image state                            Done
Creating fast lookup database                   Done

A clone of solaris-new-2 exists and has been updated and activated.
On the next boot the Boot Environment solaris-new-3 will be
mounted on '/'.  Reboot when ready to switch to this updated BE.


---------------------------------------------------------------------------
NOTE: Please review release notes posted at:

https://support.oracle.com/epmos/faces/DocContentDisplay?id=1501435.1
---------------------------------------------------------------------------

Lets take a look at the boot environments before reboot.

# beadm list
BE              Active Mountpoint Space  Policy Created
--              ------ ---------- -----  ------ -------
solaris-new-1   -      -          13.82M static 2014-01-30 08:27
solaris-new-2   N      /          3.13M  static 2014-05-19 06:37
solaris-new-3   R      -          12.37G static 2014-06-18 04:55
solaris-orig    -      -          11.73M static 2013-07-09 10:26
solaris-sru14.5 -      -          19.87M static 2014-01-29 06:07
# reboot

After a reboot the Solaris version and BE looks like this.

# pkg list entire
NAME (PUBLISHER)                                  VERSION                    IFO
entire                                            0.5.11-0.175.1.19.0.6.0    i--
# beadm list
BE              Active Mountpoint Space  Policy Created
--              ------ ---------- -----  ------ -------
solaris-new-1   -      -          13.82M static 2014-01-30 08:27
solaris-new-2   -      -          14.45M static 2014-05-19 06:37
solaris-new-3   NR     /          12.49G static 2014-06-18 04:55
solaris-orig    -      -          11.73M static 2013-07-09 10:26
solaris-sru14.5 -      -          19.87M static 2014-01-29 06:07

admin

Bio Info for Riaan