Okay, so your system had a complete failure without any working snapshots to rollback on or you simply need a few packages and pkg.oracle.com is down. What do you do now? Well thankfully Oracle has added this new feature called Image Packaging System (IPS) in Solaris 11 Express. By the name you can deduct that it is package imaging system; which is exactly what it is. It allows you to run a concurrent repository, mirror of another repository, or just a repository for packages you’ve assembled.
First you’ll need to download the Oracle Solaris 11 Express 2010.11 Repository Images. It will require that you concatenate the files together once unzipped. The final iso will expand to a 5.1GB from the two 2GB files you’ve downloaded.
$ wget http://download.oracle.com/otn/solaris/express/sol-11-exp-201011-repo-full-iso-a.zip
$ wget http://download.oracle.com/otn/solaris/express/sol-11-exp-201011-repo-full-iso-b.zip
$ unzip sol-11-exp-201011-repo-full-iso-a.zip
$ unzip sol-11-exp-201011-repo-full-iso-b.zip
$ cat sol-11-exp-201011-repo-full-iso-b >> sol-11-exp-201011-repo-full-iso-a
$ mv sol-11-exp-201011-repo-full-iso-a sol-11-exp-201011-repo-full.iso
After you have the ISO you’ll need to mount it. For this you’ll need to mount it as a block device, on Solaris there is lofi, or loopback file driver. -a switch adds a file to known files used as block devices. Later you can use the -d switch to destroy the file association or you could go the way of Windows and wait for a reboot.
# lofiadm -a /home/epijunkie/Downloads/sol-11-exp-201011-repo-full.iso
/dev/lofi/1
# mkdir /mnt/ips
# mount -o ro -F hsfs /dev/lofi/1 /mnt/ips
Next you’ll need to a place for the packages to permanently reside. For this I create another ZFS filesystem as part of my main pool. Doing this allows me to turn on compression as it won’t be accessed often and it will be out of the way. The command below also sets the mount point.
# zfs create -o compression=on -o mountpoint=/mnt/repo2010_11 ZFS/ips_repo
The files from the DVD need to be copied over retaining their attributes. Using rsync with the --archive switch will recurses into directories, copies symlinks as symlinks, and preserves permissions, modification times, user ownership, group ownership, device files and special files.
# rsync --archive /mnt/ips/repo /mnt/repo2010_11/
After this is complete you won’t need the DVD iso so it’s safe to unmount and delete the files.
# umount /mnt/ips
# lofiadm -d /dev/lofi/1
# rm -d /mnt/ips
$ rm ~/Downloads/sol-11-exp-201011-repo-full*
Next is setting options for pkg/server service through Service Management Facility (SMF).
# svccfg -s application/pkg/server setprop pkg/inst_root=/mnt/repo2010_11/
Next is rebuilding index which allows for searches and statistical information.
# pkgrepo -s /mnt/repo2010_11/repo/ refresh
Repository refresh initiated.
Next you will need to refresh the configuration and start the pkg/server.
# svcadm refresh application/pkg/server
# svcadm enable application/pkg/server
At this point you’ll be able to point your browser to http://localhost and browse your locally repository.

This command replaces (-G) the Oracle’s online repository with (-g) your locally hosted one. This is helpful if pkg.oracle.com is down by speeding up queries and downloads.
# pkg set-publisher -G http://pkg.oracle.com/solaris/release/ -g http://localhost/ solaris
If you want to leave this offline configuration but still want fresh updates from Oracle setup a cron job to run this periodically:
# pkgrecv -s http://pkg.oracle.com/solaris/release/ -d /mnt/repo2010_11/repo/ --newest
Thanks to swinful for his article that first got me kick started on this; I’ve made some additions but swinful’s cat command was a clever one over Oracle’s doc.