BigAdmin System Administration Portal
Feature Article
Print-friendly VersionPrint-friendly Version

Patching an x86 Miniroot Image for the Solaris OS

Enda O'Connor, March 2007

Abstract

This article describes how to install the latest Kernel Update (KU) patch, or any patch, to a post-GRUB x86 based miniroot image for the JumpStart installation program.


Introduction

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 procedure describes how to patch an x86 GRUB miniroot image to create a modified GRUB based miniroot that contains the latest KU. The Solaris OS that is used in this procedure is the Solaris 10 1/06 release, which is the same release that introduced GRUB based booting on x86 based systems. However, you can use this procedure for all subsequent Solaris 10 releases that implement GRUB based booting. For more information about GRUB based booting, see the System Administration Guide: Basic Administration at http://docs.sun.com/app/docs/doc/817-1985.


About the x86 Miniroot Image

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 only runs during the installation process.

It is important to understand that the instructions that are provided 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 or on the system that the patchadd -C command is run. Patching the x86 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. 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 on the freshly-installed system prior to first boot. This installation of the KU is separate from the x86 miniroot image patch process that is described in this procedure.


Before You Get Started

The examples in this article utilize two different systems. One system is a SPARC platform-based network installation server that is running the JumpStart installation program. The second system is an x86 based system that implements GRUB. The x86 system is the system on which you perform the first set of instructions, which includes unpacking and packing the miniroot. The second set of instructions includes tasks that are performed on a separate SPARC platform-based network installation server. These tasks include how to enable an installation of the modified image from that system.

Note - The instructions in this procedure are for a setup that includes a separate network installation server. If you are not using a separate network installation server, you do not need to complete the second set of instructions. The process of patching the miniroot image is finished when you have completed the first set of instructions.

The following setup was used for this procedure:

  • jmp-start1 - Is a SPARC based network installation server that is running the Solaris 9 OS.

  • v20z-1 - Is an x86 based system that is running the Solaris 10 OS, with GRUB implemented.

  • v20z-1:/export/mr - Is the unpacked miniroot location.

  • v20z-1:/export/u1 - Is the installation image that was created, so it could be modified.

The JumpStart installation image is located at:

/net/jmp-start1/export/images/x86/solaris_10_u1/Solaris_10/Tools


How to Modify the x86 Miniroot

This procedure shows how to install the latest KU 118855-36 patch on a Solaris 10 1/06 miniroot image.

On an x86 based system that is running the Solaris 10 OS with GRUB implemented, follow these steps. 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/u1 /export/mr

2. Change directories to the Tools directory where the Solaris 10 1/06 x86 installation images are located:

# cd /net/jmp-start1/export/images/x86/solaris_10_u1/Solaris_10/Tools

3. Run the setup_install_server command:

# ./setup_install_server /export/u1
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/u1 /export/mr

5. Change directories.

# cd /export/mr/sbin

6. Make a copy of the rc2 and the sulogin files.

# cp rc2 rc2.orig
# cp sulogin sulogin.orig

7. Apply all required patches to the miniroot.

# patchadd -C /export/mr /export/patch-id

For example:

# patchadd -C /export/mr /export/118344-14
# patchadd -C /export/mr /export/122035-05
# patchadd -C /export/mr /export/119043-10
# patchadd -C /export/mr /export/123840-04
# patchadd -C /export/mr /export/118855-36#

8. 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 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.

9. 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.

10. Change directories. Then, restore the original copies of the rc2.orig and sulogin.orig files.

# cd /export/mr/sbin
# mv rc2.orig rc2
# mv sulogin.orig sulogin

11. Pack the modified miniroot that contains the changes you made. Place the modified miniroot in the /export/u1 directory.

# /boot/solaris/bin/root_archive packmedia /export/u1 /export/mr

This step essentially replaces /export/u1/boot/x86.miniroot, along with some other necessary files.

Next Steps - If you ran the preceding instructions on a GRUB based x86 based system that is also your network installation server, you do not need to proceed to the next set of instructions. You are done. The modified miniroot that was packed into /export/u1 in Step 11 created an installable image in the same directory. You are now ready to install this image.

However, if you ran the preceding instructions on a separate x86 based system, similar to the example in this procedure, you will need to copy the modified installation image to the network installation server. Proceed to the next set of instructions, which describe how to copy the installation image back to the network installation server.


Copying the Modified Installation Image to the Network Installation Server

On the installation server, complete the following steps. Note that you must be superuser (root) or assume an equivalent role to perform this task.

1. Create the solaris_10_u1_latest directory.

# mkdir /export/images/x86/solaris_10_u1_latest

2. Change directories to the Solaris 10 Tools directory.

# cd /net/v20z-1/export/u1/Solaris_10/Tools

3. Run the setup_install_server command.

# ./setup_install_server /export/images/x86/solaris_10_u1_latest
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 image on the installation server at /export/images/x86/solaris_10_u1_latest has been successfully modified.

The image at /export/images/x86/solaris_10_u1_latest is now ready to be installed. The image will use a modified miniroot to run the installation that now contains the KU 118855-36 patch.

When the installation process starts, you should see a message that is similar to the following on the console.

"SunOS Release 5.10 Version Generic_118855-36 32-bit"

Note - This message is displayed by the miniroot. As previously explained, the actual image that is installed does not contain patch 118855-36. 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.


Additional References

For more information about the Solaris installation process on both SPARC and x86 based systems, see the following references:


Unless otherwise licensed, code in all technical manuals herein (including articles, FAQs, samples) is provided under this License.


BigAdmin
  
 
 
 
Contact About Sun News & Events Employment Site Map Privacy Terms of Use Trademarks Copyright 1994-2008 Sun Microsystems, Inc.