Before creating a differential archive, you need two images to compare: an unchanged master image and an updated master image. One image is the unchanged master image that has been kept unchanged. This image was stored and needs to be accessed. The second image is the unchanged master image that is updated with minor changes. The root (/) file system is the default for the new image, but you can access this image if it has been stored elsewhere. After you have the two images, you can create a differential archive, which contains only the differences between the two images. The differential archive can then be installed on clones that were installed previously with the unchanged master image.
Prepare the master system with changes. Before changes are made, the master system should be running a duplicate of the original archive.
A copy of the unchanged master image must be kept protected from changes and available for mounting later.
Update the unchanged master image with any of the following changes.
Add packages or patches.
Modify configuration files.
Add support for peripheral devices on the clone system.
(Optional) Create custom scripts. See Creating Customization Scripts.
Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.
Deliver the unchanged master image in a mount point.
If the unchanged master image is stored on an inactive boot environment, retrieve it by using the lumount command.
# lumount BE_name mountpoint
Specifies the boot environment name where the unchanged master image is stored
Specifies a root (/) file system where the image is stored
In the following example, the inactive boot environment is named unchanged_master1. The mount point is the directory /a on the master system.
# lumount unchanged_master1 /a
If the image is stored on a clone, mount the clone by using NFS.
On the master system, share the clone's root (/) file system and give the master root permissions on the clone system.
# share -F nfs -o rw,root=master_system "/"
master_system is the name of the master system.
On the master system, mount the clone.
# mount -F nfs clone_system:/ master_dir
Specifies the name of the system to be mounted
Specifies the directory where the unchanged master image is stored
If you saved the image with the ufsdump command, use the ufsrestore command to retrieve a copy. For information about how to use these commands, see Chapter 27, UFS Backup and Restore Commands (Reference), in System Administration Guide: Devices and File Systems.
Create the differential archive.
# flarcreate -n archive_name -A unchanged_master_image_dir \ options path/filename
Specifies the name that you give the archive. The archive_name you specify is the value of the content_name keyword. The name is listed in the archive-identification section.
Creates a differential archive by comparing a new system image with the image that is specified by the unchanged_master_image_dir argument. By default, the new system image is root (/). You can change the default with the -R option. unchanged_master_image_dir is a directory where the unchanged system image is stored or mounted through UFS, NFS, or the lumount command.
You can include and exclude some files by using the options for contents selection. For a list of options, see flar Command.
For a description of options, see flar Command.
Specifies the path to the directory in which you want to save the archive file. If you do not specify a path, flarcreate saves the archive file in the current directory.
Specifies the name of the archive file.
If the differential archive creation is successful, the flarcreate command returns an exit code of 0.
If the differential archive creation fails, the flarcreate command returns a nonzero exit code.
For procedures about installing an archive, see To Prepare to Install a Solaris Flash Archive With a Custom JumpStart Installation in Solaris 10 8/07 Installation Guide: Custom JumpStart and Advanced Installations.
In this example, the directory for unchanged master image is named unchanged_master1. The new master image that contains changes is the root (/) directory. The new master image is compared to the unchanged master image and the resulting differential archive is then compressed. The differential archive is stored in diffarchive1.flar file. The archive contains files that are to be deleted, changed, or added when installed.
# flarcreate -n diffarchive1 -A /a/unchanged_master1 -c diffarchive1.flar
In this example, the unchanged master image, unchanged_master1, is stored on an inactive boot environment and is accessed by mounting the boot environment. The new master image is the root (/) directory. The new master image is compared to the unchanged master and the resulting differential archive is then compressed. The archive is stored in diffarchive4.flar. The archive contains files that are to be deleted, changed, or added when installed.
# lumount unchanged_master1 /a # flarcreate -n diffarchive4 -A /a -c diffarchive4.flar