HP Insight Control server provisioning Capturing and Installing Linux System Images
3
Summary
The Insight Control (IC) server provisioning appliance comes pre-packaged with OS Build Plans (OSBPs) that perform
scripted installations of Red Hat Linux and SUSE Linux. Currently, it does not have OSBPs that allow the capture of Linux
system images and the deployment of those images back to target servers. This technical paper will provide
instructions to create OSBPs to capture and deploy Linux images.
This document assumes that the reader is familiar with the IC server provisioning appliance and has the appropriate
administrative rights to the appliance. Also, that the reader is proficient with Linux and can work with Linux scripts and
has expert knowledge on Linux Administration.
Preparing for Image Capture
In order to facilitate image capture and deployments, there are a few steps customers should do before initiating an
image capture. None of these actions are strictly required, but if they are not handled before the image capture, they
will need to be handled during deployment.
Sanitizing Server Image
There are several files in a server that contain hard coded hardware references that can be removed to make deploying
an image simpler. Example files are /etc/fstab and /boot/grub/menu.lst. There might be references to UUID
labels for disk partitions, or the disk might be specified using a /dev/disk/by-id/* device. These values are specific to
each disk, and should be replaced with a more generic value. For example, if a mount point is specified in /etc/fstab
as UUID=xxxyyy where xxxyyy is a string value, it could be replaced with the actual disk partition, for example;
/dev/sda1. You can determine which partition needs to replace the UUID=xxxyyy, by using the blkid utility. Simply
entering the command at the shell prompt, will give you a list of the partitions, and their labels and UUID values. If the
device is specified by /dev/disk/by-id/*, you can look in the /dev/disk/by-id directory. Simply do an “ls –l” and look at
the physical device to which the link points.
Copying Scripts from This Document
WARNING: If the scripts are copied from this document using cut and paste some detrimental artifacts have been
noticed. Extra spaces and lines appear to be added to the text when it is pasted into the script content window. The
script will need to be hand edited to remove these artifacts. The spaces after UNIX line continuation characters ‘\’ and
after copy block markers (EOF) will cause the script to fail. Additional lines between the ‘\’ character and the actual code
will also cause failures. It is recommended that the line continuations be removed and the code placed all on one line.
Creating the Capture Red Hat Linux Image OS Build Plan
The basic steps to perform an image capture are listed below with details in subsequent sections:
1. Boot into the LinuxPE service OS.
2. Mount the media source where the image will be saved.
3. Mount the target server’s image for capture.
4. Capture the image using the tar utility.
5. Reboot the server back into production.
NOTE: The following scripts are based on a typical installation of RH6.3 using autopart. Because autopart is used, it is
possible that a third logical volume (lv_home) may be created. If it is, then additional code will need to be added to
ensure that it is mounted before capturing the OS image, and that it is correctly re-created during deployment.