Solaris 11.2 SRU updates

Previously I wrote about updating Solaris 11.1 without going full blown IPS. Oracle used to have incremental ISO’s to download. I do not see those anymore for Solaris 11.2. Here is a previous article for reference:

Solaris 11.1 Update from ISO

In a data center I would maintain an IPS repo and incrementally update the repo when SRU’s are released. Guests are then updated against the repo. If you don’t want to maintain full blown IPS and just want to update a specific guest to a specific SRU version this article is focusing on that.

Some useful links you may want to look through first:
Create Local Repo:
http://www.oracle.com/technetwork/server-storage/solaris11/downloads/local-repository-2245081.html
http://www.oracle.com/technetwork/articles/servers-storage-admin/howto-set-up-repos-mirror-ips-2266101.html
http://appsdbaworkshop.blogspot.com/2014/09/configure-ips-repository-on-oracle.html

SRU Index:
Oracle Solaris 11.1 Support Repository Updates (SRU) Index (Doc ID 1501435.1)
Oracle Solaris 11.2 Support Repository Updates (SRU) Index (Doc ID 1672221.1)
https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=390313668034834&id=1672221.1&displayIndex=8&_afrWindowMode=0&_adf.ctrl-state=psan9sn51_234

We will focus on these steps:
Step 1. Stage SRU zip files and turn into a repo with install-repo.ksh.

Step 2. Update guest against repo.

Step 3. Optionally create an ISO.

Step 4: Update from custom ISO created in step 3.

I use Virtualbox for my testing so you can choose how to present folders or ISO’s to the guest. Since I have the guest additions on Solaris 11.2 guest I chose to use that instead of one of the links shows screenshots to create a ISO in Windows and present to Virtualbox that way.

Step 1: Stage SRU zip files and turn into a repo with install-repo.ksh.

Download and stage SRU zip files:

# ls -l 11.2_SRU5.5_src/
total 5370490
-rwxrwx---   1 root     vboxsf   1539220019 Jan  7 09:43 p20131812_1100_Solaris86-64_1of2.zip
-rwxrwx---   1 root     vboxsf   1210469972 Jan  7 09:37 p20131812_1100_Solaris86-64_2of2.zip

Download install-repo.ksh script and md5sums.txt:
** Note I initially ignored md5sums.txt and that will cause a warning only.  Better off just downloading that as well.

# ls -l install-repo.ksh
-rwxrwx---   1 root     vboxsf      5594 Jan  9 08:20 install-repo.ksh

Prepare repo:

# pwd
/mnt/sf_DATA/isos/Solaris
# mkdir IPS_SRU_11_2_5_5_0
# pwd
/mnt/sf_DATA/isos/Solaris/11.2_SRU5.5

# ../install-repo.ksh -d ../IPS_SRU_11_2_5_5_0
/mnt/sf_DATA/isos/Solaris/11.2_SRU5.5_src/sol-*-repo-md5sums.txt: No such file or directory
Uncompressing p20131812_1100_Solaris86-64_1of2.zip...done.
Uncompressing p20131812_1100_Solaris86-64_2of2.zip...done.</pre>
<pre>Repository can be found in ../IPS_SRU_11_2_5_5_0. 

** When I used a Virtualbox guest additions  mount as a target for the repo the install will work but I had issues later updating the guest.
** Also keep in mind with this method of updating you still need the Oracle repo as well to solve any dependencies introduced in the SRU.

# pwd
/mnt/sf_DATA/isos/Solaris/11.2_SRU5.5

# pkg set-publisher -G '*' -g file:////mnt/sf_DATA/isos/Solaris/IPS_SRU_11_2_5_5_0/ solaris
pkg set-publisher: The origin URIs for 'solaris' do not appear to point to a valid pkg repository.
Please verify the repository's location and the client's network configuration.
Additional details:

Unable to contact valid package repository
Encountered the following error(s):
Unable to contact any configured publishers.
This is likely a network configuration problem.
file protocol error: code: 71 reason: The following catalog files have incorrect permissions:
	/mnt/sf_DATA/isos/Solaris/IPS_SRU_11_2_5_5_0/publisher/solaris/catalog/catalog.attrs: expected mode: 644, found mode: 770

** Redid the repo prep to local / file system. I had enough room there so it worked fine.

# pwd
/mnt/sf_DATA/isos/Solaris/11.2_SRU5.5
# ../install-repo.ksh -d /IPS_SRU_11_2_5_5_0
/mnt/sf_DATA/isos/Solaris/11.2_SRU5.5/sol-*-repo-md5sums.txt: No such file or directory
Uncompressing p20131812_1100_Solaris86-64_1of2.zip...done.
Uncompressing p20131812_1100_Solaris86-64_2of2.zip...done.
Repository can be found in /IPS_SRU_11_2_5_5_0.

