Thursday Dec 20, 2012

pkg fix is my friend - a followup

We bloggers appreciate questions and comments about what we post, whether privately in email or attached as comments to some article. In my last post, a reader asked a set of questions that were so good, I didn't want them to get lost down in the comments section. A big thanks to David Lange for asking these questions. I shall try to answer them here (perhaps with a bit more detail than you might have wanted).

Does the pkg fix reinstall binaries if the hash or chksum doesn't match?

Yes, it does. Let's actually see this in action, and then we will take a look at where it is getting the information required to correct the error.

Since I'm working on a series of Solaris 11 Automated Installer (AI) How To articles, installadm seems a good choice to damage, courtesy of the random number generator.

# ls /sbin/install*
/sbin/install             /sbin/installadm-convert  /sbin/installf
/sbin/installadm          /sbin/installboot         /sbin/installgrub

# cd /sbin
# mv installadm installadm-

# dd if=/dev/random of=/sbin/installadm bs=8192 count=32
0+32 records in
0+32 records out

# ls -la installadm*
-rw-r--r--   1 root     root       33280 Dec 18 18:50 installadm
-r-xr-xr-x   1 root     bin        12126 Dec 17 08:36 installadm-
-r-xr-xr-x   1 root     bin        74910 Dec 17 08:36 installadm-convert
OK, that should do it. Unless I am terribly unlucky, those random bytes will produce something that doesn't match the stored hash value of the installadm binary.

This time, I will begin the repair process with a pkg verify, just to see what is broken.

# pkg verify installadm
PACKAGE                                                                 STATUS 
pkg://solaris/install/installadm                                         ERROR

	file: usr/sbin/installadm
		Group: 'root (0)' should be 'bin (2)'
		Mode: 0644 should be 0555
		Size: 33280 bytes should be 12126
		Hash: 2e862c7ebd5dce82ffd1b30c666364f23e9118b5 
                     should be 68374d71b9cb91b458a49ec104f95438c9a149a7
For clarity, I have removed all of the compiled python module errors. Most of these have been corrected in Solaris 11.1, but you may see these occasionally when doing a pkg verify.

Since we have a real package error, let's correct it.

# pkg fix installadm
Verifying: pkg://solaris/install/installadm                     ERROR          

	file: usr/sbin/installadm
		Group: 'root (0)' should be 'bin (2)'
		Mode: 0644 should be 0555
		Size: 33280 bytes should be 12126
		Hash: 2e862c7ebd5dce82ffd1b30c666364f23e9118b5 
                     should be 68374d71b9cb91b458a49ec104f95438c9a149a7
Created ZFS snapshot: 2012-12-19-00:51:00
Repairing: pkg://solaris/install/installadm                  
                                                                               

DOWNLOAD                                  PKGS       FILES    XFER (MB)
Completed                                  1/1       24/24      0.1/0.1

PHASE                                        ACTIONS
Update Phase                                   24/24 

PHASE                                          ITEMS
Image State Update Phase                         2/2 
We can now run installadm as if it was never damaged.
# installadm list

Service Name     Alias Of       Status  Arch   Image Path 
------------     --------       ------  ----   ---------- 
default-i386     solaris11-i386 on      x86    /install/solaris11-i386
solaris11-i386   -              on      x86    /install/solaris11-i386
solaris11u1-i386 -              on      x86    /install/solaris11u1-i386
Oh, if you are wondering about that hash, it is a SHA1 checksum.
# digest -a sha1 /usr/sbin/installadm
68374d71b9cb91b458a49ec104f95438c9a149a7

If so does IPS keep the installation binaries in a depot or have to point to the originating depot to fix the problem?

IPS does keep a local cache of package attributes. Before diving into some of these details, it should be known that some, if not all of these, are private details of the current implementation of IPS, and can change in the future. Always consult the command and configuration file man pages before using any of these in scripts. In this case, the relevant information would be in pkg(5) (i.e. man -s 5 pkg).

Our first step is to identify which publisher has provided the package that is currently installed. In my case, there is only one (solaris), but in a large and mature enterprise deployment, there could be many publishers.

# pkg info installadm
pkg info installadm
          Name: install/installadm
       Summary: installadm utility
   Description: Automatic Installation Server Setup Tools
      Category: System/Administration and Configuration
         State: Installed
     Publisher: solaris
       Version: 0.5.11
 Build Release: 5.11
        Branch: 0.175.0.0.0.2.1482
