How to Clone a mksysb Image Using NIM AIX 4.1


Contents

About This Document
Create a mksysb
Create a Customized Script
Setting Up NIM
Further Information
    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). Information in this document is valid for 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.


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:

---------------------begin-------------------- 
#!/usr/bin/ksh 
set -x 
installp -C 
RV=$(bootinfo -z) 
if [ "$RV" -eq 1 ] 
then 
    installp -abcgXd/../SPOT/usr/sys/inst.images bos.rte.mp 
    ln -fs /usr/lib/boot/unix_mp /usr/lib/boot/unix 
fi 
if [ "$RV" -eq 0 ] 
then 
    installp -abcgXd/../SPOT/usr/sys/inst.images bos.rte.up 
    ln -fs /usr/lib/boot/unix_up /usr/lib/boot/unix 
fi 
devinstall -b -d /../SPOT/usr/sys/inst.images -f /../tmp/device.pkgs 
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 

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. Select yes in response to the prompt Expand file systems if space needed?; 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 standalone 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 bosinst.data resource (optional).

    A customized bosinst.data 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/bosinst.data 
    

    Using a favorite editor, open the file /mksysb/bosinst.data.

    1. The following options should be set or blank.
          INSTALL_METHOD = overwrite 
          EXISTING_SYSTEM_OVERWRITE = yes 
      
    2. The stanza should be "zeroed" out. For example:
          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] 
      
  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 Standalone 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 4.1.5.0.


Further Information

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

  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 different graphics adapter, do the following on the target system:

    1. To create a bundle, enter:
          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 
      
    2. To install the bundle, enter:
          smitty custom_install_bundles         (AIX 4.1) 
      
    1. To create a bundle, enter:
          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 
      
    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.


How to Clone a mksysb Image Using NIM AIX 4.1: clone.nim.41.bak ITEM: FAX
Dated: 98/12/10~00:00 Category: bak
This HTML file was generated 99/06/24~12:41:56
Comments or suggestions? Contact us