Step 2: Update guest against repo.

# pkg set-publisher -g file:////IPS_SRU_11_2_5_5_0/ solaris

# pkg publisher
PUBLISHER                   TYPE     STATUS P LOCATION
solaris                     origin   online F file:///IPS_SRU_11_2_5_5_0/
solaris                     origin   online F http://pkg.oracle.com/solaris/release/

# pkg update -nv

# pkg update
            Packages to remove:   1
            Packages to update: 153
       Create boot environment: Yes
Create backup boot environment:  No
DOWNLOAD                                PKGS         FILES    XFER (MB)   SPEED
Completed                            154/154     9014/9014  345.9/345.9    0B/s

PHASE                                          ITEMS
Removing old actions                       1742/1742
Installing new actions                     2635/2635
Updating modified actions                  8361/8361
Updating package state database                 Done
Updating package cache                       154/154
Updating image state                            Done
Creating fast lookup database                   Done
Updating package cache                           1/1 

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

Updating package cache                           1/1 

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

http://www.oracle.com/pls/topic/lookup?ctx=solaris11&id=SERNS
---------------------------------------------------------------------------

# beadm list
BE                 Active Mountpoint Space  Policy Created
--                 ------ ---------- -----  ------ -------
solaris-1          N      /          29.69M static 2014-07-31 15:01
solaris-1-backup-1 -      -          183.0K static 2014-08-28 09:39
solaris-1-backup-2 -      -          191.0K static 2014-12-02 12:05
solaris-2          R      -          13.49G static 2015-01-09 10:21

Step 3: Optionally create an ISO.

# pwd
/mnt/sf_DATA/isos/Solaris/11.2_SRU5.5
# mkdir /IPS_SRU_11_2_5_5_0
# ./install-repo.ksh -d /IPS_SRU_11_2_5_5_0 -I -v
Uncompressing p20131812_1100_Solaris86-64_1of2.zip...done.
Uncompressing p20131812_1100_Solaris86-64_2of2.zip...done.
Repository can be found in /IPS_SRU_11_2_5_5_0.
Initiating repository verification.
Building ISO image...
...done.
ISO image and instructions for using the ISO image are at:
/mnt/sf_DATA/isos/Solaris/11.2_SRU5.5/sol-11_2-repo.iso
/mnt/sf_DATA/isos/Solaris/11.2_SRU5.5/README-repo-iso.txt

Step 4: Update from custom ISO created in step 3.
** Attach ISO to guest

root@solaris11:~# pkg list entire
NAME (PUBLISHER)                                  VERSION                    IFO
entire                                            0.5.11-0.175.2.0.0.42.0    i--

root@solaris11:~# pkg publisher
PUBLISHER                   TYPE     STATUS P LOCATION
solaris                     origin   online F http://pkg.oracle.com/solaris/release/

root@solaris11:~# pkg set-publisher -g file:///media/SOL-11_2_REPO/repo solaris

root@solaris11:~# pkg publisher
PUBLISHER                   TYPE     STATUS P LOCATION
solaris                     origin   online F file:///media/SOL-11_2_REPO/repo/
solaris                     origin   online F http://pkg.oracle.com/solaris/release/
</pre>
<pre>root@solaris11:~# pkg update
</pre>
<pre>root@solaris11:~# pkg list entire NAME (PUBLISHER) VERSION IFO entire 0.5.11-0.175.2.5.0.5.0 i-- 

Solaris 11.1 Using Wget for Oracle Software Downloads

Following is my notes on several Solaris 11 procedures.  I just bunched it together but you may just need one of them and most unlikely all of them at the same time.

** Of course you need to comply with Oracle licensing when downloading software and need an OTN account.

Index

  1. Using wget to download a support patch from Oracle support site.
  2. Installing a package in Solaris 11 but no Solaris 11 repo access and incremental repo shows dependency failures.  Meaning we need a full repo also to meet dependencies.
  3. Downloading with wget from Oracle Edelivery using cookies.

1. Downloading from Oracle support using wget.

(In this example I grabbed Solaris 11.1 SRU 19.6)

Patch 18746419: ORACLE SOLARIS 11.1.19.6.0 REPO ISO IMAGE (SPARC/X86 (64-BIT))

oracle_wget_option

Download the “WGET Options” file at the bottom.  Set your password in the script and run the script.