Packaging Date: October 19, 2011 12:26:24 PM 
          Size: 1.04 MB
          FMRI: pkg://solaris/install/installadm@0.5.11,5.11-0.175.0.0.0.2.1482:20111019T122624Z
From this we have learned that the actual package name is install/installadm and the publisher is in fact, solaris. We have also learned that the version of installadm comes from the original Solaris 11 GA release (5.11-0.175.0.0). That will allow us to go take a look at some of the configuration files (private interface warning still in effect).

Note: Since package names contain slashes (/), we will have to encode them as %2F to keep the shell from interpreting them as a directory delimiter.

# cd /var/pkg/publisher/solaris/pkg/install%2Finstalladm
# ls -la
drwxr-xr-x   2 root     root           4 Dec 18 00:55 .
drwxr-xr-x 818 root     root         818 Dec 17 08:36 ..
-rw-r--r--   1 root     root       25959 Dec 17 08:36
            0.5.11%2C5.11-0.175.0.0.0.2.1482%3A20111019T122624Z
-rw-r--r--   1 root     root       26171 Dec 18 00:55
            0.5.11%2C5.11-0.175.0.13.0.3.0%3A20121026T213106Z
The file 0.5.11%2C5.11-0.175.0.0.0.2.1482%3A20111019T122624Z is the one we are interested in.
# digest -a sha1 /usr/sbin/installadm
68374d71b9cb91b458a49ec104f95438c9a149a7

# grep 68374d71b9cb91b458a49ec104f95438c9a149a7 *
file 68374d71b9cb91b458a49ec104f95438c9a149a7
chash=a5c14d2f8cc854dbd4fa15c3121deca6fca64515 group=bin mode=0555 
owner=root path=usr/sbin/installadm pkg.csize=3194 pkg.size=12126

That's how IPS knows our version of installadm has been tampered with. Since it is more than just changing attributes of the files, it has to download a new copy of the damaged files, in this case from the solaris publisher (or one of its mirrors). To keep from making this worse, it also makes a snapshot of the current boot environment, in case things go terribly wrong - which they do not.

Armed with this information, we can use some other IPS features, such as searching by binary hash.

# pkg search -r 68374d71b9cb91b458a49ec104f95438c9a149a7
INDEX                                    ACTION VALUE               PACKAGE
68374d71b9cb91b458a49ec104f95438c9a149a7 file   usr/sbin/installadm 
                 pkg:/install/installadm@0.5.11-0.175.0.0.0.2.1482
... or by name
# pkg search -r installadm
INDEX       ACTION VALUE                      PACKAGE
basename    dir    usr/lib/installadm         pkg:/install/installadm@0.5.11-0.175.0.0.0.2.1482
basename    dir    var/installadm             pkg:/install/installadm@0.5.11-0.175.0.0.0.2.1482
basename    file   usr/sbin/installadm        pkg:/install/installadm@0.5.11-0.175.0.0.0.2.1482
pkg.fmri    set    solaris/install/installadm pkg:/install/installadm@0.5.11-0.175.0.0.0.2.1482
pkg.summary set    installadm utility         pkg:/install/installadm@0.5.11-0.175.0.0.0.2.1482
And finally...
# pkg contents -m installadm

..... lots of output truncated ......

file 68374d71b9cb91b458a49ec104f95438c9a149a7 chash=a5c14d2f8cc854dbd4fa15c3121deca6fca64515 
group=bin mode=0555 owner=root path=usr/sbin/installadm pkg.csize=3194 pkg.size=12126
There is our information using a public and stable interface. Now you know, not only where IPS caches the information, but a predictable way to retrieve it, should you ever need to do so.

As with the verify and fix operations, this is much more helpful than the SVR4 packaging commands in Solaris 10 and earlier.

Given that customers might come up with their own ideas of keeping pkgs at various levels, could they be shooting themselves in the foot and creating such a customized OS that it causes problems?

Stephen Hahn has written quite a bit on the origins of IPS, both on his archived Sun blog as well as on the OpenSolaris pkg project page. While it is a fascinating and useful read, the short answer is that IPS helps prevent this from happening - certainly much more so than with the previous packaging system.

The assistance comes in several ways.

