HP Insight Control server provisioning Capturing and Installing Linux System Images

14
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 for simple partitioning of SLES 11 SP3 would contain:
#!/bin/bash
## Assumes first disk /dev/sda to be used. Change if needed
disk="/dev/sda"
# Partition disk
echo "Partitioning disk..."
sfdisk $disk -uM << EOF
0,900,L,
,2000,82
,,L,*
EOF
while [ ! -e ${disk}3 ]; do sleep 1; done
# Create filesystems and logical volumes
echo "Create filesystems..."
mkfs.ext3 -j -L root ${disk}3
sync
3. Click OK to save the script.
NOTE: Once again, the above script uses the first available device in the target (/dev/sda). If another device needs to be
used, then the script needs to be modified to specify that.
Mount the Filesystem Script
Create a new script that mounts the filesystem so the image can be written to it. If the image’s partition structure hasn’t
changed from the capture, the capture OS Build Plan’s Mount Server Image script can be used.
To create a new script to mount the filesystem:
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
#Now mount new setup.
mkdir -p /mnt/target
mount /dev/sda3 /mnt/target
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.