HP Insight Control server provisioning Capturing and Installing Linux System Images

8
2. Create the script content or copy and paste the script content from an external application. For example, the
script would contain:
#!/bin/bash
#Now mount new setup.
mkdir -p /mnt/target
mount /dev/mapper/VolGroup-lv_root /mnt/target
#mkdir p /mnt/target/home
#mount /dev/mapper/VolGroup-lv_home /mnt/target/home
mkdir -p /mnt/target/boot
mount /dev/sda1 /mnt/target/boot
3. Click OK to save the script.
Deploy Linux Image Script
Create a new script that deploys the previously captured Linux image.
To create a new script to deploy a Linux image:
1. On the IC server provisioning appliance, create a new script of Unix type and name it for the appropriate
function.
2. Create the script content or copy and paste the script content from an external application. For example, the
script would contain:
#!/bin/bash
tar jxf /mnt/images/$1.tar.bz2 -C /mnt/target
where the image name will be passed in as a parameter to the script step and the Media Server is mounted on
/mnt/images.
3. Click OK to save the script.
Fixup Linux Deployment Script
Create a new script that adjusts for any new hardware or partition changes after the image has been deployed to the
target server. The sample script provided takes care of writing a new MBR on the disk and fixing the network adapters.
To create a new script to adjust for new hardware and partitioning:
1. On the IC server provisioning appliance, create a new script of Unix type and name it for the appropriate
function.
2. Create the script content or copy and paste the script content from an external application. For example, the
script would contain:
#!/bin/bash
#Mount devfs
mount -t devtmpfs dev /mnt/target/dev
# write new MBR
chroot /mnt/target /sbin/grub << EOF
root (hd0,0)
setup (hd0)
quit
EOF
# clean up installation.
# Message /etc/fstab mount points if needed
# Change network configuration/setup - Remove physical anchor
# settings.