You are here

Part2. Ignite Series: Creating a golden Image to install serveral systems(IGNITE-UX)

Hi,

The Doc Pablo sent the other day made me go back and check that I don't have any written info on several ignite procedures:golden images, automatic kernel config, post scripting,etc. I have always done it by heart, but I'm starting to forget all that stuff so I thought on doing a series of post about Ignite.

In the first post we sea how to create a Golden Image, and configure Ignite so it can use it:

We Already have a server, which is perfect and clean(latest release, patched,drivers updated,cleanup fs,deleted logs,etc) , once we have reached this point we wan't to create our image, so here we go:

Ignite server: fowler
Golden image creation server:gerrard

first we need to have space on the ignite server Filesystems to archive the image, in our case we have a /var/opt/ignite/images, exported via nfs:

root@gerrard:/> showmount -e fowler | grep image
/var/opt/ignite/images (everyone)
root@gerrard:/>

We mount the FS via NFS on our gerrard server:

root@gerrard:/> mkdir /mnt
root@gerrard:/> mount fowler:/var/opt/ignite/images /mnt
root@gerrard:/>

So now that we have space to save the golden image we can start with the procedure:

Make sure the Packge HP-UX Installation Utilities for Installing 11.xx is installed on that box
On the box copy the file /opt/ignite/data/scripts/make_sys_image to the /tmp directory.

root@gerrard:/> cp /opt/ignite/data/scripts/make_sys_image /tmp
root@gerrard:/> cd /tmp

Now lets run the make_sys_image to create the golden image in /mnt , you have to be carefull, when you run the script make_sys_image with cleanup level2 it temporarily removes hostname and network configuration, so don't stop the script before it finishes, or you can leave the system in a bad state.

root@gerrard:/tmp> ./make_sys_image -s local -d /mnt/11.31-DCOE -u -n golden-11.31-1009-DCOE -v (the-u option checks available space in the FS -n nameof the golden image)
* Start printing VERBOSE messages.
* Preparing to create a system archive.
======= 01/12/12 10:51:09 +0100 BEGIN make_sys_image
* Testing for necessary pax patch.
* Archive setup

NOTE: CLEAN_LEVEL set to 2: (see -l option for make_sys_image(1M))
While this command is executing at clean level 2, the system
should be as quiet as possible. The host and/or networking
information on the system are temporarily set to newconfig
values. After the command is complete these files are
returned to their previous state.
*NOTE: Identifying any core files on the system
* Clean level 2 selected: Remove host identity, and most network information..

* Archiving contents of gerrard via tar to
/mnt/11.31-DCOE/golden-11.31-1009-DCOE.
* Clean level 2 selected: Remove host identity, and most network information.
/mnt/11.31-DCOE/golden-11.31-1009-DCOE
* Creation of system archive complete.
* Clean up: Do not interrupt; restoring files, kernel, and transition
links.
======= 01/12/12 11:20:36 +0100 END make_sys_image

* Moving /var/tmp/ign_configure/make_sys_image.log to
/mnt/11.31-DCOE/make_sys_image.log.
root@gerrard:/tmp>

We can check the size of the image on the ignite server:

