Creating a Solaris FLAR image
Using the flarcreate command we can create an image of the Solaris operating system. This image can then be used to reinstall the OS on the original host or used to install the OS on other systems.
Creating FLAR image
To create the FLAR image we simply use the following command:
flarcreate -n name options <filename>
Where:
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 Command.filename- The name of the archive file. If you do not specify a path, flarcreate saves the archive file in the current directory.
For example:
# flarcreate -n sol10 -c -S -R / -x /library /flar-images/sol10.flar Full Flash Checking integrity... Integrity OK. Running precreation scripts... Precreation scripts done. Creating the archive...
The options used in the above example are:
-ndefines the name of the FLAR imagesol10-ccompression the final image-Sdo not include sizing information-Rset root directory/-xexclude the specific directory/libraryfrom the image/flar-images/sol10.flarstore the FLAR imagesol10.flaron the/flar-imagesdirectory.
NOTE:
If the archive creation is successful, the flarcreate command returns an exit code of 0.
If the archive creation fails, the flarcreate command returns a nonzero exit code.
Viewing FLAR info
After we have create the FLAR image, we can used the flar info command to view detail of the image. For example:
# flar info /flar-images/sol10.flar archive_id=4e05f33114107d99d68e4219e801d778 files_archived_method=cpio creation_date=20111104125604 creation_master=app-server content_name=sol10 creation_node=t-2000 creation_hardware_class=sun4v creation_platform=SUNW,Sun-Fire-T200 creation_processor=sparc creation_release=5.10 creation_os_name=SunOS creation_os_version=Generic_142909-17 files_compressed_method=compress files_archived_size=5551073973 content_architectures=sun4c,sun4d,sun4m,sun4u,sun4us,sun4s type=FULL
Viewing FLAR image contents
We can use the -l flag to check the file structure of the archive. For example:
# flar info -l /flar-images/sol10.flar
lost+found
export
export/home
:
:
usr/lib/cpu
usr/lib/cpu/sparcv8plus
:
:
devices/pseudo/wc@0:wscons
devices/pseudo/tcp6@0:tcp6
devices/pseudo/sctp6@0:sctp6
var/fm/fmd/ckpt
var/fm/fmd/rsrc
kernel/drv/st.conf
#