How to Clone a mksysb Image Using NIM at AIX 4.2 and 4.3


About this document
    Related documentation
Creating a mksysb
Setting up NIM
Tips on creating and restoring a mksysb image at AIX 4.2 and 4.3
    Creating tips and hints
    Restoring tips and hints

About this document

This document describes how to clone a mksysb image from one system to another using Network Install Management (NIM). It provides supplemental information, including available options and tips to consider. Information in this document is valid for AIX Versions 4.2 and 4.3.

This fax provides supplemental information, including available options and tips to consider.

WARNING: This procedure is valid only with a mksysb image and will not work with a Sysback 6000 system backup.

Related documentation

For complete documentation on NIM, at AIX 4.2, see InfoExplorer or order the Network Install Management Guide and Reference, #SC23-2671-01.

The AIX Version 4.3 and product documentation library is also available:

Creating a mksysb

  1. AIX 4.2 and 4.3 give the option to create the mksysb when the mksysb resource is defined. It will handle the exporting of the directory and the NFS mounting on the client. The only requirement is that the machine is a NIM client and the master can rsh to the client to run commands. If mksysb is created using NIM, skip to the "Setting up NIM" section of this document. To create the mksysb, continue with the steps below.

    On the NIM server, create a file system (for example /mksysb) to hold the mksysb. To get a rough estimate of the maximum space required, run lsvg rootvg and look at the USED PPs: column. After the file system has been created, execute the following command to NFS export it:

        /usr/sbin/mknfsexp -d /mksysb -t rw -r \
              [ hosts allowed root access ] -B
  2. On the client machine, which is where the mksysb will be run, execute the following:
        /usr/sbin/mount <NIMserver>:/mksysb /mksysb
        mksysb -i /mksysb/clone.image
  3. If a mksysb is already on tape, the rootvg image can be copied to the NIMserver file system.
        tctl -f /dev/rmt0 rewind
        tctl -f /dev/rmt0.1 fsf 3
        dd if=/dev/rmt0.1 of=/mksysb/clone.image bs=<tpebs>
    (tpebs = block size of the 4th image.)

Setting up NIM

Create the NIM environment by choosing and defining a master. Refer to Chapter 3 of the Network Install Management Guide and Reference, "Setting up Master / Network Objects", for further information on this topic.

Each environment will be different, depending on the machine resources. The choice of which machine is the master and which machine is the server must be made based on each individual environment.

In the following procedure, the master is the server for all resources. The CD-ROM is the lpp_source. This will save space but it will also keep the CD-ROM busy until all of the client machines have been installed. The user may not want this condition to occur if InfoExplorer from the CD-ROM is being used (at AIX 4.2).

  1. Create a Shared Product Object Tree (SPOT).

    SPOT must be created from the CD-ROM (see the product documentation or, at AIX 4.2, see "Managing SPOT Resources" in InfoExplorer).

    A separate 200MB file system should be created and called /4spot for a non-/usr SPOT. If the user selects yes to the prompt Expand file systems if space needed?, the initial size of the file system does not matter. The volume group nimvg is being used to create the file system. nimvg should be replaced with the volume group where the user wants the file system to reside.

        mklv -y spotlv nimvg 50
        crfs -v jfs -d spotlv -m /420spot
        mount /420spot
        smitty nim_mkres
         spot         = Shared Product Object Tree
         * Resource Object Name           [420spot]
         * Resource Type                   spot
         * Server of Resource             [master]
         * Source of Install Images       [/dev/cd0]
         * Location of Resource           [/420spot]
  2. Create an lpp_source resource.

    Next, create an lpp_source with your CD-ROM to save space (see the product documentation or, at AIX 4.2, see "Managing lpp_source Resources" in InfoExplorer).

        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       [420cd]
         * Resource Type              lpp_source
         * Server of Resource         [master]
         * Location of Resource       [/CD/usr/sys/inst.images]
  3. Define the target machine.

    The standalone client needs to be defined as the target machine (see the product documentation or, at AIX 4.2, see "Adding a Running Client to the NIM Environment" in InfoExplorer).

        smitty nim_mac
        "Define a Machine Object"
  4. Create the resource (optional).

    Creating a customized file is usually used to enable "no-prompt" installs (see the product documentation or, at AIX 4.2, see "Customizing the BOS Install Program" in InfoExplorer).

        cp /usr/lpp/bosinst/bosinst.template /mksysb/

    Using a favorite editor, open the following file:

    1. The following options should be set with a valid option like those following or set to a blank value:
          INSTALL_METHOD = overwrite
    2. Unset the fields in the target_disk_data stanzas to prevent an install on the wrong disks.
              LOCATION =
              SIZE_MB =
              HDISKNAME =
    3. Access the fastpath 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/]
  5. Create the mksysb resource.
        smitty nim_mkres
           mksysb          = an AIX mksysb image
             * Resource Name              [clone_mksys]
             * Resource Type               mksysb
             * Server of Resource         [master]
             * Location of Resource       [/mksysb/clone.image]

    Fill in the appropriate fields below if it is decided to have NIM create the mksysb from a client.

    System Backup Image Creation Options:

        CREATE system backup image?                   no
        NIM CLIENT to back                            []
        PREVIEW only?                                 no
        IGNORE space requirements?                    no
        EXPAND /tmp if needed?                        no
        Create MAP files?                             no
        Number of BLOCKS to write in a single output  []
         (leave blank to use system default)
        Use local EXCLUDE file?                       no
         (specify no to include all files in backup)
        EXCLUDE_FILES resource                        []
         (leave blank to include all files in backup)
  6. Allocate to the client.

    Allocate the 420cd, 420spot, clone_mksysb, and clone_bosinst_data (optional).

        nim -o allocate -a mksysb=clone_mksysb \
        -a bosinst_data=clone_bosinst_data \
        -a script=cloner_script \
        -a spot=420spot -a lpp_source=420cd <client>
  7. Initiate the install on the client.

    See "Initiating BOS Installation of Standalone Client" in the product documentation or, at AIX 4.2, in InfoExplorer.

    1. If the target machine is already a NIM client and running, then initiate a push install.
          nim -o bos_inst -a source=mksysb <clientname>
    2. If the target is not a NIM client but is running (for example, it is installed at AIX 3.2), then initiate a force push install.
          nim -o bos_inst -a source=mksysb -a force_push=yes
    3. If the target is not running, then initiate a pull install.
          nim -o bos_inst -a source=mksysb -a no_client_boot=yes
  8. Now go to the client machine and initiate a network boot. For more details, see "Initiating a BOOTP Request" in the product documentation or, at AIX 4.2, in InfoExplorer.

    WARNING: You must be at the NIM client for this case.

    When cloning to a platform with a different kernel type, 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. You will see no additional output until the copyright screen appears just before the system reboots. This problem has been corrected at AIX

