Installing Solaris x86 11.2 from an ISO in Virtualbox – part 2 – Patching Solaris, the new easy way

Years ago Solaris admins had one dreaded task, patching systems! Patching required hours of down time, with even more hours preparing the backout plans. We often looked at the Linux systems, and how easily we could patch them. As of Solaris 11, Oracle made life easy! Patching is even BETTER than Linux now. With the new patching system we not only can patch with a simple reboot, the back out plan is also built INTO the OS. So reverting back is as simple as a reboot! Also, the new tool is smart, we no longer take hours while cluster patches try to install updates for components that are not on the system. Best of all, this is all built into the OS, and supported by Oracle. No need to unsupported tools.

First, we will make a backup of the OS before patching. Managing boot environments is simple, with the new beadm command. First let’s make a copy of the running OS, just in case.

We will use the beadm command to create a new BE called demo1.

 

root@Solaris112:~# beadm create demo1

 

 

Now lets look and make sure it is there, using the beadm command to list all the Bes on the server.

 

root@Solaris112:~# beadm list

BE Active Mountpoint Space Policy Created

— —— ———- —– —— ——-

demo1 – – 70.0K static 2014-10-08 22:28

solaris NR / 3.33G static 2014-07-04 19:57

root@Solaris112:~#

 

We can see that we have the install environment called “solaris” and a new environment called “demo1”. The R flag, shows that this is the active environment, and the N flag shows that this environment will be used when the system next reboots.

By default Solaris systems are connected to the public patch repository, and we can patch against that. Updating the system is a simple as running a sing command! “pkg update” will update all packages against the repo as long as the server can reach Oracle’s public system. You can also create an internal system, or connect to private repos that contain additional software and more current patch levels. As a bonus pkg will automatically make a new BE!

Now lets patch! Note, the first time you use the public repo, you will need to accept the OTN license. This is done ny adding in –accept into the pkg command;

“pkg update –accept”

 

root@Solaris112:~# pkg  update --accept

 

 

The first time you will get all the legalize from OTN, which being Oracle can be lengthy. Start scrolling down.

 

------------------------------------------------------------

Package: pkg://solaris/consolidation/osnet/osnet-incorporation@0.5.11,5.11-0.175.2.0.0.42.2:20140624T183842Z

License: lic_OTN

 

Oracle Technology Network Developer License Terms

Oracle Solaris, Oracle Solaris Cluster and Oracle Solaris Express

 

Export Controls

 

Export laws and regulations of the United States and any other relevant

local export laws and regulations apply to the Programs.  You agree

that such export control laws govern your use of the Programs

(including technical data) and any services deliverables provided under

this agreement, and you agree to comply with all such export laws and

regulations (including "deemed export" and "deemed re-export"

regulations).  You agree that no data, information, program and/or

materials resulting from services (or direct product thereof) will be

exported, directly or indirectly, in violation of these laws, or will

be used for any purpose prohibited by these laws including, without

limitation, nuclear, chemical, or biological weapons proliferation, or

development of missile technology.

 

Accordingly, you confirm:

 

  -     You will not download, provide, make available or otherwise

        export or re-export the Programs, directly or indirectly, to

        countries prohibited by applicable laws and regulations nor to

        citizens, nationals or residents of those countries.

 

  -     You are not listed on the United States Department of Treasury

        lists of Specially Designated Nationals and Blocked Persons,

        Specially Designated Terrorists, and Specially Designated

        Narcotic Traffickers, nor are you listed on the United States

        Department of Commerce Table of Denial Orders.

 

  -     You will not download or otherwise export or re-export the

        Programs, directly or indirectly, to persons on the above

        mentioned lists.

 

  -     You will not use the Program for, and will not allow the

        Program to be used for, any purposes prohibited by applicable

        law, including, without limitation, for the development, design,

        manufacture or production of nuclear, chemical or biological

        weapons of mass destruction.

 

Oracle Employees: Under no circumstances are Oracle Employees

authorized to download software for the purpose of distributing it to

customers. Oracle products are available to employees for internal use

or demonstration purposes only. In keeping with Oracle's trade

compliance obligations under U.S. and applicable multilateral law,

failure to comply with this policy could result in disciplinary action

up to and including termination.

 

PLEASE READ THE FOLLOWING LICENSE AGREEMENT TERMS AND CONDITIONS

CAREFULLY BEFORE DOWNLOADING, INSTALLING OR USING THE PROGRAMS. THESE

TERMS AND CONDITIONS CONSTITUTE A LEGAL AGREEMENT BETWEEN YOU AND