Full packages: Since IPS delivers full packages only, that eliminates one of the most confusing and frustrating aspects of the legacy Solaris packaging system. Every time you update a package with IPS, you get a complete version of the software, the way it was assembled and tested at Oracle (and presumably other publishers as well). No more patch order files and, perhaps more important, no more complicated scripts to automate the patching process.

Dependencies: A rich dependency mechanism allows the package maintainer to guarantee that other related software is at a compatible version. This includes incorporations, which protect large groups of software, such as the basic desktop, GNOME, auto-install and the userland tools. Although not a part of dependencies, facets allow for the control of optional software components - locales being a good example.

Boot environments: Solaris 10 system administrators can enjoy many of the benefits of IPS boot environment integration by using Live Upgrade and ZFS as a root file system. IPS takes this to the next level by automatically performing important operations, such as upgrading the pkg package when needed or taking a snapshot before performing any risky actions.

Expanding your question just a bit, IPS provides one new capability that should make updates much more predictable. If there is some specific component that an application requires, its version can be locked within a range. Here is an example, albeit a rather contrived one.

# pkg list -af jre-6
NAME (PUBLISHER)                                  VERSION                    IFO
runtime/java/jre-6                                1.6.0.37-0.175.1.2.0.3.0   ---
runtime/java/jre-6                                1.6.0.35-0.175.1.0.0.24.1  ---
runtime/java/jre-6                                1.6.0.35-0.175.0.11.0.4.0  ---
runtime/java/jre-6                                1.6.0.33-0.175.0.10.0.2.0  ---
runtime/java/jre-6                                1.6.0.33-0.175.0.9.0.2.0   ---
runtime/java/jre-6                                1.6.0.32-0.175.0.8.0.4.0   ---
runtime/java/jre-6                                1.6.0.0-0.175.0.0.0.2.0    i--
Suppose that we have an application that is tied to version 1.6.0.0 of the java runtime. You can lock it at that version and IPS will prevent you from applying any upgrade that would change it. In this example, an attempt to upgrade to SRU8 (which introduces version 1.6.0.32 of jre-6) will fail.
# pkg freeze -c "way cool demonstration of IPS" jre-6@1.6.0.0
runtime/java/jre-6 was frozen at 1.6.0.0

# pkg list -af jre-6
pkg list -af jre-6
NAME (PUBLISHER)                                  VERSION                    IFO
runtime/java/jre-6                                1.6.0.37-0.175.1.2.0.3.0   ---
runtime/java/jre-6                                1.6.0.35-0.175.1.0.0.24.1  ---
runtime/java/jre-6                                1.6.0.35-0.175.0.11.0.4.0  ---
runtime/java/jre-6                                1.6.0.33-0.175.0.10.0.2.0  ---
runtime/java/jre-6                                1.6.0.33-0.175.0.9.0.2.0   ---
runtime/java/jre-6                                1.6.0.32-0.175.0.8.0.4.0   ---
runtime/java/jre-6                                1.6.0.0-0.175.0.0.0.2.0    if-

# pkg update --be-name s11ga-sru08  entire@0.5.11-0.175.0.8
What follows is a lengthy set of complaints about not being able to satisfy all of the constraints, conveniently pointing back to our frozen package.

But wait, there's more. IPS can figure out the latest update it can apply that satisfies the frozen package constraint. In this example, it should find SRU7.

# pkg update --be-name s11ga-sru07
            Packages to update:  89
       Create boot environment: Yes
Create backup boot environment:  No

DOWNLOAD                                  PKGS       FILES    XFER (MB)
Completed                                89/89   3909/3909  135.7/135.7

PHASE                                        ACTIONS
Removal Phase                                720/720 
Install Phase                                889/889 
Update Phase                               5066/5066 

PHASE                                          ITEMS
Package State Update Phase                   178/178 
Package Cache Update Phase                     89/89 
Image State Update Phase                         2/2 

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


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

http://www.oracle.com/pls/topic/lookup?ctx=E23824&id=SERNS
---------------------------------------------------------------------------
When the system is rebooted, a quick look shows that we are indeed running with SRU7.

Perhaps we were too restrictive in locking down jre-6 to version 1.6.0.0. In this example, we will loosen the constraint to any 1.6.0 version, but prohibit upgrades that change it to 1.6.1. Note that I did not have to unfreeze the package as a new pkg freeze will replace the preceding one.

# pkg freeze jre-6@1.6.0
runtime/java/jre-6 was frozen at 1.6.0

