Install Solaris from flash archive

Preamble

This document is created to show how to install Solaris OS from flash archive. This process is helpful in case of need to install many similar machines and/or speedup process of implementation of new system with all required software, patches, applications. Other purpose is to prepare fast recovery of important system(s) in DR plan.


Implementation

1. First step is to create repository for flash archive. For this purpose can be used a local filesystem or NFS share. Be aware that you need enough disk space to holding the archive.
# mkdir -p /export/flash
2. Next we should create flash archive of the system. This can be long process depend of amount of data on the system, speed of disks and processor(s). On average PC system it can take up to 30 minutes (or more)
# flarcreate -n flash_archive_root -c -R / -x /export/flash /export/flash/inst_x86
Full Flash
Checking integrity...
Integrity OK.
Running precreation scripts...
Precreation scripts done.
Determining the size of the archive...
5359636 blocks
The archive will be approximately 1.46GB.
Creating the archive...
5359636 blocks
Archive creation complete.
Running postcreation scripts...
Postcreation scripts done.
Running pre-exit scripts...
Pre-exit scripts done.
3. Let’s check the archive
# flar -i /export/flash/inst_x86
archive_id=3eb5bd4ed799d662b120834f7f4de81e
files_archived_method=cpio
creation_date=20080831081410
creation_master=sol2
content_name=flash_archive_root
creation_node=sol2
creation_hardware_class=i86pc
creation_platform=i86pc
creation_processor=i386
creation_release=5.10
creation_os_name=SunOS
creation_os_version=Generic_127128-11
files_compressed_method=compress
files_archived_size=1574745535
files_unarchived_size=2744133632
content_architectures=i86pc
4. For the purpose of install it’s need to export via NFS the directory, so check if NFS server is started and start if not and export directory
# svcs -va|grep nfs
online         -              8:52:09     45 svc:/network/nfs/cbd:default
online         -              8:52:09     46 svc:/network/nfs/status:default
online         -              8:52:09     47 svc:/network/nfs/mapid:default
online         -              8:52:10     49 svc:/network/nfs/nlockmgr:default
online         -              8:52:43      - svc:/network/nfs/rquota:default
online         -              8:52:43      - svc:/network/nfs/client:default
online         -             12:18:20    115 svc:/network/nfs/server:default 
# share -o ro /export/flash/
5. Then start new system, follow the installation process and at the moment of choose installation media select NFS, then enter the location of archive in form
server:/path/to/directory
and the choose the archive you will use or
server:/path/to/flash/archive
Wait a while and you have freshly installed copy of the system from which we create flash archive


Conclusion

Of course this document show only in brief steps to accomplish the task and do not go in deep in to the details, but give overview of the process. For further information about flash archives, installation process, NFS management, etc. refer to official SUN documentation and related papers.

No comments:

Post a Comment

Compressed tar archive

There are some cases when you want to create compressed tar archive but you do not have enough disk space to keep original files and tar arc...