dropdown menu

NIM - INSTALL

Install

Install from NIM:




NIM performs network installs by using a client/server model based on the bootp/tftp protocols for receiving a network boot image.

1. config for netboot
   Configure client to be booted from master. Then reboot client and in SMS choose network boot.

2. /etc/bootptab
   When a NIM client is configured to be booted from the NIM Master, client requests info from server about the boot image.
   The bootpd daemon will use the /etc/bootptab configuration file to pass information to the client (server, gateway IP...).

   tail /etc/bootptab
   aix21.domain.com:bf=/tftpboot/aix21.domain.com:ip=10.200.50.50:ht=ethernet:sa=50.20.100.48:gw=10.200.50.1:sm=255.255.255.0:

3. /tftpboot
   After client receives bootp reply, next step is transferring the boot image to the client. It is achieved with the help of tftp.

   root@aixnim1: /etc # ls -l /tftpboot
   lrwxrwxrwx    1 root     system           34 Dec 19 18:36 aix21.domain.com -> /tftpboot/spot_5200-08.chrp.mp.ent
   -rw-r--r--    1 root     system         1276 Dec 19 18:36 aix21.domain.com.info
   ...
   -rw-r--r--    1 root     system      9260943 Dec  8 15:31 spot_5200-08.chrp.mp.ent

   (this contains the boot image (kernel), what the client is using, until it can NFS mount the SPOT )

   Once the boot image is obtained, the client requests (using tftp) a configuration file (.info).
   This contains info about which server contains the install image and other necessary install resources.


4.-5.-6. NFS mount of resources
   After the boot image is loaded into memory at the client, the SPOT and other resources are NFS mounted in the client's RAM file system.
   SPOT consists of filesets (device drivers, BOS install programs) what is used during boot.


After install finished:
   Upon completion of install, the client sends state information to the master via 'nimclient' calls to the master's nimesis daemon.
   The NIM master then deallocates all install resources from the client.

   The deallocation process consists of:
   - Removing files from tftp directory
   - Remove file entry in /etc/bootptab
   - Unexporting nfs resources from client (remove entries from /etc/exports)
   - Updating client information in the NIM database (machine state)

-----------------------

SERVER SIDE (PUSH) INSTALL:

For new installations and mksysb restores:

1. install NIM filesets
    bos.sysmgt.nim.master
    bos.sysmgt.nim.spot 

2. configure machine as NIM master
    smitty nimconfig
    (Netw. name and Primary Netw. Install Interface should be set)

3. Define lpp_source
    smitty nim_mkres -> choose lpp_source
    (Server of Resource : master, and the others...)

4. After lpp_source, define SPOT
    smitty nim_mkres -> choose spot
    (Server of Resource: master, and the others...)

5. After the 2 basic resources defined, add the first NIM client
    smitty nim_mkmac


6. start AIX installation to the client

    IN SMITTY:
    smitty nim_task_inst -> select install
    (install method should be rte, and SPOT and LPP (what we created above))
    (if mksysb restore, then mksysb)

    Select:
    Accept new license agreements -> yes
    Initiate reboot and installation now -> no (this should be done manually, because it is the first time installation)

    IN COMMAND LINE:
    1.allocate sopt and lpp_source to the client:
    nim -o allocate -a spot=spot_5300-05 -a lpp_source=5300-05 aix21

    2.initiate the install (it will set the bootlist to network boot on the client and then reboot the client)
    nim -o bos_inst -a source=rte -a installp_flags=agX -a accept_licenses=yes aix21
    (a:apply, g:install prereqs, X:expand filesystems)
   
7. Additional checks before installation
    - verify that the correct entry has been added in the /etc/bootptab file:
        tail /etc/bootptab -> itt will show a line with the name of the host and other settings

    - verify that boot files have been created in the /tftpboot directory
        a symbolic link with the hostname (this is a link to the boot image (kernel))
        a <client name>.info file, which is used to set variables during installation

    - lsnim -l <hostname> -> Cstate will be changed from "ready" to "enabled"

    - showmount -e -> it should show what is exported to the system
        (it is a <hostname>.script file, where you can see some details: ip...)

8. Start client installation
    power on the client -> go into SMS menu

    - 2. Setup Remote IPL -> select the desired adapter
    - 1. IP parameters -> then if needed Client/Server/Gateway IP Address and Subnet Mask can be set
    **VERY IMPORTANT**
    If master and client are on the SAME subnet, and ping does not work with given gateway, then set Gateway IP to NIM master’s ip address!!
    There were a few firmware levels that made you use 0.0.0.0 if the master and client were on the same network.
    - then go back (ESC) to do a Ping Test (1. Execute Ping Test)
    - then go back to the main menu (M) -> 5. Select Boot Options -> 1. Select Install/Boot device -> 6. Network
    - select the needed adapter -> 2. Normal Mode Boot -> 1. Yes

    (later need to be chosen: language, disk to be installed on (mksysb: 2 disks are needed, lpp_source: 1 disk is needed only))

9. Redo checks - and during install:
    -/etc/bootptab -> no longer contains a specific line
    -/tftpboot -> no longer contains the link

    -lsnim -l <hostname> -> Cstate must be set back to "ready for nim op."
    -nim -o showlog -a log_type=boot aix21


If install unsuccessful:
    nim -Fo reset aix21
    nim -Fo deallocate -a subclass=all aix21

-----------------------

AT CLIENT SIDE (PULL):

BOS installation from the client:

1. lpp_source and SPOT allocated first to the client
    nimclient -o allocate -a lpp_source=LPP_53_ML4 -a spot=SPOT_53_ML4

2. starting BOS installation

    nimclient -o bos_inst -a accept_license=yes


