This document describes how to clone a mksysb image from one system to another using Network Installation Management (NIM). This document applies to AIX Version 4.1. For complete documentation on NIM, see InfoExplorer.
WARNING: This procedure is valid only with a mksysb image and will
not work with a SYSBACK 6000 system backup.
Enter the following if the directory does exist:
The customized script is the source that will be doing all the work. To
create the script, enter:
Using a favorite editor, create a file called cloner and enter the
following text:
Save the file. Then change the permissions on the target file to 755 by
entering:
Create the NIM environment by choosing and defining a master (see Network
Installation Management Guide and Reference, Chapter 3, "Setting Up the Master
and Managing Network Objects").
Each environment will be different, depending on the machine resources.
Choosing which machine is the master and which machine is the server,
must be done based on the environment.
In the following steps, the master is the server for all resources. The
CD-ROM is the lpp_source. This choice will save space, but it will also keep
the CD-ROM busy until all of the client machines have been installed. This will
cause an inconvience if you are using InfoExplorer from the CD-ROM.
Create a SPOT from the CD-ROM. See "Managing SPOT Resources" in
InfoExplorer.
Create a separate 200MB file system called /414spot for a non-/usr SPOT.
In response to the prompt Expand file systems if space needed? , select yes ;
the initial size of the
file system does not matter. Volume group nimvg is also being used to create
the file system. nimvg should be replaced with the volume group where the
file system is to reside. Enter:
Create an lpp_source with a CD-ROM. This saves space. See "Managing
lpp_source Resources" in InfoExplorer. Enter:
Define the stand-alone client (target) machine. See "Adding a Running Client
to the NIM Environment" in InfoExplorer. Enter:
A customized bosinst.data file is usually created to enable
"no-prompt" installs. See "Customizing the BOS Install Program" in
InfoExplorer. Enter:
Using a favorite editor, open the file /mksysb/bosinst.data.
Allocate the 414cd, 414spot, cloner_script, clone_bosinst_data
(optional), and clone_mksysb. Enter:
See "Initiating BOS Installation of Stand-alone Client" in InfoExplorer.
WARNING: The user must be at the NIM client for this case.
When you are cloning to a platform with a different kernel type (for example, RS6K to
RSPC), the first bosboot attempt will FAIL and a message will print asking if
the user wishes to go into maintenance mode or continue.
Select continue and the cloner script will then run. Any
additional output will not be seen until the copyright screen appears just
before the system reboots. This problem has been corrected at AIX 4.1.5.0.
If the source system is using D5 code and you suspect that cloning might
be to a system other than the exact model, contact your AIX support center for assistance.
If the source system is using OpenGL or PEX_PHIGS, there may be some
device filesets from these LPs that need to be installed on the target system
after the cloning process. OpenGL and PEX_PHIGS have graphics-adapter-specific
filesets that are on separate media, so if you are cloning onto a system with
different graphics adapter, do the following on the target system:
smitty custom_install_bundles (AIX 4.1)
If any filesets are installed, the system will need to be rebooted before
using OpenGL and PEX_PHIGS, otherwise, performance problems may be
experienced.
NOTE: If the OpenGL and PEX_PHIGS filesets are in the lpp_source, a
separate bundle can be created and allocated with the mksysb.
[ Doc Ref: 90605199014846 Publish Date: Spt. 12, 2000 4FAX Ref: 9298 ]
Related documentation
Create a mksysb
/usr/sbin/mknfsexp -d /mksysb -t rw -r \
[hosts allowed root access ] -B
mkdir /mksysb
/usr/sbin/mount <NIMserver>:/mksysb /mksysb
mksysb -i /mksysb/clone.image
tctl -f /dev/rmt0 rewind
tctl -f /dev/rmt0.1 fsf 3
dd if=/dev/rmt0.1 of=/mksysb/clone.image bs=<tpebs>
The tpebs value is the blocksize of the fourth image.
Create a customized script
cd /mksysb
---------------------begin--------------------
#!/usr/bin/ksh
set -x
installp -C
devinstall -b -d /../SPOT/usr/sys/inst.images -f \
/../tmp/device.pkgs
case $(bootinfo -T) in
rs6k) installp -abcgXd/../SPOT/usr/sys/inst.images \
devices.base.rte;;
rspc) installp -abcgXd/../SPOT/usr/sys/inst.images \
devices.rspc.base.rte;;
esac
case $(bootinfo -z) in
0) installp -abcgXd/../SPOT/usr/sys/inst.images bos.rte.up
ln -fs /usr/lib/boot/unix_up /usr/lib/boot/unix;;
1) installp -abcgXd/../SPOT/usr/sys/inst.images bos.rte.mp
ln -fs /usr/lib/boot/unix_mp /usr/lib/boot/unix;;
esac
cfgmgr -v -i /../SPOT/usr/sys/inst.images
BLVDISK=$(lslv -l hd5 | grep hdisk | head -1 | cut -d' ' -f1)
ln -f /dev/r$BLVDISK /dev/ipldevice
bosboot -a -d /dev/ipldevice
bootlist -m normal $BLVDISK
rm -f /etc/firstboot
sync;sync;sync
exit 0
-------------------end-------------------------
chmod 755 cloner
Setting up NIM
mklv -y spotlv nimvg 50
crfs -v jfs -d spotlv -m /414spot
mount /414spot
smitty nim_mkrew
spot = Shared Product Object Tree
* Resource Object Name [414spot]
* Resource Type spot
* Server of Resource [master]
* Source of Install Images [/dev/cd0]
* Location of Resource [/414spot]
crfs -v cdrfs -d /dev/cd0 -m /CD -p ro
mount /CD
smitty nim_mkres
lpp_source = source device for optional
product images
* Resource Object Name [414cd]
* Resource Type lpp_source
* Server of Resource [master]
* Location of Resource lbrk./CD/usr/sys/inst.images]
smitty nim_mac
Define a Machine Object
smitty nim_mkres
script = an executable file which is
executed on a client
Define a Resource Object
* Resource Object Name [cloner_script]
* Resource Type script
* Server of Resource [master]
* Location of Resource [/mksysb/cloner]
cp /usr/lpp/bosinst/bosinst.template /mksysb/bosinst.data
INSTALL_METHOD = overwrite
EXISTING_SYSTEM_OVERWRITE = yes
target_disk_data:
LOCATION =
SIZE_MB =
HDISKNAME =
smitty nim_mkres
bosinst_data = config file used during base
system installation
* Resource Object Name [clone_bosinst_data]
* Resource Type bosinst_data
* Server of Resource [master]
* Location of Resource [/mksysb/bosinst.data]
smitty nim_mkres
mksysb = an AIX mksysb image
* Resource Name [clone_mksysb]
* Resource Type mksysb
* Server of Resource [master]
* Location of Resource [/mksysb/mksysb.image]
nim -o allocate -a mksysb=clone_mksysb \
-a bosinst_data=clone_bosinst_data \
-a script=cloner_script \
-a spot=414spot -a lpp_source=414cd <client>
nim -o bos_inst -a source=mksysb <clientname>
nim -o bos_inst -a source=mksysb -a force_push=yes
nim -o bos_inst -a source=mksysb -a no_client_boot=yes
Creating tips and hints
bootinfo -T rs6k, rs6ksmp, or rspc
bootinfo -z 0 = up (single processor)
1 = mp (multi processor)
Restoring tips and hints
echo OpenGL.OpenGL_X.dev >\
/usr/sys/inst.data/user_bundles/graphic_dev.bnd
echo PEX_PHIGS.dev >>\
/usr/sys/inst.data/user_bundles/graphic_dev.bnd