Solaris 10 Installation Guide: Solaris Flash Archives (Creation and Installation)

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

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.

Steps
  1. Prepare the master system with changes. Before changes are made, the master system should be running a duplicate of the original archive.


    Note –

    A copy of the unchanged master image must be kept protected from changes and available for mounting later.


  2. Update the unchanged master image with any of the following changes.

    • Delete packages.

    • Add packages or patches.

    • Modify configuration files.

    • Add support for peripheral devices on the clone system.

  3. (Optional) Create custom scripts. See Creating Customization Scripts.

  4. 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
      
      BE_name

      Specifies the boot environment name where the unchanged master image is stored

      mountpoint

      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.

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

      2. On the master system, mount the clone.


        # mount -F nfs clone_system:/ master_dir
        
        clone_system

        Specifies the name of the system to be mounted

        master_dir

        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 28, UFS Backup and Restore Commands (Reference), in System Administration Guide: Devices and File Systems.

  5. Create the differential archive.


    # flar create -n archive_name -A unchanged_master_image_dir \
      options path/filename
    
    archive_name

    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.

    -A unchanged_master_image_dir

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

    options

    For a description of options, see flar create.

    path

    Specifies the path to the directory in which you want to save the archive file. If you do not specify a path, flar create saves the archive file in the current directory.

    filename

    Specifies the name of the archive file.

    • If the differential archive creation is successful, the flar create command returns an exit code of 0.

    • If the differential archive creation fails, the flar create 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 Installation Guide: Custom JumpStart and Advanced Installations.


Example 3–13 Creating a Differential Archive With the New Master Image on the Master System

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.


# flar create -n diffarchive1 -A /a/unchanged_master1 -c diffarchive1.flar


Example 3–14 Creating a Differential Archive With the Images Stored on an Inactive Boot Environment

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
# flar create -n diffarchive4 -A /a -c  diffarchive4.flar