ORACLE.

 

Oracle Technology Network Development License Agreement

 

"We," "us", and "our" refers to Oracle America, Inc., for and on

behalf of itself and its subsidiaries and affiliates under common

control.  "You" and "your" refers to the individual or entity that

wishes to use the Programs.  "Programs" refers to Oracle Solaris,

Oracle Solaris Cluster and/or Oracle Solaris Express that you download

from this site (including, any updates and/or additional software

packages that you may receive in the future from the product's package

repository) and related program documentation.  "License" refers to

your right to use the Programs under the terms of this agreement. This

agreement is governed by California law, except for that body of laws

related to the conflict of laws. You agree to submit to the exclusive

jurisdiction of, and venue in, the courts of San Francisco or Santa

Clara counties in California in any dispute arising out of or relating

to this agreement.

In order to use the Programs, You must first agree to this License

Agreement by selecting the "Accept License Agreement" button (or its

equivalent) below. If You do not or cannot agree to this License

Agreement, You are not permitted to download or use the Programs.

 

LICENSE RIGHTS

 

Except for any included software package or file that is licensed to

you by Oracle under different license terms, we grant you a perpetual

(unless terminated as provided in this agreement), nonexclusive,

nontransferable, limited License to use the Programs only for the

purpose of developing, testing, prototyping and demonstrating your

applications, and not for any other purpose.  If You are an educational

institution vested with the power to confer official high school,

associate, bachelor, master and/or doctorate degrees, or local

equivalent, ("Degree(s)"), You may also use the Programs as part of

Your educational curriculum for students enrolled in Your Degree

program(s) solely as required for the conferral of such Degree

(collectively "Educational Use").

All rights not expressly granted above are hereby reserved. If you want

to use the Programs for any purpose other than as permitted under this

agreement, including but not limited to distribution of the Programs or

any use of the Programs for your internal business purposes (other than

developing, testing, prototyping and demonstrating your applications)

or for any commercial production purposes, you must obtain a valid

license permitting such use. We may audit your use of the Programs.

Program documentation, if available, may be accessed online at

http://www.oracle.com/technetwork/indexes/documentation/index.html.

 

Included Java SE Components

 

The Programs may include or be distributed with certain separately

licensed components that are part of Java SE ("Java SE").  Java SE

and all components associated with it are licensed to you under the

terms of the Oracle Binary Code License Agreement for the Java SE

Platform Products, and not under this agreement.  A copy the Oracle

Binary Code License Agreement for the Java SE Platform Products can be

found at:

http://www.oracle.com/technetwork/java/javase/terms/license/index.html

 

Third-Party Technology

 

The Programs may contain or be distributed with certain third-party

technology. Oracle may provide certain notices related to such

third-party technology in the program documentation, or in readme or

notice files provided with the Programs.

Third party technology will be licensed to you either under the terms

of this agreement, or, if specified in the program documentation,

readme files or otherwise in writing, under separate license terms

("Separate Terms") and not under the terms of this agreement

("Separately Licensed Third Party Technology"). Licensee's rights to

use such Separately Licensed Third Party Technology under the Separate

Terms are not restricted or modified in any way by this Agreement.

 

Information Collection and Registration

 

Configuration Data and Registration: The Programs may communicate

configuration data to Oracle. You can register your version of the

Programs to capture this data for your use, or the data is sent

anonymously. For information about what configuration data is

communicated and how to control this facility, refer to the release

notes or http://www.oracle.com/goto/solarisautoreg.

 

Ownership and Restrictions

 

We retain all ownership and intellectual property rights in the

Programs. The Programs may be installed on three computers only, and

used Your employees or agents in the hardware environment identified by

us. You may make one copy of the Programs for backup purposes.

 

You may not:

 

  -     use the Programs for your own internal business purposes (other

        than developing, testing, prototyping and demonstrating your

        applications) or for any commercial or production purposes;

 

  -     remove or modify any program markings or any notice of our

        proprietary rights;

 

  -     make the Programs available in any manner to any third party;

 

  -     use the Programs to provide third-party training, except as

        expressly permitted in this agreement for Educational Use;

 

  -     assign this agreement or give or transfer the Programs or an

        interest in them to another individual or entity;

 

  -     cause or permit reverse engineering (unless required by law for

        interoperability), disassembly or decompilation of the Programs;

 

  -     disclose results of any benchmark test results related to the

        Programs without our prior consent.

 

Export

 

You agree that U.S. export control laws and other applicable export and

