Modify a Solaris Jumpstart Miniroot for Fun and Profit

I use the following basic procedure to create a Jumpstart boot image that I can use for various system maintenance purposes.  The boot image is used solely to boot across the network into single user mode.   Once in single user mode I then have an OS image that contains useful software and patches that do not come with a basic Jumpstart miniroot image.  For example, my Jumpstart miniroot contains bash, SunVTS, and several firmware patches.  This makes life a lot easier when I’m doing service work on our systems.  If a system comes in with a bad system board, CPU or memory DIMM I can replace the failed components, stress test the new DIMM or CPU, and update the OBP to the latest revision all from a network boot image

Remember, you are responsible for your own systems.  Seeds of Genius is not liable for any problems that may occur based on your use of the following information.  This is for informational purposes only and these exact steps will not apply directly to all environments.  Please make sure to modify this procedure for your specific needs.

I started with a Sun BigAdmin article as my source, and then modified the steps to suit my needs.
http://www.sun.com/bigadmin/features/hub_articles/patchmini.jsp

Step 1: Build Initial Boot Image on Jumpstart Server

Install Solaris 10 SPARC u9 onto the system that will be your Jumptart server.

You can either use a DVD or an ISO of the DVD to create the network boot image.

  • After Solaris installation, insert Solaris 10 SPARC u9 DVD into DVD drive.  If using a DVD image the mount point will be /cdrom/cdrom0/
  • OR, use an ISO image of the DVD and follow these steps.  Assume the ISO image is on the system at /export/sol-10-u9-ga-sparc-dvd-iso

# lofiadm -a /export/sol-10-u9-ga-sparc-dvd-iso
/dev/lofi/1
# mkdir /mnt/u9
# mount -F hsfs /dev/lofi/1 /mnt/u9

Whether you are using the DVD or an ISO image modify the following step to use the correct mount point of where the Solaris image resides

# mkdir -p /export/Solaris/10/u9
# <MNT_PNT>/Solaris_10/Tools/setup_install_server -b /export/Solaris/10/u9

Step 2: Unpack miniroot for editing

# mkdir /var/tmp/mr
# /boot/solaris/bin/root_archive unpackmedia /export/Solaris/10/u9 /var/tmp/mr

WARNING: The Solaris 11 version of the root_archive tool is not compatible with the Solaris 10 version of the tool. Therefore, ramdisk manipulation should only be performed on a system that is running the same Solaris release as the archives.

Step 3: Modify miniroot

You can modify the minitroot in any way you’d like; install packages, install patches, add files.  The following examples show different ways that the miniroot can be modified for various purposes.

Example 1:

To create a boot image to update firmware on a SunFire 240 you will need to download the firmware patch from Oracle to a separate directory location on your Jumpstart server. Once unzipped, copy the flash-update-SunFire240 and unix.flash-update.SunFire240.sh files from the patch directory to the root of the miniroot.

# unzip 121683-06.zip
# mkdir /var/tmp/mr/fw
# cp -rp 121683-06/*flash-update* /var/tmp/mr/fw/

Note:  When you boot into single user mode from this image you will need to remount root as rw and then run the flash-update shell script manually.  Following the instructions provided in the README file will not work.

# mount -o remount,rw /
# /fw/unix.flash-update.SunFire240.sh

Example 2:

To apply a patch to the miniroot, unzip the patch in a separate directory from the miniroot.  Use the patchadd with the -R option to set the miniroot location as the root to be patched.

# unzip <Patch#>.zip
# patchadd -R /var/tmp/mr <Patch#>

Example 3:

To install a software package, place the package in a separate directory from the miniroot.  Use the pkgadd with the -R option to set the miniroot location as the root to install the package. You will need to handle software dependencies, and considering the minimal amount of packages on the original miniroot figuring this out can be a major task.

# pkgadd -R /var/tmp/mr SUNWbash

As an example use-case scenario, I currently have a miniroot that has all the packaged required to run SunVTS so that I can perform a system validation from a net boot.

Step 4: Pack miniroot

# /boot/solaris/bin/root_archive packmedia /export/Solaris/10/u9 /var/tmp/mr

Step 5: Compress Miniroot

# cd /export/OS_Images/Solaris/10/u9/boot
# mv sparc.miniroot sparc.miniroot.bak
# /sbin/fiocompress -c sparc.miniroot.bak sparc.miniroot

Step 6: Setup Jumptart client

Even though this setup is only to boot a system into single user mode across the network for maintenance purposes (ie: to run SunVTS or update firmware), the add_install_client command requires the -p, -c, and -s options.  These options should point to a system or IP address that is an actual NFS server or else you might have a pin-wheel spinning even after the system comes up in single user mode.

# cd /export/Solaris/10/u9
# ./add_install_client -p jumpstart:/export/Jumpstart/Sysidcfgs -c jumpstart:/export/Jumpstart/Profiles -s jumpstart:/export/OS_Images/Solaris/SPARC/10/u8 hostname sun4u

Related Articles:


ABOUT US
Seeds of Genius, Inc. offers a full range of IT solutions including hardware and software products in addition to consulting, installation and support services. For more information, please visit our main web site at http://www.seedsofgenius.com or contact our Technical Sales department at (410) 312-9806.