System Admins and Developers
All System Admin Articles
Enda O'Connor, February 2009
This article describes how to install the latest Kernel Update (KU) patch, or any patch, to a SPARC or x86 miniroot image for the JumpStart installation program. The article covers the following topics and scenarios:
In some cases, Sun provides hardware support through driver patches. Sun provides these driver patches to support third-party hardware, such as IBM BladeCenter servers. Another reason Sun might provide hardware support is to enable the installation of a particular release of the Solaris Operating System on newer hardware without necessitating the re-engineering of that particular Solaris release. In such instances, it is often necessary to install a particular driver patch. Most often, the process involves installing the latest KU patch for the OS in question.
This article describes how to patch a miniroot image to create a modified miniroot that contains the latest KU patch. The Solaris OS that is used in the procedures in this article is the Solaris 10 5/08 release. However, the procedure is similar for all Solaris 10 releases.
The Solaris OS for x86 platforms uses GRUB to boot the system as of the Solaris 10 1/06 release. For more information about GRUB-based booting, see the System Administration Guide: Basic Administration at http://docs.sun.com/app/docs/doc/817-1985.
The miniroot is a minimal, bootable root (/) file system that resides on the Solaris installation media. A miniroot consists of all the Solaris software that is required to boot the system to either install or upgrade the system. The miniroot is what the JumpStart installation program or installation media uses to perform a full installation of the Solaris OS. The miniroot runs only during the installation process.
It is important to understand that the instructions in this article describe how to install a patch on the miniroot image only. When you patch the miniroot image, the patch is not installed on the system where the Solaris OS installation will take place nor is it installed on the system where the
patchadd -C command is run. Patching the miniroot image is strictly used for adding driver and hardware support to the process that performs the actual installation of the Solaris OS. An example of new hardware might be a new motherboard that has driver support in a later KU patch.
The installed image still requires the installation of a patch prior to the first boot. This process occurs after the installation completes. A finish script is invoked, initiating the installation of the KU patch on the freshly installed system prior to first boot. This installation of the KU patch to the actual system that is being installed is separate from the miniroot patch process that is described in this article.
Please ensure that the live system where the miniroot patching is being done is patched with the latest patch utilities patch.
The following command downloads patch 119254-62 to the
/tmp directory on a SPARC system and applies the patch:
#patchadd /tmp/119254-62
The
patchadd command is necessary in all the following procedures.
If you are patching a SPARC miniroot that is all ready at KU patch 137137-09 (Solaris 10 10/08 release) level, then you must unpack the miniroot archive first using
/boot/solaris/bin/root_archive unpackmedia. For this, you need a system that is already running the Solaris 10 10/08 OS (or has 137137-09 installed via
patchadd), because this is the first release that ships a
root_archive.
If you are patching an x86 miniroot only, then the system where the
patchadd command is run need only be at Solaris 10 1/06 release level in order to apply KU patch 137138-09.
If you need to run the
/boot/solaris/bin/root_archive command (applying 137137-09 to the miniroot, patching a miniroot for the Solaris 10 10/08 OS or later release, or patching an x86 miniroot), then the command must be run on the same architecture as the install image. That is, if the install image is SPARC based, then the
root_archive must be run on a SPARC system. The same applies to x86; if the image is x86 based,
root_archive must be run on an x86 system.
The following is an example of trying to unpack a miniroot for the Solaris 10 10/08 OS for SPARC platforms on an x86 JumpStart server:
It is advisable to always create a copy of the current image using
setup_install_server, so as not to interfere with any current installs in progress from the image. It is also advisable to keep a golden copy of the original image. For that reason, all examples in this article use
setup_install_server.
The following example shows how to install KU patch 137137-09 on a Solaris 10 5/08 SPARC miniroot image.
Note: You must be superuser (root) or assume an equivalent role to perform this task.
1. Change to the
Tools directory where the installation image for the Solaris 10 5/08 OS for SPARC platforms is located:
# cd /export/images/SPARC/solaris_10_u5/Solaris_10/Tools
2. Run the
setup_install_server command:
# ./setup_install_server /export/u5 Verifying target directory... Calculating the required disk space for the Solaris_10 product Calculating space required for the installation boot image Copying the CD image to disk... Copying Install Boot Image hierarchy... Install Server setup complete #
The installation server setup is now complete.
3. Change directories:
# cd /export/u5/Solaris/Tools/Boot/sbin
4. Make a copy of the
sulogin file:
# cp sulogin sulogin.orig
5. Set the following environment variable:
# export PKG_NONABI_SYMLINKS=true
6. Install KU patch 137137-09 and other required patches using
patchadd:
patchadd -C /export/u5/Solaris/Tools/Boot /export/119254-59 patchadd -C /export/u5/Solaris/Tools/Boot /export/138866-01 patchadd -C /export/u5/Solaris/Tools/Boot /export/119252-26 patchadd -C /export/u5/Solaris/Tools/Boot /export/124628-08 patchadd -C /export/u5/Solaris/Tools/Boot /export/124630-19 patchadd -C /export/u5/Solaris/Tools/Boot /export/137137-09
Note: Patch 124630-20 (or higher) and 137137-09 are codependent; the miniroot must be patched with both patches.
7. Modify
svc:
Caution: The
SVCCFG_REPOSITORY variable must point to the location of the unpacked miniroot's
repository.db. In this procedure, that location is the
/export/u5/Solaris_10/Tools/Boot/etc/svc directory. The
repository.db file is located in the directory
etc/svc under the unpacked miniroot. Failure to export this variable results in the modification of the live repository, which prevents the live system from booting.
8. Applying the Solaris 10 10/08 KU patch 137137-09 now means that the patched miniroot will be using SPARC NewBoot, which requires that the miniroot be packed:
# /Boot/boot/solaris/bin/root_archive packmedia /export/u5 /export/u5/Solaris_10/Tools/Boot
If the live system where the miniroot is being patched is already at the Solaris 10 10/08 OS (137137-09) level or higher, you can use
#/boot/solaris/bin/root_archive directly.
You might see errors at this stage from the
umount command; it is OK to ignore these errors.
Note:
Step 8 is necessary only if you are applying KU patch 137137-09 to a pre-Solaris 10 10/08 miniroot, that is, you are patching the miniroot of the Solaris 5/08 OS or prior releases with 137137-09. If you are patching a pre-Solaris 10 10/08 miniroot but not applying 137137-09, step 8 is not necessary.
If the system where patching is taking place is not at the Solaris 10 10/08 update level, the
/boot/solaris/bin/root_archive command will not exist. In that case, it is ok to either use
root_archive from the 137137-09 patch, or extract it from the Solaris 10 10/08 media. The
root_archive command in 137137-09 is available at
137137-09/SUNWcakr.u/reloc/boot/solaris/bin/root_archive. Although it is part of an architecture-specific package, it is not architecture-specific itself, and it can run on Solaris 10 FCS upwards. So copy it to
/tmp/root_archive and use
/tmp/root_archive instead of
/boot/solaris/bin/root_archive in Step 8. Make sure you apply the latest revision of 119254 before patching on a pre-Solaris 10 10/08 system. This applies only if the system where
patchadd is being run is at a pre-Solaris 10 10/08 level.
The following procedure shows how to patch a Solaris 10 10/08 SPARC miniroot image. To facilitate unpacking of the Solaris 10 10/08 miniroot, the procedure is carried out on a system installed with the Solaris 10 10/08 OS.
Note: You must be superuser (root) or assume an equivalent role to perform this task.
1. Change to the
Tools directory where the installation image for the Solaris 10 5/08 OS for SPARC platforms is located:
# cd /export/images/SPARC/solaris_10_u6/Solaris_10/Tools
2. Run the
setup_install_server command:
# ./setup_install_server /export/u6 Verifying target directory... Calculating the required disk space for the Solaris_10 product Calculating space required for the installation boot image Copying the CD image to disk... Copying Install Boot Image hierarchy... Install Server setup complete #
The installation server setup is now complete.
3. Unpack the miniroot:
# mkdir /export/mr # /boot/solaris/bin/root_archive unpackmedia /export/u6 /export/mr
4. Change directories:
# cd /export/mr/sbin
5. Make a copy of the
sulogin file:
# cp sulogin sulogin.orig
6. Set the following environment variable:
# export PKG_NONABI_SYMLINKS=true
7. Install required patches:
patchadd -C /export/mr /export/138888-02
8. Modify
svc:
Caution: The
SVCCFG_REPOSITORY variable must point to the location of the unpacked miniroot's
repository.db. In this procedure, that location is the
/export/mr/etc/svc directory. The
repository.db file is located in the directory
etc/svc under the unpacked miniroot. Failure to export this variable results in the modification of the live repository, which prevents the live system from booting.
# export SVCCFG_REPOSITORY=/export/mr/etc/svc/repository.db # svccfg -s system/manifest-import setprop start/exec = :true # svccfg -s system/filesystem/usr setprop start/exec = :true # svccfg -s system/identity:node setprop start/exec = :true # svccfg -s system/device/local setprop start/exec = :true # svccfg -s network/loopback:default setprop start/exec = :true # svccfg -s network/physical:default setprop start/exec = :true # svccfg -s milestone/multi-user setprop start/exec = :true
9. Pack the patched miniroot:
# /Boot/boot/solaris/bin/root_archive packmedia /export/u6 /export/mr
Note: You might see errors at this stage from the
umount command; it is OK to ignore these errors.
The following example shows how to install KU patch 127127-09 on a Solaris 10 8/07 SPARC miniroot image. More generally, the procedure covers patching a miniroot prior to Solaris 10 10/08 OS without applying KU patch 137137-09. Because 137137-09 is not being applied, none of the steps specific to NewBoot are required.
Note: You must be superuser (root) or assume an equivalent role to perform this task.
1. Change to the
Tools directory where the installation image for the Solaris 10 8/07 OS for SPARC platforms is located:
# cd /export/images/SPARC/solaris_10_u4/Solaris_10/Tools
2. Run the
setup_install_server command:
# ./setup_install_server /export/u4 Verifying target directory... Calculating the required disk space for the Solaris_10 product Calculating space required for the installation boot image Copying the CD image to disk... Copying Install Boot Image hierarchy... Install Server setup complete #
The installation server setup is now complete.
3. Change directories.:
# cd /export/u4/Solaris/Tools/Boot/sbin
sulogin# cp sulogin sulogin.orig
5. Set the following environment variable:
# export PKG_NONABI_SYMLINKS=true
6. Install 127127-11 and other required patches:
patchadd -C /export/u4/Solaris/Tools/Boot /export/124630-17 patchadd -C /export/u4/Solaris/Tools/Boot /export/127127-11
Note: When not applying KU patch 137137-09 to the miniroot, patch 124630-17 must be used. Patch 124630-18 (and higher) are incompatible with miniroot kernels prior to 137137-09. This restriction applies to the miniroot only; the restriction does not apply when patching a standard boot environment.
7. Modify
svc:
Caution: The
SVCCFG_REPOSITORY variable must point to the location of the unpacked miniroot's
repository.db. In this procedure, that location is the
/export/u4/Solaris_10/Tools/Boot/etc/svc directory. The
repository.db file is located in the directory
etc/svc under the unpacked miniroot. Failure to export this variable results in the modification of the live repository, which prevents the live system from booting.
The image at
/export/u4 is now patched and ready to use. It will have 127127-11 (the KU patch from the Solaris 5/08 OS) applied.
Note: You must be superuser (root) or assume an equivalent role to perform this task.
1. Create the installation and miniroot directories under the
/export directory:
# mkdir /export/mr
2. Change to the
Tools directory where the installation image for the Solaris 10 5/08 OS for x86 platforms is located:
# cd /export/images/x86/solaris_10_u5/Solaris_10/Tools
3. Run the
setup_install_server command:
# ./setup_install_server /export/u5 Verifying target directory... Calculating the required disk space for the Solaris_10 product Calculating space required for the installation boot image Copying the CD image to disk... Copying Install Boot Image hierarchy... Copying /boot x86 netboot hierarchy... Install Server setup complete #
The installation server setup is now complete.
4. Run the following command to unpack the miniroot:
# /boot/solaris/bin/root_archive unpackmedia /export/u5 /export/mr
5. Change directories:
# cd /export/mr/sbin
6. Make a copy of the
sulogin file:
# cp sulogin sulogin.orig
7. Set the following environment variable:
# export PKG_NONABI_SYMLINKS=true
8. Apply all required patches to the miniroot:
# patchadd -C /export/mr /export/patch-id
For example:
# patchadd -C /export/mr /export/119255-59 # patchadd -C /export/mr /export/119253-26 # patchadd -C /export/mr /export/124629-08 # patchadd -C /export/mr /export/124631-19 # patchadd -C /export/mr /export/138402-01 # patchadd -C /export/mr /export/138402-01 # patchadd -C /export/mr /export/137138-09
9. Export the
SVCCFG_REPOSITORY variable:
# export SVCCFG_REPOSITORY=/export/mr/etc/svc/repository.db
Caution: The
SVCCFG_REPOSITORY variable must point to the location of the unpacked miniroot's
repository.db. In this procedure, that location is the
/export/mr/etc/svc directory. The
repository.db file is located in the directory
etc/svc under the unpacked miniroot. Failure to export this variable results in the modification of the live repository, which prevents the live system from booting.
10. Modify the miniroot's
repository.db:
# svccfg -s system/manifest-import setprop start/exec = :true # svccfg -s system/filesystem/usr setprop start/exec = :true # svccfg -s system/identity:node setprop start/exec = :true # svccfg -s system/device/local setprop start/exec = :true # svccfg -s network/loopback:default setprop start/exec = :true # svccfg -s network/physical:default setprop start/exec = :true # svccfg -s milestone/multi-user setprop start/exec = :true
For more information, see the
svccfg(1M) man page.
11. Restore the original copy of the
sulogin.orig file:
# cd /export/mr/sbin # mv sulogin.orig sulogin
12. Pack the modified miniroot that contains the changes you made. Place the modified miniroot in the
/export/u5 directory:
# /boot/solaris/bin/root_archive packmedia /export/u5 /export/mr
This step essentially replaces
/export/u5/boot/x86.miniroot, along with some other necessary files.
When the system being installed with the modified miniroot is booting prior to the install starting, the following is displayed:
SunOS Release 5.10 Version Generic_137138-09 32-bit
SunOS Release 5.10 Version Generic_137137-09 32-bit
These messages indicate that the miniroot was properly patched, assuming that the miniroot was patched with 137137-09 or 137138-09. If a different KU patch was used, it will be displayed instead.
Note: The message is displayed by the miniroot. As previously explained, the actual image that is installed does not contain patch 137137-09. The process of adding this patch to the final installed image is completed by using a finish script. This process is part of the custom JumpStart program.
Here are some additional resources:
Unless otherwise licensed, code in all technical manuals herein (including articles, FAQs, samples) is provided under this License.