How to setup your own file system layout for a Golden Images
Contents
Abstract
This document describes the required process to create a personalized file system layout for a golden image. The process can be followed when creating a network recovery archive or a recovery DVD.
General Process
1. Run a make_tape_recovery or use any previous one. The idea is to have a disk layout already created from the "Basic System", instead of create it manually from scratch (instl_adm(4)).
# make_tape_recovery –s <server> -p –v
2. Create Golden Image archive:
# make_sys_image -s <server> -d <destination_directory>
3. Create Golden Image configuration file. There are some example files located at /opt/ignite/data/examples that you will need to copy to a different location and modify. The modification of this file is out of the scope of this document.
# cp /opt/ignite/data/examples/B.11.31.golden_image.cfg /var/opt/ignite/data/Rel_B.11.31
4. Copy the system_cfg file for the client to a different location (The recommendation is to use the standard location):
# cp /var/opt/ignite/clients/delta/recovery/latest/system_cfg /var/opt/ignite/data/Rel_B.11.31/disklayout
5. Remove all sections except the "Disk and Filesystems" section. Edit the file systems size as desired.
# cat disklayout # # Disk and Filesystems # _hp_disk_layout+={"HP-UX save_config layout"} (_hp_disk_layout=="HP-UX save_config layout") { # Disk/Filesystem Layout: volume_group "vg00" { max_physical_extents=4350 max_logical_vols=255 max_physical_vols=16 physical_extent_size=8 minor_number=0x00 usage=LVM physical_volume disk[_hp_root_disk] { } # end pv_options logical_volume "lvol1" { usage=HFS size=1835008KB mount_point="/stand" minfree=10 file_length=LONG blksize=65536 fragsize=8192 ncpg=16 nbpi=6434 rotational_delay=0 largefiles=FALSE bad_block_relocate=false contiguous_allocation=true stripes=0 stripe_size=0KB minor_number=0x01 disk[_hp_root_disk] } # end logical_volume logical_volume "lvol2" { usage=SWAP_DUMP size=2097152KB mount_point="primary" bad_block_relocate=false contiguous_allocation=true stripes=0 stripe_size=0KB minor_number=0x02 disk[_hp_root_disk] } # end logical_volume logical_volume "lvol3" { usage=VxFS size=1048576KB blksize=8192 version=6 largefiles=TRUE mount_point="/" bad_block_relocate=false contiguous_allocation=true stripes=0 stripe_size=0KB minor_number=0x03 disk[_hp_root_disk] } # end logical_volume logical_volume "lvol4" { usage=VxFS size=10485760KB blksize=8192 version=6 largefiles=TRUE mount_point="/opt" bad_block_relocate=true contiguous_allocation=false stripes=0 stripe_size=0KB minor_number=0x04 disk[_hp_root_disk] } # end logical_volume logical_volume "lvol5" { usage=VxFS size=524288KB blksize=8192 version=6 largefiles=TRUE mount_point="/tmp" bad_block_relocate=true contiguous_allocation=false stripes=0 stripe_size=0KB minor_number=0x05 disk[_hp_root_disk] } # end logical_volume logical_volume "lvol6" { usage=VxFS size=106496KB blksize=8192 version=6 largefiles=TRUE mount_point="/home" bad_block_relocate=true contiguous_allocation=false stripes=0 stripe_size=0KB minor_number=0x06 disk[_hp_root_disk] } # end logical_volume logical_volume "lvol7" { usage=VxFS size=2818048KB blksize=8192 version=6 largefiles=TRUE mount_point="/usr" bad_block_relocate=true contiguous_allocation=false stripes=0 stripe_size=0KB minor_number=0x07 disk[_hp_root_disk] } # end logical_volume logical_volume "lvol8" { usage=VxFS size=2621440KB blksize=8192 version=6 largefiles=TRUE mount_point="/var" bad_block_relocate=true contiguous_allocation=false stripes=0 stripe_size=0KB minor_number=0x08 disk[_hp_root_disk] } # end logical_volume logical_volume "test" { usage=VxFS size=65536KB blksize=1024 version=6 largefiles=TRUE mount_point="/test" bad_block_relocate=true contiguous_allocation=false stripes=0 stripe_size=0KB minor_number=0x09 disk[_hp_root_disk] } # end logical_volume } # end volume_group "vg00" } # end "HP-UX save_config layout" }
6. When Ignite-UX is reading the configuration file, it needs to know if this configuration will be use for a PA-RISC or IA64 client. For this reason you will need to encapsulate the file system layout into a processor model section.
For PA-RISC clients use:
(is_hppa)
For IA64 clients use:
(is_ia64)
The resulting disklayout file should be similar to the following:
# cat disklayout (is_hppa) { # # Disk and Filesystems # _hp_disk_layout+={"HP-UX save_config layout"} (_hp_disk_layout=="HP-UX save_config layout") { ... } # end volume_group "vg00" } # end "HP-UX save_config layout" }
7. Modify /var/opt/ignite/INDEX file. Add a new section for the new archive:
# cat /var/opt/ignite/INDEX # /var/opt/ignite/INDEX # This file is used to define the Ignite-UX configurations # and to define which config files are associated with each # configuration. See the ignite(5), instl_adm(4), and # manage_index(1M) man pages for details. # # NOTE: The manage_index command is used to maintain this file. # Comments, logic expressions and formatting changes are not # preserved by manage_index. # # WARNING: User comments (lines beginning with '#' ), and any user # formatting in the body of this file are _not_ preserved # when the version of Ignite-UX is updated. # cfg "HP-UX B.11.11 Default" { description "This selection supplies the default system configuration that HP supplies for the B.11.11 release." "/opt/ignite/data/Rel_B.11.11/config" "/opt/ignite/data/Rel_B.11.11/hw_patches_cfg" "/var/opt/ignite/config.local" } cfg "HP-UX B.11.23 Default" { description "This selection supplies the default system configuration that HP supplies for the B.11.23 release." "/opt/ignite/data/Rel_B.11.23/config" "/opt/ignite/data/Rel_B.11.23/hw_patches_cfg" "/var/opt/ignite/config.local" } cfg "HP-UX B.11.31 Default" { description "This selection supplies the default system configuration that HP supplies for the B.11.31 release." "/opt/ignite/data/Rel_B.11.31/config" "/opt/ignite/data/Rel_B.11.31/hw_patches_cfg" "/var/opt/ignite/config.local" } cfg "HP-UX B.11.31 MyNewGoldenImage" { description "This selection supplies the default system configuration that HP supplies for the B.11.31 release." "/opt/ignite/data/Rel_B.11.31/config" "/var/opt/ignite/data/Rel_B.11.31/B.11.31.golden_image.cfg" "/var/opt/ignite/data/Rel_B.11.31/disklayout" "/opt/ignite/data/Rel_B.11.31/hw_patches_cfg" "/var/opt/ignite/config.local" }
8. During the installation process, just select “HP-UX B.11.31 MyNewGoldenImage” to load the file system layout you specified. You will see the “HP-UX save_config layout” entry in the Basic Tab view. Also, you can check the File System Tab to review your file system size definitions.
References
- man 4 instl_adm
Authors
- Ricardo Soto Vargas
- Editor Scott Marer