Before taking golden image, Install Fresh OS. Apply required patches. Install additional software. Customize the system as required. Do not use the system while taking the Golden Image. While running make_sys_image, the device files are removed, the host and networking information on the system is reset. After the command is complete, these files are put back. By default, make_sys_image stores the archive in /var/tmp directory. We can also the save the archive in remote system.
Copy /opt/ignite/data/scripts/make_sys_image to /tmp. Set the permission to 755.
# cp –p /opt/ignite/data/scripts/make_sys_image /tmp |
Create a directory to store the golden image
Take the Golden Image
# cd /tmp # ./make_sys_image -d <directory_to_place_Image> -s local -n image_name.gz or to store the image in a remote system # ./make_sys_image -d <directory_to_place_Image> -s <remote_system_IP address> Make sure the ~root/.rhosts file on the ignite server contains the entry <hostname> root |
On the ignite server create a directory for the created image and copy the image to that directory
# mkdir -p /ignite/archives/HP-UX_B.11.31_BOE # scp /var/tmp/<image_name>.gz root@<ignite-server>:/ignite/archives/HP-UX_B.11.31_BOE/HP-UX_B.11.31_BOE.gz |
Adjust the file mode
# chmod 644 /ignite/archives/HP-UX_B.11.31_BOE/HP-UX_B.11.31_BOE.gz |
Creating a configuration directory on Ignite server to recognize the golden image
# mkdir –p /var/opt/ignite/data/Rel_B.11.31 |
Create the Ignite-UX configuration file for the golden image. We can use the example file /opt/ignite/data/examples/B.11.31.golden_image.cfg
Copy the example configuration file to /var/opt/ignite/data/Rel_B.11.31 directory
# cp /opt/ignite/data/examples/B.11.31.golden_image.cfg \ /var/opt/ignite/data/Rel_B.11.31/golden_image_11.31_cfg |
Modify the golden_image_11.31_cfg file to set up the golden image NFS transfer. In the sw_source clause, change the nfs_source to the NFS server name and exported directory name. Make sure to use the IP address instead of hostname since the loading of NFS image may fail if hostname is used.
nfs_source = "192.168.248.237:/backup/AEM/ignite/golden_images"
In the sw_sel clause, change the archive path. If the full path of the archive is 192.168.248.237:/backup/AEM/ignite/golden_images/Rel_B.11.31/goldserver.gz, just add Rel_B.11.31/goldserver.gz alone.
archive_path = "Rel_B.11.31/aemtest2.gz"
# vi ./core_archive_cfg sw_source "core archive" { description = "HP-UX B.11.31 Mar2009 BOE Golden Image" load_order = 0 source_format = archive source_type="NET" post_load_script = "/opt/ignite/data/scripts/os_arch_post_l" post_config_script = "/opt/ignite/data/scripts/os_arch_post_c" nfs_source = "192.168.248.237:/backup/AEM/ignite/golden_images" } sw_category "Languages" { description = "Languages" } sw_category "HPUXEnvironments" { description = "HP-UX Operating Environments" } init sw_sel "HP-UX B.11.31 Mar2009 BOE Golden Image" { description = "HP-UX B.11.31 March 2009 Golden Image BOE" sw_source = "core archive" sw_category = "HPUXEnvironments" archive_type = gzip cpio archive_path = "HP-UX_B.11.31_BOE.gz" impacts = "/" 15Kb impacts = "/dev" 16Kb impacts = "/etc" 35738Kb impacts = "/home" 201Kb impacts = "/ignite" 7165067Kb impacts = "/opt" 5112644Kb impacts = "/sbin" 108210Kb impacts = "/stand" 151326Kb impacts = "/usr" 2756436Kb impacts = "/var" 786742Kb exrequisite += "golden image - 32 bit OS" visible_if = can_run_64bit } = TRUE sw_source "no select" { source_format = cmd } init sw_sel "English" { description = "English Language Environment" sw_source = "no select" sw_category = "Languages" locale = { "SET_NULL_LOCALE:English", "C:English" } } = TRUE init _hp_efi_partition_size=500MB _hp_efi_partition_size help_text "EFI Boot Partition (KB)" _hp_service_partition_size = { 0Mb, 400Mb, 1000Mb, 2000Mb, 4000Mb } init _hp_service_partition_size=400MB _hp_service_partition_size help_text "HP Service Partition (KB)" (memory > 4096Mb) { init _hp_pri_swap = 4096Mb } else { init _hp_pri_swap = memory * 2 } _hp_keyboard = { "USB_PS2_DIN_Swiss_German2" } init _hp_keyboard = "USB_PS2_DIN_Swiss_German2" _hp_custom_sys+={"System Parameters"} init _hp_custom_sys="System Parameters" _hp_custom_sys help_text "System Info" (_hp_custom_sys=="System Parameters") { #final system_name="testa" #final ip_addr["lan5"]="10.0.0.162" #final netmask["lan5"]="255.255.255.0" #final ip_addr[]="10.0.0.47" #final netmask[]="255.255.255.0" #final route_gateway[0]="10.0.0.1" #final route_destination[0]="default" TIMEZONE="MET-1METDST" ROOT_PASSWORD="/agTH91voE/8Y" is_net_info_temporary=FALSE run_setparms=FALSE } _hp_disk_layout+={"Default layout"} init _hp_disk_layout="Default layout" (_hp_disk_layout=="Default layout") { # Disk/Filesystem Layout: volume_group "vg00" { max_physical_extents=4294 max_logical_vols=255 max_physical_vols=16 physical_extent_size=16 minor_number=0x00 usage=LVM physical_volume disk[_hp_root_disk] { } # end pv_options logical_volume "lvol_stand" { usage=VxFS size=2GB blksize=8192 version=5 largefiles=FALSE mount_point="/stand" bad_block_relocate=false contiguous_allocation=true stripes=0 stripe_size=0KB minor_number=0x01 disk[_hp_root_disk] } # end logical_volume logical_volume "lvol_swap" { usage=SWAP_DUMP size=_hp_pri_swap 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 "lvol_root" { usage=VxFS size=4GB 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 "lvol_tmp" { usage=VxFS size=1GB blksize=8192 version=6 largefiles=TRUE mount_point="/tmp" bad_block_relocate=true contiguous_allocation=false stripes=0 stripe_size=0KB minor_number=0x04 disk[_hp_root_disk] } # end logical_volume logical_volume "lvol_home" { usage=VxFS size=4GB blksize=8192 version=6 largefiles=TRUE mount_point="/home" bad_block_relocate=true contiguous_allocation=false stripes=0 stripe_size=0KB minor_number=0x05 disk[_hp_root_disk] } # end logical_volume logical_volume "lvol_opt" { usage=VxFS size=5GB | remaining | 50% free blksize=8192 version=6 largefiles=TRUE mount_point="/opt" bad_block_relocate=true contiguous_allocation=false stripes=0 stripe_size=0KB minor_number=0x06 disk[_hp_root_disk] } # end logical_volume logical_volume "lvol_usr" { usage=VxFS size=5GB | remaining | 50% free 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 "lvol_var" { usage=VxFS size=5GB | remaining | 50% free 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 } # end volume_group "vg00" } |
Run the archive_impact command and get archive impact values
/opt/ignite/lbin/archive_impact -t -g <archive_file_name> |
Include the results in the configuration file, replacing the example impacts line.
# vi ./core_archive_cfg Example : impacts = "/" 15Kb impacts = "/dev" 16Kb impacts = "/etc" 35738Kb impacts = "/home" 201Kb impacts = "/ignite" 7165067Kb impacts = "/opt" 5112644Kb impacts = "/sbin" 108210Kb impacts = "/stand" 151326Kb impacts = "/usr" 2756436Kb impacts = "/var" 786742Kb |
Add the new configuration file (golden_image_11.31_cfg) to /var/opt/ignite/INDEX file.
# vi /var/opt/ignite/INDEX …. cfg "HP-UX B.11.31 Golden Image" { description "Default system configuration for 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/data/Rel_B.11.31/golden_image_cfg" "/var/opt/ignite/config.local" } |
The config and config.local files contains default configuration. config.local should be the last file in the cfg clause. The opt/ignite/data/Rel_B.11.31/config supplies the disk and file system layout default plus other control information required by Ignite-UX.
Make sure the target system can access the archive file using NFS. Now, the above cfg clause appears as an available configuration to Ignite-UX.
# vi /etc/dfs/dfstab … share –F nfs -0 anon=2 /ignite/archives/HP-UX_B.11.31_BOE # shareall |
No comments:
Post a Comment