# pkg list -af jre-6
NAME (PUBLISHER)                                  VERSION                    IFO
runtime/java/jre-6                                1.6.0.37-0.175.1.2.0.3.0   -f-
runtime/java/jre-6                                1.6.0.35-0.175.1.0.0.24.1  -f-
runtime/java/jre-6                                1.6.0.35-0.175.0.11.0.4.0  -f-
runtime/java/jre-6                                1.6.0.33-0.175.0.10.0.2.0  -f-
runtime/java/jre-6                                1.6.0.33-0.175.0.9.0.2.0   -f-
runtime/java/jre-6                                1.6.0.32-0.175.0.8.0.4.0   -f-
runtime/java/jre-6                                1.6.0.0-0.175.0.0.0.2.0    if-
This shows that all versions are available for upgrade (i.e. , they all satisfy the frozen package constraint).

Once again, IPS gives us a wonderful capability that is missing in the legacy packaging system.

When you perform a pkg update on a system are we guaranteed a highly tested configuration that has gone thru multiple regression tests?

Short answer: yes.

For the details, I will turn your attention to our friend, Gerry Haskins, and his two excellent blogs: The Patch Corner (Solaris 10 and earlier) and Solaris 11 Maintenance Lifecycle. Both are excellent reads and I encourage everybody to add them to your RSS reader of choice.

Of particular note is Gerry's presentation, Solaris 11 Customer Maintenance Lifecycle, which goes into some great detail about patches, upgrades and the like. If you dig back to around the time that Solaris 10 9/10(u9) was released, you will find a links to a pair of interesting documents titled Oracle Integrated Stack - Complete, Trusted Enterprise Solutions and Trust Your Enterprise Deployments to the Oracle Product Stack: The integrated platform that's been developed, tested and certified to get the job done. These documents describe several test environments, including the Oracle Certification Environment (OCE) and Oracle Automated Stress Test (OAST). All Solaris 10 patches and Solaris 11 package updates (including Oracle Solaris Cluster) are put through these tests prior to release. The result is a higher confidence that patches will not introduce stability or performance problems, negating the old practice of putting a release or patch bundle on the shelf while somebody else finds all of the problems. Local testing on your own equipment is still a necessary practice, but you are able to move more quickly to a new release thanks to these additional testing environments.

If I am allowed to ask a follow up question, it would be something like, "what can I do proactively to keep my system as current as possible and reduce the risks of bad patch or package interactions?"

That is where the Critical Patch Updates come into play. Solaris 11 Support Repository Updates (SRU) come out approximately once per month. Every third one (generally) is special and becomes the CPU for Solaris. If you have a regular cadence for applying CPUs or Patch Set Updates (PSU) for your other Oracle software, choose the corresponding SRU that has been designated as that quarter's CPU. You can find this information in My Oracle Support (MOS), on the Oracle Technology Network (OTN), or just read Gerry's blog in mid January, April, July and October.

Thanks again to David Lange for asking such good questions. I hope the answers helped.

Wednesday Aug 15, 2012

Pre-work for Upcoming Solaris 11 Boot Camps

Over the next few weeks, I will be hosting some Solaris 11 hands on workshops. Some of these will be public events at an Oracle office while others will be private sessions for a specific customer.

The public sessions I'm hosting are

Note: there is also another identical Solaris 11 session hosted by my colleague, Pavel Anni, in Broomfield, Colorado on August 23.