root@fowler:/var/opt/ignite/images> du -sk */*
2892648 11.31-DCOE/golden-11.31-1009-DCOE
6 11.31-DCOE/make_sys_image.log
root@fowler:/var/opt/ignite/images> file 11.31-DCOE/golden-11.31-1009-DCOE
11.31-DCOE/golden-11.31-1009-DCOE: gzip compressed

Good nearly 3 gig, it would fit in a DVD if needed with no problems. Let's get on with the ignite server configuration so it can use the golden image:

Create a configuration directory

root@fowler:> mkdir -p /var/opt/ignite/data/HP-UX_B.11.31_DCOE

Copy the example config file to the configuration directory

root@fowler:> cd /var/opt/ignite/data/HP-UX_B.11.31_DCOE
root@fowler:> cp /opt/ignite/data/examples/core11.cfg ./core_archive_cfg
root@fowler:/var/opt/ignite/images/11.31-DCOE> /opt/ignite/lbinia/archive_impact -t -g golden-11.31-1009-DCOE
impacts = "/" 41Kb
impacts = "/.ssh" 7Kb
impacts = "/dev" 120698Kb
impacts = "/etc" 42811Kb
impacts = "/home" 16Kb
impacts = "/opt" 4390373Kb
impacts = "/sbin" 166389Kb
impacts = "/stand" 164422Kb
impacts = "/usr" 2918557Kb
impacts = "/var" 1279956Kb

Add the new impacts lines to the core_archive_cfg file, we also have to modify the nfs_source, and the descriptions of the sw_sel, etc..
Here is the example of a very basic config file, just to get the golden image working:

root@fowler:>cat /var/opt/ignite/data/HP-UX_B.11.31_DCOE/core_archive_cfg

########################################################################
## Software Sources
########################################################################

sw_source "Golden Images" {
description = "GOLDEN IMAGE 11.31 DCOE"
load_order = 0
source_format = archive
source_type="NET"

# When using this configuration file with a tape or CD-ROM where the
# archive is on the same piece of media, then un-comment the next
# line to prevent a prompt to change media during install.
# change_media=FALSE

# The following 2 scripts should be reviewed to see if the defined
# defaults are applicable. If you need to modify them, copy them
# to /var/opt/ignite/scripts first and change the paths here.
post_load_script = "/opt/ignite/data/scripts/os_arch_post_l"
post_config_script = "/opt/ignite/data/scripts/os_arch_post_c"

# If nfs_source is used, be sure to export the source.
nfs_source = "19.132.168.63:/var/opt/ignite/images/11.31-DCOE"

}

########################################################################
## Software Categories
########################################################################

sw_category "Languages" {
description = "Languages"
}

sw_category "HPUXEnvironments" {
description = "HP-UX Operating Environments"
}

########################################################################
## Operating Environments
########################################################################

########################################################################
## OS archives
########################################################################
init sw_sel "Golden image 11.31 DCOE 1009" {
description = "Golden image 11.31 Release:1009 DCOE"
sw_source = "Golden Images"
sw_category = "HPUXEnvironments"
archive_type = gzip tar

# For NFS, the path to the archive is relative to the mount point
# specified in the "nfs_source" keyword within the sw_source stanza
# above:
archive_path = "golden-11.31-1009-DCOE"

# The data for the "impacts" statements are found by running:
# /opt/ignite/lbin/archive_impact -t -g
impacts = "/" 41Kb
impacts = "/.ssh" 7Kb
impacts = "/dev" 120698Kb
impacts = "/etc" 42811Kb
impacts = "/home" 16Kb
impacts = "/opt" 4390373Kb
impacts = "/sbin" 166389Kb
impacts = "/stand" 164422Kb
impacts = "/usr" 2918557Kb
impacts = "/var" 1279956Kb

visible_if = can_run_64bit
} = TRUE

########################################################################
## Set the variable _hp_os_bitness depending on which of the archive
## sw_sels was selected. This variable is used by configuration files
## generated via make_config to determine which version (32-bit or
## 64-bit) of a bundle will be loaded.
########################################################################
(sw_sel "golden image - 32 bit OS") {
_hp_os_bitness = "32"
}
(sw_sel "golden image - 64 bit OS") {
_hp_os_bitness = "64"
}

########################################################################
## Languages
## Specified so that the selector in the UI will not be empty.
## Cannot use the "core archive" sw_source because there are no
## archives associated with it.
##
## The "no select" sw_source is a no-op source since it is "cmd"
## format, and does not have any scripts specified. Every sw_sel needs
## a sw_source.
########################################################################
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

########################################################################
## Keyboards
## Newer machines use USB as the keyboard interface. This example
## shows a way to handle both older (PS2) and newer (USB) keyboards.
## There are many other keyboard types available, see itemap(1m).
########################################################################
_hp_keyboard = {
"Not_Applicable"
}
init _hp_keyboard = "Not_Applicable"
has_ps2 {
_hp_keyboard += {
"PS2_DIN_US_English",
"PS2_DIN_US_English_Euro"
}
init _hp_keyboard = "PS2_DIN_US_English"
}

has_usb {
_hp_keyboard += {
"USB_PS2_DIN_US_English",
"USB_PS2_DIN_US_English_Euro"
}
init _hp_keyboard = "USB_PS2_DIN_US_English"
}

You can check the integrity of your file with:

root@fowler:/> instl_adm -T -f /var/opt/ignite/data/HP-UX_B.11.31_DCOE/core_archive_cfg
root@fowler:/> echo $?
0

So now we tie it all together in the main INDEX file:

I added to the end of the file:

root@fowler:/>tail -6 /var/opt/ignite/INDEX

cfg "HP-UX B.11.31 Golden Image DCOE 1003" {
description "11.31 DCOE Golden IMAGE releas:1003 ready to use"
"/opt/ignite/data/Rel_B.11.31/config"
"/var/opt/ignite/data/HP-UX_B.11.31_DCOE/core_archive_cfg"
"/var/opt/ignite/config.local"
}

we check it again with:

root@fowler:/opt/ignite/data> instl_adm -T
* Checking file: /opt/ignite/data/Rel_B.11.23/config
* Checking file: /opt/ignite/data/Rel_B.11.23/hw_patches_cfg
* Checking file: /var/opt/ignite/data/Rel_B.11.23/core_cfg
* Checking file: /var/opt/ignite/config.local
* Checking file: /opt/ignite/data/Rel_B.11.11/config
* Checking file: /opt/ignite/data/Rel_B.11.11/hw_patches_cfg
* Checking file: /var/opt/ignite/data/Rel_B.11.11/core_cfg
* Checking file: /opt/ignite/data/Rel_B.11.31/config
* Checking file: /opt/ignite/data/Rel_B.11.31/hw_patches_cfg
* Checking file: /var/opt/ignite/data/Rel_B.11.31/core_cfg
* Checking file: /var/opt/ignite/data/HP-UX_B.11.31_DCOE/core_archive_cfg
root@fowler:/opt/ignite/data>

Now we can net boot any of our servers from ignite and install the golden Image.

Unix Systems: 

Comments

I am trying to boot using the golden image I ve created of an vm, but while rebooting using bootsys command from the server I get the following screens

# bootsys -i "B.11.31 IA golden image" -f "HIM-VM:15.213.230.10"
Primary boot path set to 0/0/1/0.0x0.0x0 (/dev/disk/disk1_p2)
Rebooting HVM now.
bootsys_prep return code = 0
#

after that the VM reboots and shows this error

* Bringing up Network (lan0)
add net default: gateway 15.213.224.1
* Reading configuration information from server...
* NFS mounting clients directory.
* Using client directory: var/opt/ignite/clients/0xC2C5566E369E
* Checking configuration for consistency...
ERROR: Failed to load config file:
"/spare_disk2/himanshu/goldenimage/B.11.31.golden_image.cfg" from
server.
ERROR: Failed to load config files from server or media.
ERROR: net_cfg_prep: Problems were encountered while parsing the
configuration files. See the messages above for details. Using
instl_adm with the -T and/or -D options on the server may help isolate
the problem. (See instl_adm(1M) and instl_adm(4) man pages.)
* tftp error log follows:
tftp> tftp> tftp> tftp> tftp> Error code 2: Access violation
tftp>
ERROR: File /spare_disk2/himanshu/goldenimage/B.11.31.golden_image.cfg from install tftp server
was zero-length.
* Loading configuration user interface, please wait...

and i get this window saying no environment

Configurations: [ B.11.31 IA golden image ->] [ Description... ] ││
│ │ ││
│ │ Environments: [ ->] (HP-UX B.11.31) ││
│ │ ││
│ │ [ Root Disk ] HP_Virtual_FileDisk, 0/0/1/0.0x0.0x0, 32> ││
│ │ ││
│ │ File System: [ Logical Volume Manager (LVM) with VxFS ->] ││
│ │ ││
│ │ [ Root Swap (MB)... ] 2048 Physical Memory (RAM) = 3066 MB ││
│ │ ││
│ │ [ Languages... ] [ Keyboards... ] [ Additional... ]││
│ │ ││
│ └───────────────────────────────────────────────────────────────────────────┘│
│ [ Show Summary... ] [ Reset Configuration ] │
│──────────────────────────────────────────────────────────────────────────────│
│ [ Go! ] [ Cancel ] [ Help ] │
└────────────────────────────────────────────────────────────────────────────

it says "selected configuration has no environment"

what am I missing..? kindly advise

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.

Fatal error: Class CToolsCssCache contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (DrupalCacheInterface::__construct) in /homepages/37/d228974590/htdocs/sites/all/modules/ctools/includes/css-cache.inc on line 52