This document describes how to clone a mksysb tape from one system to another. Information in this document is valid for AIX Version 4.1 ONLY.
WARNING: This procedure is valid only with a mksysb and will not work with a SYSBACK 6000 system backup.
On the source system, create a mksysb tape. Execute:
mksysb -i /dev/rmt0
WARNING: If the source system is running D5 code and if a system other than the exact model is being cloned to, there is a licensing issue which will need to be addressed. Contact your AIX support center for assistance.
If the mksysb tape was created without the -i flag, the cloning and restoration process could be problematic. If possible, recreate the mksysb tape again from SMIT or from the command line with the -i flag.
To clone mksysb at AIX 4.1, create a diskette containing a script which will override the mksysb settings upon restoration. On the source system, use the following steps.
NOTE: If the source system is not immediately available (for example, if it is at a different location), it is possible to execute the following five steps on another system. However, make sure that the system is running the same EXACT AIX level as the source system.
mkdir /tmp/clone cd /tmp/clone
echo data > signature
The bosinst.data file contains information that the restore process needs about the source and target systems. This step creates a customized file that will "override" the bosinst.data file found on the mksysb tape.
Refer to the section "Customizing the BOS Install Program" in InfoExplorer for more details about creating a bosinst.data file.
There are other attributes in this file that might be further customized, such as CONSOLE and PROMPT. Enter the following:
cp /usr/lpp/bosinst/bosinst.template bosinst.data
NOTE: Make sure that the field in the control_flow stanza equals cloner. This is what will allow the use of the clone script. Also, the target_disk_data stanza should equal <blank>. Example:
CUSTOMIZATION_FILE = cloner Target_Disk_Data
Following is a sample bosinst.data file:
---------------------begin---------------------- control_flow: CONSOLE INSTALL_METHOD = overwrite PROMPT = yes EXISTING_SYSTEM_OVERWRITE = yes INSTALL_X_IF_ADAPTER = yes RUN_STARTUP = yes RM_INST_ROOTS = no ERROR_EXIT = CUSTOMIZATION_FILE = cloner TCB = no INSTALL_TYPE = BUNDLES = target_disk_data: LOCATION = SIZE_MB = HDISKNAME = locale: BOSINST_LANG = C CULTURAL_CONVENTION = C MESSAGES = en_US KEYBOARD = en_US ---------------------end--------------------
The customization script is what does all the work while cloning. It will do the following:
In this same directory, using a favorite editor, create a file called cloner and enter the following text:
---------------------begin-------------------- #!/usr/bin/ksh set -x installp -C devinstall -b -d /../SPOT/usr/sys/inst.images -f \ /../tmp/device.pkgs case $(bootinfo -p) in rs6k) installp -abcgXd/../SPOT/usr/sys/inst.images \ devices.base.rte;; chrp) installp -abcgXd/../SPOT/usr/sys/inst.images \ devices.chrp.base.rte;; rs6k) 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.mp ln -fs /usr/lib/boot/unix_mp /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-------------------------
Save the file. Then change the permissions on the target file to 755 by entering:
chmod 755 cloner
Now with all the files created, archive them to diskette. Files MUST be archived using backbyname so that the system can read the diskette. Enter:
find . -print | backup -ivqf /dev/rfd0
Use the following steps to restore the mksysb.
On the target system, boot from CD-ROM install media.
NOTE: The CD-ROM must be at the same level of the source system on which the mksysb tape was created. Make sure the diskette is inserted in the disk drive and that the tape drive is turned on but that the mksysb tape is NOT loaded at this point.
If the system is a single processor, the boot process may begin immediately. If it is a multiprocessor, first go through the hardware boot menu. For more information, consult the model's documentation or contact your AIX support center for assistance.
Welcome to Base Operating System Installation and MaintenanceSelect option 3 : start maintenance mode. On the next menu, Select option 4 : install from a system backup.
From this 3-option menu, select:
Option 2 : show or change characteristics
From the next menu, select:
Option 1 : select target disks
Make sure that the desired target disks are selected. Verify the disks by location ID and not by hdisk#.
The selected disks are indicated by >>>. If there are a lot of drives attached to the system and they do not fit on one screen, press 6 to advance the screen. Make sure to select only the drives to which the rootvg is to be restored. If a data drive is chosen by mistake, all the data on that drive will be lost. Therefore, be certain that the correct drives have been selected.
After you select the drives to which the mksysb is to be restored, choose:
option (0), "continue" option (0), "continue with the installation"
If there is a key it can now be turned to NORMAL. The machine will reboot when the installation is complete.
After the mksysb restores all the data, it will display the installp executing from the script to install any additional detected devices.
WARNING: When you are cloning to a platform with a different kernel type (for example, RS6K -> RSPC), the first bosboot attempt will FAIL and a message will print asking if you wish to go into "maintenance mode" or "continue". Select "continue" and the cloner script will then run. There will not be any additional output until the copyright screen appears just before the system reboots. This problem has been corrected at AIX 4.1.5.0.
bootinfo -T rs9k, rs6ksmp, or rspc
bootinfo -z 0 = up (single processor) 1 = mp (multi processor)
Because there are different system licensing types, the code type of the system being used must be identified as CLIENT or SERVER. This information can be found on the installation CD-ROM.
The D5 code is for CLIENT systems, and the G5 code is for SERVER systems. Client codes are specific to the system model and cannot be loaded onto other models. Server code can be loaded onto any system.
WARNING: If the source system is using D5 code and it is suspected that the 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 a different graphics adapter, do the following on the target system:
echo OpenGL.OpenGL_X.dev > \ /usr/sys/inst.data/user_bundles/graphic_dev.bn echo PEX_PHIGS.dev >> \ /usr/sys/inst.data/user_bundles/graphic_dev.bn
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 result.
A binary compatability problem has been found with the 604e updates at AIX 4.1.4. The problem occurs when upgrading the system either from up (single processor) to mp (multi-processor) or the reverse, and the attempt to clone the system. The following error message is displayed:
"can't set user credentials"
For example, when installing the 604e updates, the filesets bos.rte.up.4.1.4.6 and bos.rte.libs.4.1.4.5 (or higher) are being installed. If the clone script is run to install the bos.rte.mp filesets, bos.rte.mp.4.1.4.0 will be loaded from the CD-ROM. This level of bos.rte.mp is not compatible with bos.rte.libs, so when you boot in normal mode, the stated error occurs.
WORKAROUND: To fix this problem, boot into maintenance mode from the 4.1.4.0 media and update the bos.rte.mp fileset to at least 4.1.4.6. The libs and kernel will then be in sync and there will be no problems with booting and logging in.
This is corrected by upgrading to AIX 4.1.5.