If you are planning on attending any of these sessions (including Pavel's), there are several things you can do in advance that will help not only you, but your fellow attendees.

Enable VT-x or AMD-V on your Laptop

If you will be using VirtualBox to host your workshop guest image, you need to enable the hardware virtualization feature. This is typically found in your BIOS and where you find the setting varies by laptop manufacturer. If you do not find it in the system or CPU settings, try looking in security. If you are given the choice of VT-x and VT-d, you only need to enable VT-x.

If you have a company laptop that does not allow you to change the BIOS settings, you might ask your employer if they can provide you one for the day that is not locked down.

Note: Enabling hardware virtualization is a requirement to complete the workshop.

Download and Install VirtualBox

Since this will be primarily a hands on lab, you are encouraged to bring a laptop. The labs will all be run in a Solaris guest machine, so your laptop will also need a virtualization application, such as VMware or VirtualBox. We recommend VirtualBox. You can download a free copy at VirtualBox.org. Binaries are available for Windows, MacOS, Solaris and most Linux distributions.

After installing VirtualBox, you should also install the VirtualBox Extensions Pack. These are not required for the lab, but should you continue to use the guest machine after the workshop, you might find some of the features very useful.

Download a Solaris 11 VM Appliance from the Oracle Technology Network (OTN)

You can download a pre-built Solaris 11 guest image directly from the Oracle Technology Network. Here is a link to the VM download page. Accept the license and download the latest Solaris 11 VirtualBox guest image.

Once downloaded, you can use the VirtualBox VM import function to create a usable guest. Clicking File -> Import Appliance on the VirtualBox main window will launch the import wizard. Select the file you just downloaded and in a few minutes you will have a bootable Solaris 11 guest. The import process should look something like this.


Click image to enlarge

Configure the Solaris Guest

The first time you boot the Solaris 11 guest, you will be required to complete a short configuration dialog. Once you have specified all of the items on the page, press F2 to advance to the next screen.

The introduction screen looks like this.



Click image to enlarge

On the second page, specify the host name and default network setup. The default name of solaris is used throughout the lab. For the network setup, select Automatic.



Click image to enlarge

The next item in the initial system configuration is the timezone. That does not matter for the hands on labs. If you are experiencing poor weather, I have found that setting the system to Aruba time can be helpful.

The final step is to set the root password and set up the initial user. To stay consistent with the lab handouts, set the root password to oracle2011. The initial user should be specified as lab and its password should be oracle1.



Click image to enlarge

Finally, you will be presented a summary screen, which should look something like this. When satisfied, press F2 to complete.



Click image to enlarge

The Solaris 11 VM image from the Oracle Technology Network has the VirtualBox Guest Additions already installed. This enables keyboard and mouse integration as well resize/seamless windows.

Set up a Local Repository

To complete the zone installation labs in the workshop, you will need to access the Oracle public Solaris 11 repository, which means you also must have wireless network access. This does not always work well in a workshop with 30 or 40 users stressing out the local wireless access point. To make this easier, you can create your own customized package repository in your newly imported Solaris 11 guest. My colleague, Pavel Anni, has supplied this excellent set of instructions on how to do that..

1. Create a directory or a ZFS file system to hold your local repository.

# mkdir /repo
or 
# zfs create -o mountpoint=/repo -o compress=gzip rpool/repo
2. Create an empty repository in it
# pkgrepo create /repo
3. Create a text file 'zone-pkgs.txt' with the list of necessary packages. That list should look like this (cut and paste is your best friend).

pkg://solaris/compress/bzip2
pkg://solaris/compress/gzip
pkg://solaris/compress/p7zip
pkg://solaris/compress/unzip
pkg://solaris/compress/zip
pkg://solaris/consolidation/SunVTS/SunVTS-incorporation
pkg://solaris/consolidation/X/X-incorporation
pkg://solaris/consolidation/admin/admin-incorporation
pkg://solaris/consolidation/cacao/cacao-incorporation
pkg://solaris/consolidation/cde/cde-incorporation
pkg://solaris/consolidation/cns/cns-incorporation
pkg://solaris/consolidation/dbtg/dbtg-incorporation
pkg://solaris/consolidation/desktop/desktop-incorporation
pkg://solaris/consolidation/desktop/gnome-incorporation
pkg://solaris/consolidation/gfx/gfx-incorporation
pkg://solaris/consolidation/install/install-incorporation
pkg://solaris/consolidation/ips/ips-incorporation
pkg://solaris/consolidation/java/java-incorporation
pkg://solaris/consolidation/jdmk/jdmk-incorporation
pkg://solaris/consolidation/l10n/l10n-incorporation
pkg://solaris/consolidation/ldoms/ldoms-incorporation
pkg://solaris/consolidation/man/man-incorporation
pkg://solaris/consolidation/nspg/nspg-incorporation
pkg://solaris/consolidation/nvidia/nvidia-incorporation
pkg://solaris/consolidation/osnet/osnet-incorporation
pkg://solaris/consolidation/sfw/sfw-incorporation
pkg://solaris/consolidation/sic_team/sic_team-incorporation
pkg://solaris/consolidation/solaris_re/solaris_re-incorporation
pkg://solaris/consolidation/sunpro/sunpro-incorporation
pkg://solaris/consolidation/ub_javavm/ub_javavm-incorporation
pkg://solaris/consolidation/userland/userland-incorporation
pkg://solaris/consolidation/vpanels/vpanels-incorporation
pkg://solaris/consolidation/xvm/xvm-incorporation
pkg://solaris/crypto/ca-certificates
pkg://solaris/database/sqlite-3
pkg://solaris/developer/base-developer-utilities
pkg://solaris/developer/debug/mdb
pkg://solaris/developer/macro/cpp
pkg://solaris/diagnostic/cpu-counters
pkg://solaris/diagnostic/snoop
pkg://solaris/diagnostic/tcpdump
pkg://solaris/driver/serial/asy
pkg://solaris/driver/storage/cmdk
pkg://solaris/driver/storage/mpt
pkg://solaris/driver/x11/xsvc
pkg://solaris/editor/vim/vim-core
pkg://solaris/entire
pkg://solaris/group/system/solaris-small-server
pkg://solaris/library/database/gdbm
pkg://solaris/library/expat
pkg://solaris/library/libffi
pkg://solaris/library/libidn
pkg://solaris/library/libmilter
pkg://solaris/library/libtecla
pkg://solaris/library/libxml2
pkg://solaris/library/libxslt
pkg://solaris/library/ncurses
pkg://solaris/library/nspr
pkg://solaris/library/perl-5/sun-solaris-512
pkg://solaris/library/python-2/cherrypy-26
pkg://solaris/library/python-2/lxml-26
pkg://solaris/library/python-2/m2crypto-26
pkg://solaris/library/python-2/mako-26
pkg://solaris/library/python-2/ply-26
pkg://solaris/library/python-2/pybonjour-26
pkg://solaris/library/python-2/pycurl-26
pkg://solaris/library/python-2/pyopenssl-26
pkg://solaris/library/python-2/python-extra-26
pkg://solaris/library/python-2/simplejson-26
pkg://solaris/library/readline
pkg://solaris/library/security/nss
pkg://solaris/library/security/openssl
pkg://solaris/library/security/trousers
pkg://solaris/library/zlib
pkg://solaris/media/cdrtools
pkg://solaris/media/xorriso
pkg://solaris/naming/ldap
pkg://solaris/network/bridging
pkg://solaris/network/dns/bind
pkg://solaris/network/ipfilter
pkg://solaris/network/open-fabrics
pkg://solaris/network/ping
pkg://solaris/network/rsync
pkg://solaris/network/ssh
pkg://solaris/network/ssh/ssh-key
pkg://solaris/package/pkg
pkg://solaris/package/pkg/zones-proxy
pkg://solaris/package/svr4
pkg://solaris/release/name
pkg://solaris/release/notices
pkg://solaris/runtime/perl-512
pkg://solaris/runtime/python-26
pkg://solaris/security/nss-utilities
pkg://solaris/security/sudo
pkg://solaris/security/tcp-wrapper
pkg://solaris/service/file-system/nfs
pkg://solaris/service/network/dns/mdns
pkg://solaris/service/network/smtp/sendmail
pkg://solaris/service/network/ssh
pkg://solaris/service/security/gss
pkg://solaris/service/security/kerberos-5
pkg://solaris/shell/bash
pkg://solaris/shell/ksh
pkg://solaris/system/boot-environment-utilities
pkg://solaris/system/boot/wanboot
pkg://solaris/system/core-os
pkg://solaris/system/data/terminfo/terminfo-core
pkg://solaris/system/data/timezone
pkg://solaris/system/device-administration
pkg://solaris/system/dtrace
pkg://solaris/system/dtrace/dtrace-toolkit
pkg://solaris/system/fault-management
pkg://solaris/system/fault-management/smtp-notify
pkg://solaris/system/file-system/autofs
pkg://solaris/system/file-system/hsfs
pkg://solaris/system/file-system/nfs
pkg://solaris/system/file-system/pcfs
pkg://solaris/system/file-system/udfs
pkg://solaris/system/file-system/ufs
pkg://solaris/system/file-system/zfs
pkg://solaris/system/install
pkg://solaris/system/install/configuration
pkg://solaris/system/install/locale
pkg://solaris/system/kernel
pkg://solaris/system/kernel/platform
pkg://solaris/system/kernel/secure-rpc
pkg://solaris/system/kernel/security/gss
pkg://solaris/system/library
pkg://solaris/system/library/boot-management
pkg://solaris/system/library/c++-runtime
pkg://solaris/system/library/gcc-3-runtime
pkg://solaris/system/library/iconv/utf-8
pkg://solaris/system/library/install
pkg://solaris/system/library/libpcap
pkg://solaris/system/library/math
pkg://solaris/system/library/openmp
pkg://solaris/system/library/security/gss
pkg://solaris/system/library/security/gss/diffie-hellman
pkg://solaris/system/library/security/gss/spnego
pkg://solaris/system/library/security/libsasl
pkg://solaris/system/library/security/rpcsec
pkg://solaris/system/library/storage/libdiskmgt
pkg://solaris/system/library/storage/scsi-plugins
pkg://solaris/system/linker
pkg://solaris/system/locale
pkg://solaris/system/manual
pkg://solaris/system/manual/locale
pkg://solaris/system/network
pkg://solaris/system/network/nis
pkg://solaris/system/network/routing
pkg://solaris/system/prerequisite/gnu
pkg://solaris/system/resource-mgmt/resource-caps
pkg://solaris/system/resource-mgmt/resource-pools
pkg://solaris/system/system-events
pkg://solaris/system/zones
pkg://solaris/system/zones/brand/brand-solaris
pkg://solaris/terminal/luit
pkg://solaris/terminal/resize
pkg://solaris/text/doctools
pkg://solaris/text/doctools/ja
pkg://solaris/text/groff/groff-core
pkg://solaris/text/less
pkg://solaris/text/spelling-utilities
pkg://solaris/web/curl
pkg://solaris/web/wget
pkg://solaris/x11/header/x11-protocols
pkg://solaris/x11/library/libfontenc
pkg://solaris/benchmark/iperf
4. Populate your local repository with the required packages. At present, it is not possible to do this in parallel, so the packages much be received on at a time. Depending on your network speed, this step could take 2 to 3 hours.
# for f in `cat zone-pkgs.txt` ; \ 
do pkgrecv -s http://pkg.oracle.com/solaris/release -d /repo $f ; \ 
echo $f ; \ 
done
pkgrepo rebuild -s /repo
5. Check if you really have 167 packages (if you have downloaded and installed the archive, it might be more, we have added apache and iperf packages for our demo purposes)
# pkgrepo info -s file:///repo
6. Set up and enable package repository service in the global zone:
# svccfg -s application/pkg/server setprop pkg/inst_root=/repo   
# svcprop -p pkg/inst_root application/pkg/server   (Just checking...)
# svcadm refresh application/pkg/server 
# svcadm enable application/pkg/server 
7. Switch repositories (disable the all existing ones and mirrors and enable the local one):
# pkg set-publisher -G '*' -M '*' -g http://10.0.2.15/ solaris
Note that it should use your global zone's IP address (in this case, provided automatically by VirtualBox). Then all the zones you create will keep this address and be able to install packages from the global zone. It won't work if you set your repository's HTTP address just to http://localhost.

Download zoneplot

The zones portion of the hands on lab will make use of two utilities that are not in Solaris. You will need to download both Pavel Anni's zoneplot and Andreas Bernauer's Gnuplot driver utility

Optional: Return your Solaris publisher to the Oracle default repository

When you have completed all of the labs, you can restore the original Oracle default repository.
# pkg set-publisher -G '*' -g http://pkg.oracle.com/solaris/release -P solaris
That should be about it. Please leave a comment if you have any questions. I am looking forward to seeing you at one of these, or a future Solaris event.

Technocrati Tags:

Thursday Jun 21, 2007

Updated Solaris Bootcamp Presentations

I've had a great time traveling around the country talking about Solaris. It's not exactly a difficult thing - there's plenty to talk about. Many of you have asked for copies of the latest Solaris update, virtualization overview and ZFS deep dive. Rather than have you dig through a bunch of old blog entries about bootcamps from 2005, here they are for your convenience.



I hope this will save you some digging though http://mediacast.sun.com and tons of old blogs.

In a few weeks I'll post a new "What's New in Solaris" which will have some really cool things. But we'll save that for later.

Technocrati Tags:
About

Bob Netherton is a Principal Sales Consultant for the North American Commercial Hardware group, specializing in Solaris, Virtualization and Engineered Systems. Bob is also a contributing author of Solaris 10 Virtualization Essentials.

This blog will contain information about all three, but primarily focused on topics for Solaris system administrators.

Please follow me on Twitter Facebook or send me email

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today