We can create an image of Solaris operating system by using the flarcreate command. This image can be used for reinstall the OS in the other machines. Even that flar is an image of an operating system, flar image deesn’t contain some host specific information like IP address, hostname, routing rules, etc.
To create the flare image we use the following command :
# flarcreate -n solaris9 -c -S -R / -x /sharedspace -x /s10 /s10/solaris9.flar
There are some option for flarcreate command :
-
-n: defines name of the flar image -
-c: add compression to the image result -
-S: do not include sizing information -
-R: set root directory of the master operating system. For above example the root OS is/. -
-x: exclude the specific directory from the image. For above example flar image created will not contain the directory/s10&/sharedspace. - The output image defined in the end of command. For above example the result (called
solaris9.flar) will be stored in/s10directory
There are some other option available, you can find the detail in the man page of flarcreate command. Sometime we can skip some of options, below is the example :
bash-2.05# flarcreate -n testflar -R / -S /export/fsi/testflar.flar Full Flash Checking integrity... Integrity OK. Running precreation scripts... Precreation scripts done. Creating the archive... bash-2.05#
After we get the output, we can check the output file using “flar info" command like example below :
bash-2.05# flar info tesflar.flar archive_id=0a408a1bd7f6db712e78398a07930616 files_archived_method=cpio creation_date=20071024081100 creation_master=app-server content_name=tesflar creation_node=app-server creation_hardware_class=sun4us creation_platform=FJSV,GPUZC-M creation_processor=sparc creation_release=5.9 creation_os_name=SunOS creation_os_version=Generic_122300-08 files_compressed_method=none files_archived_size=5551073973 content_architectures=sun4us type=FULL
I’m trying to create a flar of a zfs root pool of an LDOM/Global Zone with all of its component parts to use as input to create a new non-global zone. The resulting output is missing at least the contents of /opt, which has a dataset of rpool/opt . It is not included in the archive. This is the syntax I am using:
sudo flarcreate -S -n 102111 -L cpio -D /u04 /u02/102221_Lcpio.flar
These are the messages:
Archive format requested is cpio
This archiver format is NOT VALID for flash installation of ZFS root pool.
This format is useful for installing the system image into a zone.
Reissue command without -L option to produce an archive for root pool install.
Full Flash
Checking integrity…
Integrity OK.
Any thoughts on how to get /opt (and whatever else has been silently excluded) to be included?
Thanks,
Ken
Hi Ken, have you try using “-R /” to define your root directory?