How to Clone an AIX 4.1 mksysb Tape


About this document
Create a mksysb
Override the mksysb settings
Restoring the mksysb
Further information
    Creating tips and hints
    Restoring tips and hints

About this document

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.

Create a mksysb

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.

Override the mksysb settings

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.

  1. Create a working directory with all the files that will be archived to the diskette.
        mkdir /tmp/clone 
        cd /tmp/clone 
  2. Create a Signature File to allow the diskette to be recognized by the system.
        echo data > signature 

Create a customized file

The file contains information that the restore process needs about the source and target systems. This step creates a customized file that will override the file found on the mksysb tape.

Refer to the section "Customizing the BOS Install Program" in InfoExplorer for more details about creating a 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 

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:


Following is a sample file:

       INSTALL_METHOD = overwrite 
       PROMPT = yes 
       INSTALL_X_IF_ADAPTER = yes 
       RUN_STARTUP = yes 
       RM_INST_ROOTS = no 
       ERROR_EXIT = 
       CUSTOMIZATION_FILE = cloner 
       TCB = no 
       INSTALL_TYPE = 
       BUNDLES = 
       LOCATION = 
       SIZE_MB = 
       HDISKNAME = 
       BOSINST_LANG = C 
       MESSAGES = en_US 
       KEYBOARD = en_US 

Create a customization script

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:

set -x
installp -C
devinstall -b -d /../SPOT/usr/sys/inst.images -f    \
case $(bootinfo -T) in
        rs6k) installp -abcgXd/../SPOT/usr/sys/inst.images \
        rspc) installp -abcgXd/../SPOT/usr/sys/inst.images \
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
           ln -fs /usr/lib/boot/unix_mp /usr/lib/boot/unix;;
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
exit 0

Save the file. Then change the permissions on the target file to 755 by entering:

    chmod 755 cloner 

Create the diskette

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 

Restoring the mksysb

Use the following steps to restore the mksysb.

  1. Boot in Service mode.

    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.

  2. Boot process:

    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.

  3. Install and Maintenance Menu:

    1. A message stating press F1 or 1 for the system console, a message asking for the desired language, and then the main menu will be displayed as follows:
            Welcome to Base Operating System 
              Installation and Maintenance
      Select option 3 : start maintenance mode. On the next menu, Select option 4 : install from a system backup.

    2. Place the mksysb tape into the tape drive. Wait for a minute or two for the tape to settle or to stop spinning. Select the tape drive. The tape drive and then the floppy will be accessed.

    3. Instructions will be displayed to return to the Main Menu. If the language option is displayed again, select and continue. This will only occur on some systems.

      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" 
  4. Post mksysb:

    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

Further information

Creating tips and hints

  1. Platform types

    1. Platform type
          bootinfo -T        rs9k, rs6ksmp, or rspc 
    2. Processor type
          bootinfo -z        0 = up (single processor) 
                             1 = mp (multi processor) 
    3. System code type

      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.

Restoring tips and hints

  1. OpenGL or PEX_PHIGS

    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:

    1. To create a bundle, enter:
          echo > \ 
          echo >> \ 
    2. To install the bundle, enter:
          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.

  2. 604e upgrade

    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. and bos.rte.libs. (or higher) are being installed. If the clone script is run to install the filesets, will be loaded from the CD-ROM. This level of 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 media and update the fileset to at least 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.

[ Doc Ref: 90605200614620     Publish Date: May. 19, 2000     4FAX Ref: 9297 ]