How to Clone a mksysb Image Using NIM AIX 4.1


About this document
    Related documentation
Create a mksysb
Create a customized script
Setting up NIM
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 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.

Related documentation

  • InfoExplorer
  • Network Installation Management Guide and Reference

    Create a mksysb

    1. Create an NFS-mounted file system for the mksysb image. 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. Once the file system is created, you need NFS to export it. Enter:
          /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, enter the following if the directory does not already exist:
          mkdir /mksysb 

      Enter the following if the directory does exist:

          /usr/sbin/mount <NIMserver>:/mksysb /mksysb 
          mksysb -i /mksysb/clone.image 
    3. If there is already a mksysb on tape, copy the rootvg image to the NIM server file system. Enter:
          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

    The customized script is the source that will be doing all the work. To create the script, enter:

        cd /mksysb 

    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 

    Setting up NIM

    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.

    1. Create a SPOT.

      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:

          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] 
    2. Create an lpp_source resource.

      Create an lpp_source with a CD-ROM. This saves space. See "Managing lpp_source Resources" in InfoExplorer. Enter:

          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] 
    3. Define the target machine.

      Define the stand-alone client (target) machine. See "Adding a Running Client to the NIM Environment" in InfoExplorer. Enter:

          smitty nim_mac 
          Define a Machine Object 
    4. Create a cloner_script resource. Enter:
          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] 
    5. Create the resource This step is optional.

      A customized file is usually created to enable "no-prompt" installs. See "Customizing the BOS Install Program" in InfoExplorer. Enter:

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

      Using a favorite editor, open the file /mksysb/

      1. The following options should be set or blank.
            INSTALL_METHOD = overwrite 
      2. The stanza should be "zeroed" out. For example:
              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/] 
    6. Create the mksysb resource.
          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] 
    7. Allocate to the client.

      Allocate the 414cd, 414spot, cloner_script, clone_bosinst_data (optional), and clone_mksysb. Enter:

          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> 
    8. Initiate the install on the client.

      See "Initiating BOS Installation of Stand-alone Client" in InfoExplorer.

      1. If the target machine is already a NIM client and running, initiate a "push" install by entering:
            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), initiate a "force push" install by entering:
            nim -o bos_inst -a source=mksysb -a force_push=yes 
      3. If the target is not running, initiate a "pull" install by entering:
            nim -o bos_inst -a source=mksysb -a no_client_boot=yes 
    9. Go to the client machine and initiate a network boot. See "Initiating a BOOTP Request" in InfoExplorer for more details.

      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

    Creating tips and hints

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

      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.

    Restoring tips and hints

    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:

    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 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 ]