Systen startup and Recovery


Systen startup and Recovery


Boot process start from Processor Depandant code.
Initial system loader is used to load the kernel in to the memoty.

Boot Process
**********

1 Boot ROM Startup
2 HP-UX startup


      
            Boot ROM startup
            ---------------------

 When we power on the system PDC will start and it will initialize the Processor and Ram and It will carry out the self test. Then It will initialize the terminal console to display the message and initialize all peripheral devices.Then it wll search for primary boot path .
And it will load and execute the Initial system loader ISL


ISL load the secondary system loader hpux  which will be in the bootable area of hdd.

Hpux will load the kernel         /stand/vmunix   and hand over the controle to the kernel.

HP-UX startup
--------------------
First kernel will start the swapper process and then init process.
Init process will read the /etc/inittab and bringup the system to usable state.


Stable Storage
1 Primary boot path
2 Alternate boot path
3 console
4 autoboot
5 Autosearch


Booting in single user mode

 1    boot pri –is      in PDC of V class server
 2    boot          in PDC
       Interact with boot       Y
       ISL > hpux –is


Boot area of a disk hs
1                    LIF header
2                    A file containing HP-UX volume name
3                    ISl
4                    Hpux
5                    Auto


LIF commands

# lifls  -l /dev/dsk/c0t6d0
     will show the contents of  LIF
   LIF contain        HPUX, ISL, AUTO, LABEL
mkboot  and rmboot will modify this files.



# setboot
   will show     1   prim boot path
2          alt boot path
3          auto boot     en or dis
4          auto search    en or dis in a working system


hpux commands


# hpux       will take the details from AUTO file and load the kernel
# hpux –is      will boot in single user mode
# hpux  /stand/vmunix.old   will boot with old kernel
# hpux –is /stand/vmunix.old    will bootwith old kernel in single user mode
# hpux –ll /stand     will display the content of /stand
# hpux show autofile    will show the contents of AUTO file
# hpux set autofile <file name>   wil set the auto file details with new file

   # hpux –v    will display the version of hpux utility


  hpux will load the kernel in to memory and handover the process to memory. Then the device drivers will initiate and the swapper process will start.
 Then it will bring a shell which will initiate to execute commands from  /sbin/pre_init_rc.
Then the init process will start by /sbin/init.

Most imp command on /sbin/pre_init_rc  is fsck.


INIT Process
==========

  Process ID   1
Swap process id   0

Configuration file of init     /etc/inittab


Main actions of init process

1          read default init from          /etc/inittab
2          initialising kernel data structure by using   /sbin/ioinitrc
3          running  /sbin/bcheckrc    for checking   volume group changes
4          run /sbin/rc  to bring the system in default run level


/etc/inittab file

 Initializing iodevices with ioinit process
    Initdefault will get from /etc/inittab then it will excecute the commands or scripts which contain sysinit and excecute /sbin/ioinitrc by using the file /etc/ioconfig and check the consistency b/w  /etc/ioconfig and the kernel data structure and will detect all the new devices then run insf to get the device file.

/sbin/bcheckrc script

  activating volume group and running fsck
doing keymap of kbd
check for EISA backplane and if it is there it will configure that by using /etc/eisa_config

/etc/rc   script

      it will use when a run level changing. It may from low runlevel to higher or higher to lower.

Entries in /etc/inittab file

ID                    Unique Id of each entry .it will be 1-4 long charactors
Rstat                That is the run level status. If no entry for rstat the process will run in all run                                 level
Action              sysinit      keyword refers process will start nefor init process
Boot         keyword refers process will start at boot and will not waite for its
                  Termination
                        Bootwaite  keyword for start the process at boot and waite for termination
                        Respawn    keyward for  restart the process if it terminated by any reason
                           Wait           keywaord for start the process and waite for its termination
Process                        a processd running by a command.

RUN Levels

0-6 ,s and S

            s           single usermode  only keyword with sysinit in /etc/inittab will excecute. The
                        physically attached terminal will act as console
            S          single usermode. The terminal loged in will act as console
            1          single usermode , filesystem will mount using for administrative task
            2          multy user mode with much services
            3          all network service will start , CDE also will start
            4          GUI will start
            5          all user level access
            6          restart
Determining run level

 # who –r


Adding a program to run at boot time

1        create a script file in /sbin/init.d
2        keep its corruspondinf excecution file in /etc/rc.config.d  to give variables and parameters.
3        Keep a link of thils files in /sbin/rcn.d   to decide the RUN Level
4         


           
Shuttingdown a system

# shutdown –h –y 0

            -h         halt the system after shutdown
            -r          reboot the system after shutdown’
            -y         avoid interactive response

logfile is  /etc/shutdown.log

shutdown.allow file
  
         /etc/shutdown.allow
          systemname  user1
          systemname   user2
          *                     user3  ( user3 from any system).



Checking harddisk

dd if=/dev/rdsk/c0t0d0 of=/dev/null  bs=512