OS Update from the client:
Performing an update_all (cust) operation from the client:
nimclient -o cust -a lpp_source=lpp5305 -a fixes=update_all

-----------------------

Debugging an installation

If there are problems during BOS install, you can use 911.
Type: 911 at this screen, and it will turn on debug mode, which will show many additional info during install.



-----------------------

NIM MASTER BACKUP AND RESTORE TO A NEW LPAR:

1) Take a backup of the NIM database (into a file in rootvg on the NIM master)
smitty nim -> perform nim admin. -> backup/restore nim database

2) make an mksysb of master, to itself.

3) restore mksysb to new LPAR:
smitty nim -> perform nim spftw. install. -> install and upd. softw. -> install base op. system -> ... -> mksysb

after you have chosen client, mksysb, spot, change this to 'no'
Remain NIM client after install? [no]

(This eliminates the removal of bos.sysmgt.nim.master, nim.spot filesets)

4) After the restore, copy to the new LPAR the various lpp_source, scripts, bosinst_data, resources you want to preserve.

- If you want to keep the IP of the old NIM server on the new LPAR:
5) change hostname and IP on the old NIM server to something different
6) set hostname and IP on the new LPAR (using the original IP of the old NIM server)
7) restore nim database: smitty nim -> perform nim admin. -> backup/restore nim databse

- If new IP will be used on the new LPAR:
5) On the new LPAR, run the nim_master_recover command to restore the NIM database
(It will likely look for the copied resources in the exact path and filenames they had on the old NIM server)
 

-----------------------

NIM mksysb restore hang: 888 102 700 0c5 (LED code on HMC)

When a NIM install has been started (smitty nim_bosinst) 3 lines are added automatically to /etc/exports on NIM server:
- location of the mksysb to use for restore
- location of spot to use for restore
- location of an automatically genarated script used during restore

HMC showed 888 102 700 0c5, I checked /etc/exports but the above mentioned 3 lines were not there, only the script line.
It turned out the parent directory of the mksysb + spot was also in /etc/exports already, which caused some issues.
(When I manually added mksysb to /etc/exports it said parent directory already exported.)

Solution (workaround):
1. exportfs -ua                              <--unexport all directories
2. I removed (temporarily) the above mentioned parent directory from /etc/exports
3. exportfs -a                               <--export all directories

After that everything was OK, bos_inst added 3 lines to /etc/exports, and HMC LED disappeared. (After mksysb restore completed, I added back the removed line to /etc/exports.)

good info also to this error:
https://www.ibm.com/developerworks/community/blogs/cgaix/entry/nim_crash_888_102_700_0c52?lang=en

-----------------------

NIM mksysb restore hang: 0611 (LED code on HMC)

If NFS reserved ports are enabled on NIM master this needs to be enabled for the NIM client as well.

on NIM server:
1. nfso -a | grep reserved                                <-- if it shows 1 enable on client (nfs_use_reserved_ports = 1)
2. nim -o change -a nfs_reserved_port=yes <NIM_CLIENT>    <-- enables reserved ports for nim client
3. lnim -l <nim client>                                   <--it will show "nfs_reserved_port = yes"

-----------------------

NIM bos_inst error: 0042-157 c_alloc_boot: unable to access the "/tftpboot/spot_61_08_02.chrp.64.ent" file

During preparation for an mksysb, received above error. After checking file location, it was missing.
Solution was to rebuild network boot image from SPOT:
# nim -Fo check spot_61_08_02                             <--with this ..chrp.64.ent file has been created in that location


(Others suggested to change netboot_kernel from 64 to mp: nim -o change -a netboot_kernel=mp <nim_client>, for me it did not help.)

-----------------------

17 comments:

Anonymous said...

Excellent

aix said...

Thx :)

Samiindin said...

super

aix said...

:)

Anonymous said...

hi,
how the entries in /etc/bootptab is created.

aix said...

This is automatically created on NIM master, when you set a client (via smit or command line) for network boot.

Unknown said...

Hi,
What is rte type of installation, while installing O.S from NIM server to client we select rte. What is it could u plz explain briefly.

Thanks

aix said...

Hi, rte stands for run-time environment. Probably it is not the best word for this, but it means in this NIM install scenario, that you will use an lpp_source (a complete OS image, with all the filesets, which are needed) for install. The other option beside rte would be mksysb, when you use a system backup not installable filesets.
I think you should not think too much about this, IBM gave this name, when you use lpp_source for install :)

Anonymous said...

A consultation guru ...

I have an AIX mksysb a "6100-06-00-0000" nimserver to restore from new, I have an AIX compulsorily DVD 1 "6100-06-00-0000" to create the spot? or I can create this spot from the same source lpar?.
I see that you should always have 2 minimum lpp_source and spot resources.

thanks for your reply, I'm in a test ervidor nothing in production

aix said...

Hi, you can try both. If you create a spot from an mksysb, that spot can be used only with that mksysb only. If you create a spot from an lpp_source that can be used by other resources as well.

Anonymous said...

It is very good to understand

Sahasra said...

where i have to specify a path for preserving a particular FS during migration.

aix said...

Can you give some details, what do you mean by that? Some description about preserved filesystems can be found here: http://aix4admins.blogspot.hu/2013/03/aix-migration-upgrade-with-nimadm-aix.html

Teste said...

Great, Tks!

Unknown said...

Hi Sir,

This is Prasath. My doubt is am i do activity using NIM5.3 over aix client 6.1. plz suggest. thanks

Anonymous said...

you May not able to do any activity if your nim master is low version then nim client

Unknown said...

could we patch out mksysb resource from 7.1TL04 to 7.1TL05 on NIM server?