import laws govern your use of the Programs, including technical data;

additional information can be found on Oracle's Global Trade Compliance

web site located at:

http://www.oracle.com/products/export/index.html?content.html. You

agree that neither the Programs nor any direct product thereof will be

exported, directly, or indirectly, in violation of these laws, or will

be used for any purpose prohibited by these laws including, without

limitation, nuclear, chemical, or biological weapons proliferation.

 

Disclaimer of Warranty and Exclusive Remedies

 

THE PROGRAMS ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. WE

FURTHER DISCLAIM ALL WARRANTIES, EXPRESS AND IMPLIED, INCLUDING WITHOUT

LIMITATION, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A

PARTICULAR PURPOSE OR NONINFRINGEMENT.

IN NO EVENT SHALL WE BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL,

PUNITIVE OR CONSEQUENTIAL DAMAGES, OR DAMAGES FOR LOSS OF PROFITS,

REVENUE, DATA OR DATA USE, INCURRED BY YOU OR ANY THIRD PARTY, WHETHER

IN AN ACTION IN CONTRACT OR TORT, EVEN IF WE HAVE BEEN ADVISED OF THE

POSSIBILITY OF SUCH DAMAGES. OUR ENTIRE LIABILITY FOR DAMAGES HEREUNDER

SHALL IN NO EVENT EXCEED ONE THOUSAND DOLLARS (U.S. $1,000).

 

Additional Trial Programs

 

We may include additional trial programs with your download of the

Programs licensed under this agreement. You will have 30 days from the

delivery date to evaluate these additional trial programs. Any use of

these trial programs after the 30-day trial period requires you to

obtain the applicable license. Any additional trial programs are

provided "as is" and we do not provide technical support or any

warranties for these programs.

 

No Technical Support

 

Our technical support organization will not provide technical support,

phone support, or updates to you for the Programs licensed under this

agreement.

 

End of Agreement

 

You may terminate this agreement by destroying all copies of the

Programs. We have the right to terminate your right to use the Programs

if you fail to comply with any of the terms of this agreement, in which

case you shall destroy all copies of the Programs.

 

Relationship Between the Parties

 

The relationship between you and us is that of licensee/licensor.

Neither party will represent that it has any authority to assume or

create any obligation, express or implied, on behalf of the other

party, nor to represent the other party as agent, employee, franchisee,

or in any other capacity. Nothing in this agreement shall be construed

to limit either party's right to independently develop or distribute

software that is functionally similar to the other party's products, so

long as proprietary information of the other party is not included in

such software.

 

Open Source Software

 

"Open Source" software - software available without charge for use,

modification and distribution - is often licensed under terms that

require the user to make the user's modifications to the Open Source

software or any software that the user 'combines' with the Open

Source software freely available in source code form. If you use Open

Source software in conjunction with the Programs (or if you plan on

licensing your own application under an Open Source license), you must

ensure that your use does not: (i) create, or purport to create,

obligations with respect to the Oracle Programs; or (ii) grant, or

purport to grant, to any third party any rights to or immunities under

our intellectual property or proprietary rights in the Oracle Programs.

For example, you may not develop a software program using an Oracle

program and an Open Source program where such use results in a program

file(s) that contains code from both the Oracle program and the Open

Source program (including without limitation libraries) if the Open

Source program is licensed under a license that requires any

"modifications" be made freely available. You also may not combine the

Oracle program with programs licensed under the GNU General Public

License ("GPL") in any manner that could cause, or could be interpreted

or asserted to cause, the Oracle program or any modifications thereto

to become subject to the terms of the GPL.

 

Entire Agreement

 

You agree that this agreement is the complete agreement for the

Programs and licenses, and this agreement supersedes all prior or

contemporaneous agreements or representations. Any other license terms

that may be included in or with the Program shall not apply.  If any

term of this agreement is found to be invalid or unenforceable, the

remaining provisions will remain effective.

 

Last updated:  12 May 2014

Should you have any questions concerning this License Agreement, or if

you desire to contact Oracle for any reason, please write:

 

Oracle America, Inc.

500 Oracle Parkway,

Redwood City, CA 94065

 

Oracle may contact you to ask if you had a satisfactory experience

installing and using this OTN software download.

 

 

 

Now after it finished, you will get a summary of how many packages were updates, and the number of files. In this example, I patched from Solaris 11.2 BETA to Solaris 11.2, so there were a good bit of updates.

 

            Packages to remove:   1

            Packages to update: 535

       Create boot environment: Yes

Create backup boot environment:  No

 

