{"id":713,"date":"2014-06-18T05:32:06","date_gmt":"2014-06-18T12:32:06","guid":{"rendered":"http:\/\/blog.ls-al.com\/?p=713"},"modified":"2014-07-18T09:08:39","modified_gmt":"2014-07-18T16:08:39","slug":"solaris-11-1-update-from-iso","status":"publish","type":"post","link":"https:\/\/blog.ls-al.com\/solaris-11-1-update-from-iso\/","title":{"rendered":"Solaris 11.1 Update from ISO"},"content":{"rendered":"

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)<\/strong><\/p>\n

Few things to note:<\/p>\n

- 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.<\/p>\n

- 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):
\nError while accessing \"\/dev\/rdsk\/c2d1s0\": No such file or directory<\/span><\/em>
\n pkg: unable to activate solaris-1<\/span><\/em><\/p>\n

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. \u00a0Reboot the updated guest, just doing a simple zpool status, destroying the newly created BE and redoing the update. \u00a0Like I said all or one of the above steps. \u00a0I have a suspicion its as simple as doing a zfs status and then the activate worked.<\/p>\n

Update 7.18.14<\/span><\/strong>: The last upgrade I did I encountered the unable to activate error and a simple zpool status<\/span> allowed me to do\u00a0beadm activate<\/span>.<\/p>\n

Lets start by checking the existing version. This indicates we are at SRU 18.5 in this case.<\/p>\n

\r\n# pkg list entire\r\nNAME (PUBLISHER)                                  VERSION                    IFO\r\nentire                                            0.5.11-0.175.1.18.0.5.0    i--\r\n<\/pre>\n

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.<\/p>\n

\r\n# mount -F hsfs \/software\/solaris\/sol-11_1_19_6_0-incr-repo.iso \/mnt\r\n# pkg set-publisher -g file:\/\/\/mnt\/repo solaris\r\n# pkg set-publisher -P -g http:\/\/pkg.oracle.com\/solaris\/release\/ solaris\r\n# pkg publisher\r\nPUBLISHER                   TYPE     STATUS P LOCATION\r\nsolaris                     origin   online F file:\/\/\/mnt\/repo\/\r\nsolaris                     origin   online F http:\/\/pkg.oracle.com\/solaris\/release\/\r\n<\/pre>\n

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.<\/p>\n

\r\n# pkg update --accept\r\n           Packages to install:   1\r\n            Packages to update:  72\r\n       Create boot environment: Yes\r\nCreate backup boot environment:  No\r\n\r\nDOWNLOAD                                PKGS         FILES    XFER (MB)   SPEED\r\nCompleted                              73\/73     2018\/2018    99.8\/99.8    0B\/s\r\n\r\nPHASE                                          ITEMS\r\nRemoving old actions                         238\/238\r\nInstalling new actions                       277\/277\r\nUpdating modified actions                  3265\/3265\r\nUpdating package state database                 Done\r\nUpdating package cache                         72\/72\r\nUpdating image state                            Done\r\nCreating fast lookup database                   Done\r\n\r\nA clone of solaris-new-2 exists and has been updated and activated.\r\nOn the next boot the Boot Environment solaris-new-3 will be\r\nmounted on '\/'.  Reboot when ready to switch to this updated BE.\r\n\r\n\r\n---------------------------------------------------------------------------\r\nNOTE: Please review release notes posted at:\r\n\r\nhttps:\/\/support.oracle.com\/epmos\/faces\/DocContentDisplay?id=1501435.1\r\n---------------------------------------------------------------------------\r\n<\/pre>\n

Lets take a look at the boot environments before reboot.<\/p>\n

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

After a reboot the Solaris version and BE looks like this.<\/p>\n

\r\n# pkg list entire\r\nNAME (PUBLISHER)                                  VERSION                    IFO\r\nentire                                            0.5.11-0.175.1.19.0.6.0    i--\r\n# beadm list\r\nBE              Active Mountpoint Space  Policy Created\r\n--              ------ ---------- -----  ------ -------\r\nsolaris-new-1   -      -          13.82M static 2014-01-30 08:27\r\nsolaris-new-2   -      -          14.45M static 2014-05-19 06:37\r\nsolaris-new-3   NR     \/          12.49G static 2014-06-18 04:55\r\nsolaris-orig    -      -          11.73M static 2013-07-09 10:26\r\nsolaris-sru14.5 -      -          19.87M static 2014-01-29 06:07\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"

Sometimes you don’t have a Solaris IPS local repo and just want to update to a newer SRU (Support Repository<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[],"class_list":["post-713","post","type-post","status-publish","format-standard","hentry","category-solaris"],"_links":{"self":[{"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/posts\/713","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/comments?post=713"}],"version-history":[{"count":0,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/posts\/713\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/media?parent=713"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/categories?post=713"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/tags?post=713"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}