Installing a Custom Operating System with HP Insight Control for Linux

10
If you are performing an unattended installation, you must create this script.
The
boot_stanza script runs during the Configure System to Boot from Network operation
when you install an OS. Insight Control for Linux passes the GUID.vars file name as an argument
when Insight Control for Linux starts the boot_stanza script. The boot_stanza script must then
source in the GUID.vars file to access to the variables contained in the file. For an example of a
bash script that sources the GUID.vars file, see
Sourcing in the GUID.vars file.
Use the variables from GUID.vars file to construct a boot stanza appropriate for your custom OS.
For example, if are installing your OS using virtual media, your boot_stanza script might resemble
the following:
APPEND_LINE="append initrd=${ramdisk} ks=cdrom:/${guid} ksdevice=${mac}
network dhcp=static ip=${ip} netmask=${netmask} gateway=${gateway}
nameserver=${nameserver} hostname=${hostname} ${extra_kernel_params}"
# Write the boot loader configuration to standard out.
cat <<EOF
kernel ${kernel}
$APPEND_LINE
EOF
After the boot_stanza script runs, the output might resemble the following:
kernel vmlinuz
append initrd=initrd.img nokill
ks=http://172.0.0.100:60000/instconfig/00000019bb3a62fe0000000300000065
ksdevice=00:1F:29:CD:9A:EC network dhcp=static nicdelay=10
ip=172.0.0.150 netmask=255.255.252.0 gateway=172.0.0.1
nameserver=172.0.0.2 hostname=mushy console=ttyS0
Insight Control for Linux provides an example boot_stanza script for CentOS and Debian under the
/opt/repository/instconfig/custom/examples/ directory:
For CentOS5, the file is CentOS5/boot_stanza
For Debian5, the file is Debian5/boot_stanza
Use the example boot_stanza script as a model for creating your own.
The name and location of this script must be
/opt/repository/instconfig/custom/MyOS/boot_stanza
Where MyOS is the value you specified in the Name field when you registered your custom OS.
Make sure that the root user has execute permission for the boot_stanza script.
Additional considerations for virtual media
Copying additional files into the virtual media ISO
Insight Control for Linux automatically copies the kernel and RAM disk you specified when you
registered your custom OS to the ISO it creates. However, some operating systems, (for example,
ESXi) require multiple files to boot, not just a kernel and a RAM disk. You can use the optional
extra_files script to inform Insight Control for Linux of additional files that must be copied to the
ISO, especially those files needed for booting using virtual media.
The extra_files script echoes a comma-separated list of files to StdOut; for example:
echo "${boot_dir}/file1,${boot_dir}/file2,${boot_dir}/file3"