DOWNLOAD                                PKGS         FILES    XFER (MB)   SPEED

Completed                            536/536     9333/9333  237.4/237.4  481k/s

 

PHASE                                          ITEMS

Removing old actions                       3719/3719

Installing new actions                     4339/4339

Updating modified actions                15017/15017

Updating package state database                 Done

Updating package cache                       536/536

Updating image state                            Done

Creating fast lookup database                   Done

Updating package cache                           1/1

 

 

 

 

We also see that the pkg tool created a new BE!

 

A clone of solaris exists and has been updated and activated.

On the next boot the Boot Environment solaris-1 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=E26502&id=SERNS

---------------------------------------------------------------------------

 

 

We can use “beadm list” and see the new environment. “solaris-1” will be used on the next reboot.

 

root@Solaris112:~# beadm list

BE        Active Mountpoint Space Policy Created

--        ------ ---------- ----- ------ -------

demo1     -      -          70.0K static 2014-10-08 22:28

solaris   N      /          7.24M static 2014-07-04 19:57

solaris-1 R      -          5.23G static 2014-10-08 22:51

 

 

 

We can also check the current version of the kernel, using the pkg command, looking at the branch, to tell the specific version.

 

root@Solaris112:~# pkg info kernel

          Name: system/kernel

       Summary: Core Kernel

   Description: Core operating system kernel, device drivers and other modules.

      Category: System/Core

         State: Installed

     Publisher: solaris

       Version: 0.5.11

 Build Release: 5.11


										Branch: 0.175.2.0.0.37.1

Packaging Date: April 23, 2014 05:15:55 PM

          Size: 33.60 MB

          FMRI: pkg://solaris/system/kernel@0.5.11,5.11-0.175.2.0.0.37.1:20140423T171555Z

root@Solaris112:~#

 

 

Now let’s reboot

 

root@Solaris112:~# reboot

 

Once we are backup, lets check the version again;

 

root@Solaris112:~# pkg info kernel

          Name: system/kernel

       Summary: Core Kernel

   Description: Core operating system kernel, device drivers and other modules.

      Category: System/Core

         State: Installed

     Publisher: solaris

       Version: 0.5.11

 Build Release: 5.11

        Branch: 0.175.2.0.0.42.2
									

Packaging Date: June 24, 2014 06:55:42 PM

          Size: 33.62 MB

          FMRI: pkg://solaris/system/kernel@0.5.11,5.11-0.175.2.0.0.42.2:20140624T185542Z

 

 

You can see we are running on a new branch! All patched with only a reboot!

Now, let’s look at beadm

 

root@Solaris112:~# beadm list

BE        Active Mountpoint Space  Policy Created

--        ------ ---------- -----  ------ -------

demo1     -      -          70.0K  static 2014-10-08 22:28

solaris   -      -          10.52M static 2014-07-04 19:57

solaris-1 NR     /          5.31G  static 2014-10-08 22:51

root@Solaris112:~#

 

 

solaris-1 is now active and will remain active on the next reboot. But WAIT! What happens if we want to go back?

We can use beadm to active another environment, and simple reboot! Let’s go back to the “solaris” BE.

 

root@Solaris112:~# beadm activate solaris

 

Now let’s check the beadm status.

 

broot@Solaris112:~# beadm list

BE        Active Mountpoint Space Policy Created

--        ------ ---------- ----- ------ -------

demo1     -      -          70.0K static 2014-10-08 22:28

solaris   R      -          4.23G static 2014-07-04 19:57

solaris-1 N      /          1.08G static 2014-10-08 22:51

 

 

 

We see that while solaris-1 is active, Solaris will be the current version after the next reboot. Now we can reboot, and we will be back on the OS before we patched! So much easier than linux! If you have any questions please drop via the “Contact Me/ Ask a Question” link on the top of the page.

4 thoughts on “Installing Solaris x86 11.2 from an ISO in Virtualbox – part 2 – Patching Solaris, the new easy way

  1. Live Upgrade has come a long way since its introduction back in Solaris 2.6! I remember having to debug stuff like swap file entries in vfstab causing failures (LU_DEBUG is your friend).

    With ZFS snapshots things are a LOT easier. Great article Erik!

  2. Appreciating the hard work you put into your blog and in depth information you
    provide. It’s nice to come across a blog every once in a while that isn’t the same
    out of date rehashed information. Fantastic read!
    I’ve bookmarked your site and I’m adding your RSS feeds to my Google account.

Leave a Reply

Your email address will not be published. Required fields are marked *

*