Tips on creating and restoring a mksysb image at AIX 4.2 and 4.3

Creating tips and hints

  1. For the following platform types, use the corresponding flags with the bootinfo command:

    1. Processor type
          bootinfo -z
      Running this command returns one of the following: 0 = up (single processor) or 1 = mp (multiprocessor).

    2. Platform type
          bootinfo -T
      Running this command returns one of the following: rs6k, rspc, chrp, or PAL.

    3. Boot platform type
          bootinfo -p
      Running this command will return one of the following: rs6k, rs6ksmp, or rspc.

      WARNING: The type rs6ksmp is not valid at AIX 4.2 and 4.3 even though this command reports it. The rspc type will be reported for all non-rs6k types.

  2. When cloning at AIX 4.2 and 4.3 it is no longer required to use the cloner script resource. If the user wishes to use an or that is different than those on the mksysb image, these resources will still need to be created. In the U.S., call 1-800-CALL-AIX for assistance.

  3. The following new fields have been added to the file.
        RECOVER_DEVICES = yes, no           (default - yes)
        BOSINST_DEBUG = no, yes             (default - no)
        SWITCH_TO_PRODUCT_TAPE = no, yes    (default - no)

    The RECOVER_DEVICES option allows the user to choose to recover the customized Object Data Manager (ODM) attributes (for example, network addressing, static routes, tty settings, and multi-port adapter cards).

        YES - You wish to recover the source ODM.  The file
              /etc/firstboot will be created and run on reboot.
        NO  - You do NOT wish to restore any attributes.

    WARNING: Do not attempt to install customized attributes when the devices are not in exactly the same location. This is only to be used when restoring a mksysb back to source system.

    The BOSINST_DEBUG option allows the user to see the bos install debug information, even though the user does not wish to set up the NIM DEBUG (for example, because there is not a tty with which to boot). To see debug output, either set the variable to yes or enter 911 on the initial Installation and Maintenance.

    The SWITCH_TO_PRODUCT_TAPE option allows the user to use a product tape instead of the CD-ROM.

        Yes - Boot from tape product media.
        No  - Do not.

    NOTE: In AIX 4.2 and 4.3 the user must continue to boot from product media but now there is a choice of using a CD-ROM or tape on an rs6k or rs6ksmp system. For rspc or chrp system types, you must boot from a CD-ROM because no rspc or chrp product tapes are being shipped.

Restoring tips and hints

  1. OpenGL or PEX_PHIGS

    NOTE: The following tip applies to AIX version 4.2. In AIX version 4.3, the OpenGL and PEX_PHIGS device filesets are included on the AIX 4.3 install media.

    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. If the user clones onto a system with a different graphics adapter, the following will need to be done on the target system:

    1. Create a bundle by executing the following:
          echo > \
          echo >> \
    2. Install the bundle by executing the following:
          smitty install_bundle

    If any filesets are installed, the user will need to reboot the system before using OpenGL and PEX_PHIGS. Otherwise, performance problems may be experienced.

    NOTE: If the user has the OpenGL and PEX_PHIGS filesets in the lpp_source, then a separate bundle may be created and allocated with the mksysb.

  2. bosboot fail errors

    When booting from 4.2.0 CD-ROM installation media and attempting to restore a mksysb which is at 4.2.1, the following errors may occur:

        0653-341  The file /dev/ipldevice does not exist
        0301-150  bosboot: Invalid or no boot device specified.
        1) to continue
        2) maintenance


    1. Select option 2, maintenance.

    2. When booting from CD-ROM, execute the following:
          export LIBPATH
          lslv -l hd5    ( --> hdisk# )
          ln -f /dev/r<hdisk#> /dev/ipldevice
          bosboot -ad /dev/ipldevice

    FIX: Corrected with AIX 4.2.1 CD-ROM media.

[ Doc Ref: 90605198614838     Publish Date: Dec. 07, 2000     4FAX Ref: 8179 ]