Tuesday, 27 November 2012

Lesson - 1 AIX System Startup and Shutdown


                                                     AIX Startup Modes

          There are usually 4 startup modes available in AIX, they are Normal, SMS,  Maintenance and Diagnostics.

Normal
  1.  System at a working stage. 
  2.   Multi-User mode. 
  3.   All process are up and running.          
  4.   It show login screen to logon to the system.
System Management Service (SMS)
  1.   Using F1, we can go to  SMS mode (RIPL). 
  2.   Not AIX 
  3.   Runs from the firmware 
  4.   Used to select & set normal  bootlist and from where the system want to boot or bootdevice. 
  5.   Used to set Power-On password and Supervisor password
Maintenance Mode              
  1.   Maintenance mode. 
  2.   Fix machine problem that won't boot in normal mode/boot. 
  3.   Used to recover root password. 
  4.   Restoration the mksysb backup from tape should be performed in this mode. 
  5.   F5 to press the service bootlist
Diagnostics
  1.  When your system doesn’t boot and you feel there could be a device related problem, you can startup in diagnostics mode.  
  2. Diagnose and check the device for potential problems and then try for a normal startup. 

                                        System Startup Procedure                                        

There are 3 Phases involved in AIX startup procedure, they are

      i) ROS (Read Only Storage) Phase
     ii) Device Configuration Phase
    iii) Init Phase

i) ROS (Read Only Storage) Phase

    i) Hardware devices are verified and checked for possible issues — POST
    ii) Bootlist is found — System ROS detects the first boot device in the bootlist specified
    iii) Boot image is loaded into the Memory – First 512 bytes block (sector) contains the bootstrap code of the hdisk is loaded into RAM
    iv) Initialization starts – Bootstrap code locates BLV (/hd5) from the disk.

   During the above process the following activities has been performed
  •     BLV contains the kernel, boot commands, reduced ODM and rc.boot scripts. 
  •     BLV get uncompressed in RAM and release the kernel.
  •     Then AIX kernel gets control.
  •     AIX kernel creates temporary RAMFS with /, /etc , /usr /dev , /mnt etc.,
  •     Kernel starts the init process from BLV in the RAM.
  •     Init executes rc.boot script from the BLV in the RAM. There are 3 rc.boot scripts rc.boot.1 , rc.boot.2 and rc.boot.3

ii) Base Device Configuration Phase

    i) All devices are configured with “cfgmgr” command.
    ii) init process executes “rc.boot.1” from RAMFS.
   iii) “restbase” command copies reduced ODM from BLV to RAMFS
   iv) “cfgmgr” will run and configure all the devices

iii) System Init Phase

     a) LV s are varied on
              rc.boot.2 is executed
              varyon the rootvg
              run fsck on /,/usr./var and mount the same to RAMFS

     b) Paging is started
              “copycore”   command checks the occurrence of the dump and copy the same from the /var/ras/adm
              unmount the /var and activate the paging
              mount /var
              now /, /usr, /var are mounted on rootvg in disk .

     c) /etc/inittab is processed
           Kernel removes RAMFS
           init process is started from / in rootvg
           /etc/init starts /etc/inittab and runs /sbin/rc.boot3
           /etc/inittab decides the run level.
           Run the fsck on /tmp and mount the same
           syncvg for rootvg and reports the stale PP s.
           Use “savebase”  command to save the customized data to the BLV.
           Exit the rc scripts

     d) Relevant services according to the run level starts, srcmstr daemon (System Resource controller) and start the relevant subsystems



Fig: AIX Boot Process outline

 
Describe /etc/inittab file

#cat /etc/inittab
init:2:initdefault:
brc::sysinit:/sbin/rc.boot 3 >/dev/console 2>&1 # Phase 3 of system boot
powerfail::powerfail:/etc/rc.powerfail 2>&1 | alog -tboot > /dev/console # Power Failure Detection
mkatmpvc:2:once:/usr/sbin/mkatmpvc >/dev/console 2>&1
atmsvcd:2:once:/usr/sbin/atmsvcd >/dev/console 2>&1


Inittab file lists the process that init starts, and it also specifies when to start them .

There are 4 fields in the inittab file

id – 14 characters that identify the process. Terminals use their logical device name as an identifier
runlevel – Specified in which run level this particular process runs.
The valid run-levels could be 0-9
The default run-level in AIX is 2 multi-user mode.
Action - How to treat the process. Possible values are
i) sysinit – processes to run the system initialization
ii) respawn – If the process is not started already, start it
iii) off – Do not run the process
iv) once – start the process and do not restart if it stops
v) wait – start the process and wait before going to the next line.
Command - The AIX command to run to start the process.

Few Important Points on /etc/inittab
      * “telinit” command can be used to change the run-level or to force to re-read the /etc/inittab after any changes (telinit q)
      * The following are the commands used for inittab file configuration
           i) mkitab – command to create new entry
          ii) chitab – command to change the existing entry
         iii) rmitab – command to remove the existing entry
         iv) lsitab – command to list the entries in /etc/inittab


 

No comments:

Post a Comment