2 modifying an image, 3 saving a modified cloning image – HP Insight Cluster Management Utility User Manual
Page 67
5.7.2 Modifying an image
Modifications can consist of simple manual commands such as adding, removing, or modifying
files. However, complex operations using chroot commands on the expanded image directory
are also possible, such as installing a new rpm.
IMPORTANT:
When using chroot, HP recommends performing chroot mount /proc or
chroot mount /sys
in the image directory before executing other chroot commands.
For example:
# chroot /opt/cmu/image/rh5u4_x86_64/image_mountpoint/ mount /sys
# chroot /opt/cmu/image/rh5u4_x86_64/image_mountpoint/ mount /proc
# cp /data/repositories/rh5u4_x86_64/Server/dhcp-3.0.5-21.el5.x86_64.rpm
/opt/cmu/image/rh5u4_x86_64/image_mountpoint/tmp
# chroot /opt/cmu/image/rh5u4_x86_64/image_mountpoint rpm -ivh /tmp/dhcp-3.0.5-21.el5.x86_64.rpm
warning: /tmp/dhcp-3.0.5-21.el5.x86_64.rpm:
Header V3 DSA signature:
NOKEY, key ID 37017186
Preparing...
########################################### [100%]
1:dhcp
########################################### [100%]
# chroot /opt/cmu/image/rh5u4_x86_64/image_mountpoint/ umount /sys
# chroot /opt/cmu/image/rh5u4_x86_64/image_mountpoint/ umount /proc
IMPORTANT:
When using chroot, some commands can alter the management node system:
•
mount -a
—Mounts the partitions of the management node in the image. Any further
modifications to the subdirectories modifies the management node tree and not the cloning
image.
•
grub-install
—Replaces the boot loader of the management node.
5.7.3 Saving a modified cloning image
After modifications are complete, run the cmu_image_commit command to save the content of
an expanded image into an HP Insight CMU cloning image. Depending on the cloning image
size, this script can take several minutes to complete. The modified image can either replace the
image itself or be saved as new cloning image.
To update cloning image rh5u4_x86_64 with the modifications:
# /opt/cmu/bin/cmu_image_commit -i rh5u4_x86_64
The original archive files are renamed in the image directory and the new image content is
compacted into one archive file per partition. The new image content replaces each original archive
file.
To save the modifications to cloning image rh5u4_x86_64 to a new cloning image rh5u4_mod:
# /opt/cmu/bin/cmu_image_commit -i rh5u4_x86_64 -n rh5u4_mod
NOTE:
The -n option registers a new logical group to the HP Insight CMU database. No nodes
are added into this new group.
5.7 HP Insight CMU image editor
67