# grep ^SSO_P wgetsru19.6.sh
SSO_PASSWORD=

Inside the wget script the actual wget will look something like this:

$WGET --user-agent="Mozilla/5.0" --load-cookies=$COOKIE_FILE --save-cookies=$COOKIE_FILE --keep-session-cookies "https://updates.oracle.com/Orion/Services/download/p18746419_1100_SOLARIS64.zip?aru=17658104&patch_file=p18746419_1100_SOLARIS64.zip" -O $OUTPUT_DIR/p18746419_1100_SOLARIS64.zip

 

  1. Installing a package in Solaris 11

    Keeping in mind I have no Solaris 11 online repo access and using only the incremental repo shows dependency failures.  Meaning we need a full repo (either online or iso) to meet dependencies.

I was trying to install VNC server and in my case I only had the SRU 19.6 incremental CD repo to work with.  So I had to go get the full repo also to satisfy dependencies.

# lofiadm -a /software/solaris/sol-11_1_18_5_0-incr-repo.iso
/dev/lofi/1
# mount -o ro -F hsfs /dev/lofi/1 /mnt
# pkg set-publisher -g file:///mnt/repo solaris
# pkg publisher
PUBLISHER      TYPE      STATUS P    LOCATION
solaris        origin    online F    file:///mnt/repo/
# pkg install pkg:/x11/server/xvnc@1.1.0-0.175.1.17.0.3.1348
Creating Plan (Solver setup): /
pkg install: No matching version of x11/server/xvnc can be installed:
Reject: pkg://solaris/x11/server/xvnc@1.1.0,5.11-0.175.1.17.0.3.1348:20140221T230347Z
Reason: A version for 'require' dependency on pkg:/x11/keyboard/xkbcomp cannot be found

Normally you can at this point just add the Oracle online server repo from pkg.oracle.com.  But in my case this specific host is firewalled off and no http outbound access allowed.  If you did have http outbound you could end up with below and it should work:

# pkg publisher
PUBLISHER                   TYPE     STATUS P LOCATION
solaris                     origin   online F file:///mnt/repo/
solaris                     origin   online F http://pkg.oracle.com/solaris/release/

 

  1. A) Downloading with wget from Oracle Edelivery using cookies.

 I am proceeding to download the following full repo.  You can also download this in a browser but I did not want to download to my desktop and turn around and upload through a VPN connection so I wanted wget to download straight to the server.

** More on cookies and edelivery here: http://www.pythian.com/blog/how-to-download-oracle-software-using-wget-or-curl/

Files are here: http://www.oracle.com/technetwork/server-storage/solaris11/downloads/index.html

solaris11_full_repo

# wget --load-cookies=./cookies.txt --no-check-certificate "http://download.oracle.com/otn/solaris/11_1/sol-11_1-repo-full.iso-a"

# wget --load-cookies=./cookies.txt --no-check-certificate <a href="http://download.oracle.com/otn/solaris/11_1/sol-11_1-repo-full.iso-b">http://download.oracle.com/otn/solaris/11_1/sol-11_1-repo-full.iso-b</a>

# cat sol-11_1-repo-full.iso-a sol-11_1-repo-full.iso-b &gt; sol-11_1-repo-full.iso

 

3. B) Now let’s install the software

# lofiadm -a /software/solaris/sol-11_1-repo-full.iso
/dev/lofi/2
# mount -o ro -F hsfs /dev/lofi/2 /sol11
# ls /sol11/
COPYRIGHT  NOTICES    README     repo
# pkg set-publisher -g file:///sol11/repo solaris
# pkg publisher
PUBLISHER                   TYPE     STATUS P LOCATION
solaris                     origin   online F file:///mnt/repo/
solaris                     origin   online F file:///sol11/repo/

# pkg install pkg:/x11/server/xvnc@1.1.0-0.175.1.17.0.3.1348
Packages to install: 35
Create boot environment: No
Create backup boot environment: No
Services to change:  5

DOWNLOAD                                PKGS         FILES    XFER (MB)   SPEED
Completed                              35/35     2305/2305    26.2/26.2    0B/s

PHASE                                          ITEMS
Installing new actions                     3341/3341
Updating package state database                 Done
Updating image state                            Done
Creating fast lookup database                   Done

# pkg unset-publisher solaris
# pkg publisher
PUBLISHER                   TYPE     STATUS P LOCATION
# umount /sol11/
# rmdir /sol11/
# umount /mnt
# lofiadm -d /dev/lofi/2
# lofiadm -d /dev/lofi/1