Sun Microsystems Logo
Products & Services
 
Support & Training
 
 

Previous Previous     Contents     Index     Next Next
Chapter 21

Creating Solaris Flash Archives (Tasks)

This chapter provides the procedures for creating a Solaris Flash archive. These procedures include installing a master system and then creating a Solaris Flash archive from that master system. You can also create a differential archive if you have previously installed an archive on a clone system. When the differential archive is created, two images are compared: the unchanged master image and an updated image. The differential archive installs only the differences between the two images. Also, procedures to create scripts are provided to reconfigure or otherwise customize the archive.

Task Map: Creating Solaris Flash Archives

Table 21-1 Task Map: Creating a Solaris Flash Archive to Install With an Initial Installation

Task

Description

For Instructions

Install your chosen software configuration on the master system

Determine the configuration that meets your needs and use any of the Solaris installation methods to install the master system.

To Install the Master System for an Initial Installation 

(Optional) Create customization scripts

Determine if you need to create scripts to do the following:

  • Customize or reconfigure the archive

  • Protect local changes on clone systems

Creating Customization Scripts 

Create the Solaris Flash archive

Use the flar create command to create an archive.

To Create a Solaris Flash Archive for an Initial Installation 

(Optional) Save a copy of the archive

Keep a copy of the archive for future comparison to update a clone system with a differential archive.

To Create a Solaris Flash Archive for an Initial Installation 

Table 21-2 Task Map: Creating a Solaris Flash Archive to Update a Clone System

Task

Description

For Instructions

Prepare master image

Make changes to the unchanged master image such as adding or deleting packages or installing patches.

Installing the Master System 

(Optional) Create customization scripts

Determine if you need to create scripts to do the following:

  • Customize or reconfigure the archive

  • Protect local changes on clone systems

Creating Customization Scripts 

Create the Solaris Flash differential archive

  1. Mount the unchanged master image.

  2. Use the flar create command to compare the two images and create the differential archive.

To Create a Solaris Flash Differential Archive With an Updated a Master Image 

Installing the Master System

You install the master system with the software configuration that you want other systems to have. You can install clone systems with an initial installation that overwrites all files on the system or with an update that only includes the differences between two images. For an initial installation, use any of the Solaris installation methods to install the Solaris operating environment on the master system.

If you have previously installed an archive on a clone system, you can update that system with changes by using a differential archive. The changes are made to the original image such as installing patches, or adding and removing packages. The differential archive overwrites only the files specified in the archive. For the procedure for updating the original master image and creating a differential archive, see To Create a Solaris Flash Differential Archive With an Updated a Master Image.

ProcedureTo Install the Master System for an Initial Installation

  1. Identify the system configuration that you want to install.

  2. With the use of the Solaris installation methods, install the Solaris operating environment on the master system. For a discussion of the different installation methods, refer to Chapter 3, Choosing a Solaris Installation Method (Overview).

  3. Customize your Solaris installation in any of the following ways:

    • Delete software.

    • Add software.

    • Modify configuration files.

    • Add support for peripheral devices on the clone system.

    You can create custom scripts or use the flar create command to create the archive.

Creating Customization Scripts

Scripts can customize the archive. Use these scripts for the following purposes:

  • A precreation script validates the archive at creation time and prepares the archive for later customization, especially differential archives. This script also can create a user-defined section in the archive.

  • A predeployment script validates the archive during installation and prepares the archive for later customization.

  • A postdeployment script reconfigures a new system image on a clone system.

  • A reboot script processes a final reconfiguration after the system is rebooted.

For guidelines on creating scripts, see Guidelines for Creating a Custom Script.

ProcedureTo Create a Precreation Script

This script runs during archive creation. The script has various uses.

  • Validates the contents and the integrity of the software. The script fails the archive creation if the integrity is broken.

  • Prepares products for later customization on clone system.

  • Registers other installation scripts dynamically during archive creation.

  • Adds a message to the flash-creation summary file. The message must be short and record only that scripts were started and finished and the results. You can view the results in the summary section.

  1. Create the precreation script. Follow the guidelines that are described in Guidelines for Creating a Custom Script.

  2. Store the script in the /etc/flash/precreation directory.

Example 21-1 Excerpts From a Precreation Script

The following examples are excerpts from a precreation script.

  • To log the start time in the summary section, use the following example:

    echo "MyApp precreation script started">> $FLASHDIR/summary

  • To check the software integrity, use the flcheck command. This command cannot be used at the command line. The syntax for this command is as follows:

    flcheck software component files and directories ...| -

    For example, to validate the files and directories, use the following example:

    flcheck software component files and directories 
    If Not in selection - refuse creation
    
    echo "Myapp Integrity Damage">>$FLASHDIR/summary

    Or, to keep new files and directories that are unexpected and not fail the archive creation, use the following example:

    flcheck software component files and directories 
    If Not in selection include by force
    flinclude software component

  • To register deployment scripts and data, use the following example:

    • Copy the script to the following directory:
      cp predeployment script /etc/flash/predeployment

    • Or, to register the script dynamically during archive creation, copy the script to the following directory.
      cp predeployment script $FLASHDIR/predeployment

  • To see application specific data in a user-defined section, use the following example:

    cp custom section $FLASHDIR/custom_sections/MyApp

  • To log the success of the installation in the summary section, use the following example:

    echo "product one flash preparation started." >>$FLASH_DIR/summary
    ...
    echo "product one flash preparation finished successfully">>$FLASH_DIR/summary

Previous Previous     Contents     Index     Next Next
 

Updated: 2003-12-15, 21:26