Solaris 9 Installation Guide

To Create a Solaris Flash Archive for an Initial Installation

After you install the master system, create a Solaris Flash archive to use to install other systems.

  1. Boot the master system and run it in as inactive a state as possible.

    When possible, run the system in single-user mode. If that is not possible, shut down any applications that you want to archive and any applications that require extensive operating system resources.

    You can create a Solaris Flash archive while the master system is running in multiuser mode, single-user mode, or while booted from one of the following:

    • Solaris 9 DVD.

    • Solaris 9 Software 1 of 2 CD.

    • An image of the Solaris 9 Software. If you are using CD media, the image could include the Solaris 9 Languages CD if needed.

  2. To create the archive, use the flar create command.


    # flar create -n name options path/filename
    

    name

    The name that you give the archive. The name you specify is the value of the content_name keyword.

    options

    For a description of options, see flar create.

    path

    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

    The name of the archive file. 

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

    • If the archive creation fails, the flar create command returns a nonzero exit code.

  3. Make a copy of the archive and save it. The copy can be used in the future to update a clone system with a differential archive.

Examples — Creating an Archive for an Initial Install

File systems can be copied exactly or can be customized by excluding some directories or files. You can achieve the same results by using different options. Use the options that best suit your environment.

The file systems in the following examples have been greatly simplified for clarification. Rather than use file system names such as /var, /usr, or /opt, the master system file structure for these examples is the following:


/aaa/bbb/ccc/ddd
/aaa/bbb/fff
/aaa/eee
/ggg

Caution – Caution –

Use the flar create file exclusion options with caution. If you exclude some directories, others that you were unaware of might be left in the archive, such as system configuration files. The system would then be inconsistent and the installation would not work. Excluding directories and files is best used with data that can easily be removed without disrupting the system, such as large data files.



Example 18–6 Creating an Exact Duplicate Archive

In this example, the archive is named archive1. It is copied exactly from the master system and then compressed. The archive is an exact duplicate of the master system and stored in archive1.flar.


# flar create -n archive1 -c archive1.flar

To check on the file structure of the archive, type the following.


# flar info -l archive1.flar
aaa
aaa/bbb
aaa/bbb/ccc
aaa/bbb/ccc/ddd
aaa/bbb/fff
aaa/eee
aaa/eee
ggg


Example 18–7 Creating an Archive and Excluding and Including Files and Directories

In this example, the archive is named archive2. It is copied from the master system but is not an exact copy. The content under the /aaa directory is excluded, but the content in /aaa/bbb/ccc remains.


# flar create -n archive2 -x /aaa -y /aaa/bbb/ccc  archive2.flar

To check on the file structure of the archive, type the following. The excluded directories that include copied files appear, but only the files that were restored contain data.


# flar info -l aaa
aaa
aaa/bbb/ccc
aaa/bbb/ccc/ddd
aaa/bbb
ggg


Example 18–8 Creating an Archive Excluding and Including Files and Directories by Using Lists

In this example, the archive is named archive5. It is copied from the master system but is not an exact copy.

The exclude file contains the following list:


/aaa

The include file contains the following list:


/aaa/bbb/ccc

The content under the /aaa directory is excluded, but the content in /aaa/bbb/ccc remains.


# flar create -n archive5 -X exclude -f include  archive5.flar

To check on the file structure of the archive, type the following. The excluded directories that include copied files appear, but only the files that were restored contain data.


# flar info -l archive5.flar
aaa
aaa/bbb/ccc
aaa/bbb/ccc/ddd
aaa/bbb
ggg


Example 18–9 Creating an Archive Excluding Files and Directories by Using a List and Restoring a Directory

You can combine options -x, -y, -X and -f. In this example, options -X and -y are combined. The archive is named archive5. It is copied from the master system but is not an exact copy.

The exclude file contains the following list:


/aaa

The -y option restores the ccc directory. The following command produces the archive.


# flar create -n archive5 -X exclude -y /ccc  archive5.flar

To check on the file structure of the archive, type the following. The excluded directories that include copied files appear, but only the files that were restored contain data.


# flar info -l archive5.flar
aaa
aaa/bbb
aaa/bbb/ccc
aaa/bbb/ccc/ddd
ggg


Example 18–10 Creating an Archive Excluding and Including Files and Directories by Using a List With the -z Option

In this example, the archive is named archive3. It is copied from the master system but is not an exact copy. The files and directories to be selected are included in filter1 file. Within the files, the directories are marked with a minus (-) or a plus (+) to indicate which files to exclude and restore. In this example, the directory /aaa is excluded with a minus and the subdirectory /aaa/bbb/ccc is restored with a plus. The filter1 file contains the following list.


- /aaa
+ /aaa/bbb/ccc

The following command produces the archive.


# flar create -n archive3 -z filter1 archive3.flar 

To check on the file structure of the archive, type the following command. The excluded directories that include copied files appear, but only the files that were restored contain data.


# flar info -l archive3.flar
aaa
aaa/bbb
aaa/bbb/ccc
aaa/bbb/ccc/ddd
ggg


Example 18–11 Creating an Archive From an Alternate Boot Environment

In this example, the archive is named archive4. It is copied exactly from the master system and then compressed. The archive is an exact duplicate of the master system and stored in archive4.flar. The -R option is used to create the archive from another directory tree.


# flar create -n archive4 -c -R /x/yy/zz archive4.flar


Example 18–12 Creating an Archive and Adding Keywords to Describe the Archive

In this example, the archive is named archive3. This archive is copied exactly from the master system and then compressed. Options add descriptions to the archive identification section, which can help you to identify the archive later. For information on keywords, their values, and formats, see Solaris Flash Keywords.


# flar create -n archive3 -i 20000131221409 -m pumbaa \
-e "Solaris 8 Print Server" -a "Mighty Matt" -U "Internal Finance" \
-T server archive3.flar 

After the archive is created, you can access the identification section that contains the detailed description. An example of an identification section follows.


section_begin=identification
     files_archived_method=cpio
     files_compressed_method=compress
     files_archived_size=259323342
     files_unarchived_size=591238111
     creation_date=20000131221409
     creation_master=pumbaa
     content_name=Finance Print Server
     content_type=server
     content_description=Solaris 8 Print Server
     content_author=Mighty Matt
     content_architectures=sun4u,sun4m
     creation_node=pumbaa
     creation_hardware_class=sun4u
     creation_platform=SUNW,Sun-Fire
     creation_processor=sparc
     creation_release=5.9
     creation_os_name=SunOS
     creation_os_version=s81_49
     x-department=Internal Finance