Chapter 21Creating 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
Table 21-2 Task Map: Creating a Solaris Flash Archive to Update a Clone System
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.
To Install the Master System for an Initial Installation
Identify the system configuration that you want to install.
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).
Customize your Solaris installation in any of the following ways:
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.
To 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.
Create the precreation script. Follow the guidelines that are described in Guidelines for Creating a Custom Script.
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
|
|