Showing posts with label HP Unix Booting Process. Show all posts
Showing posts with label HP Unix Booting Process. Show all posts

Saturday, April 4, 2020

HP Unix Booting Process


HP-UX boot guide

 Normal Boot

The bootstrap process involves the execution of three software components:
  • pdc (Processor-dependent code)
  • isl (Initial System loader)
  • hpux (Secondary Boot loader)
  • vmunix

Processor-dependent code

Automatic boot processes on various HP-UX systems follow similar general sequences. When power is applied to the HP-UX system processor, or the system Reset button is pressed, the firmware processor-dependent code (pdc) is executed to verify hardware and general system integrity. After checking the hardware, pdc gives the user the option to override the autoboot sequence by pressing the Esc key. A message resembling the following usually appears on the console.

     (c) Copyright. Hewlett-Packard Company. 1994.
     All rights reserved.
     PDC ROM rev. 130.0
     32 MB of memory configured and tested.
     Selecting a system to boot.
     To stop selection process, press and hold the ESCAPE key...
 
If no keyboard activity is detected, pdc commences the autoboot sequence by loading isl and transferring control to it.

Initial system loader

The initial system loader (isl) implements the operating-system-independent portion of the bootstrap process. It is loaded and executed after self-test and initialization have completed successfully. Typically, when control is transferred to isl, an autoboot sequence takes place. An autoboot sequence allows a complete bootstrap operation to occur with no intervention from an operator. While an autoboot sequence occurs, isl finds and executes the autoexecute file which requests that hpux be run with appropriate arguments. Messages similar to the following are displayed by isl on the console:
     Booting from: scsi.6  HP 2213A
     Hard booted.
     ISL Revision A.00.09  March 27, 1990
     ISL booting  hpux boot disk(;0)/stand/vmunix
 
 

hpux (Seconday boot loader)

hpux, the secondary system loader, then announces the operation it is performing, in this case the boot operation, the device file from which the load image comes, and the TEXT size, DATA size, BSS size, and start address of the load image, as shown below, before control is passed to the image.
    Booting disk(scsi.6;0)/stand/vmunix
    966616+397312+409688 start 0x6c50
 
Finally, the loaded image displays numerous configuration and status messages, and passes control to the init process.

vmunix
After kernel vmunix gets loaded-


  • Swapper daemon starts with PID 0
  • Kernel runs /sbin/pre_init_rc
  • Kernel calls /sbin/init
  • /sbin/init reads /etc/inittab and calls –
  1. /sbin/ioinit – to scan hardware and build kernel io tree
  2. /sbin/bcheckrc – to check FS listed in /etc/fstab
  3. /sbin/rc – to start additional services like lp, cron, cde
  4. /usr/sbin/getty – to start n show login prompt to the user.
Please note that this is not the exact hpux boot process. There are alterations depends on the system being referred to is PA-RISC or Itanium.

Single-user Boot

A single-user boot in HP-UX is sometimes referred to as an interactive boot or attended mode boot. Pressing the Escape key at the boot banner on an older Series 700 workstation halts the automatic boot sequence, puts you into attended mode, and displays the Boot Console User Interface main menu, a sample of which is below.
   Selecting a system to boot.
   To stop selection process, press and hold the ESCAPE key.
   Selection process stopped.
   Searching for Potential Boot Devices.
   To terminate search, press and hold the ESCAPE key.
   Device Selection    Device Path             Device Type
   -------------------------------------------------------------
   P0                  scsi.6.0                QUANTUM PD210S
   P1                  scsi.1.0                HP      2213A
   P2                  lan.ffffff-ffffff.f.f   hpfoobar
 
   b) Boot from specified device
   s) Search for bootable devices
   a) Enter Boot Administration mode
   x) Exit and continue boot sequence
 
      Select from menu:
 
In this case the system automatically searches the SCSI, LAN, and EISA interfaces for all potential boot devices-devices for which boot I/O code (IODC) exists. The key to booting to single-user mode is first to boot to ISL using the b) option. The ISL is the program that actually controls the loading of the operating system. To do this using the above as an example, you would type the following at the Select from menu: prompt:
Select from menu: b p0 isl
 
This tells the system to boot to the ISL using the SCSI drive at address 6 (since the device path of P0 is scsi.6.0). After displaying a few messages, the system then produces the ISL> prompt.
Pressing the Escape key at the boot banner on newer Series 700 machines produces the Boot Administration Utility, as shown below.
   Command                            Description
   -------                            -----------
   Auto [boot|search] [on|off]        Display or set auto flag
   Boot [pri|alt|scsi.addr][isl]      Boot from primary, alt or SCSI
   Boot lan[.lan_addr][install][isl]  Boot from LAN
   Chassis [on|off]                   Enable chassis code
   Diagnostic [on|off]                Enable/disable diag boot mode
   Fastboot [on|off]                  Display or set fast boot flag
   Help                               Display the command menu
   Information                        Display system information
   LanAddress                         Display LAN station addresses
   Monitor [type]                     Select monitor type
   Path [pri|alt] [lan.id|SCSI.addr]  Change boot path
   Pim [hpmc|toc|lpmc]                Display PIM info
   Search [ipl] [scsi|lan [install]]  Display potential boot devices
   Secure [on|off]                    Display or set security mode
   -----------------------------------------------------------------
   BOOT_ADMIN>
 
 
To display bootable devices with this menu you have to execute the Search command at the BOOT_ADMIN> prompt:
BOOT_ADMIN> search
Searching for potential boot device.
This may take several minutes.
 
To discontinue, press ESCAPE.
 
   Device Path      Device Type
   --------------   ---------------
   scsi.6.0         HP C2247
   scsi.3.0         HP HP35450A
   scsi.2.0         Toshiba CD-ROM
 
BOOT_ADMIN>
 
To boot to ISL from the disk at device path scsi.6.0 type the following:
BOOT_ADMIN>boot scsi.6.0 isl
 
Once you get the ISL prompt you can run the hpux utility to boot the kernel to single-user mode:
ISL>hpux -is
 
This essentially tells hpux to load the kernel (/stand/vmunix) into single-user mode (-is) off the SCSI disk drive containing the kernel. The -is option says to pass the string s to the init process (i), and the command init s puts the system in single-user mode. In fact, you will see something similar to the following after typing the above command:
Boot
: disk(scsi.6;0)/stand/vmunix
966616+397312+409688 start 0x6c50
 
   Kernel Startup Messages Omitted
INIT: Overriding default level with level 's'
INIT: SINGLE USER MODE
WARNING:  YOU ARE SUPERUSER!!
#

 Startup

Beginning with HP­UX 10 /etc/inittab calls /sbin/rc, which in turn calls execution scripts to start subsystems. This approach follows the OSF/1 industry standard and has been adopted by Sun, SGI, and other vendors. There are four components to this method of startup and shutdown: /sbin/rc, execution scripts, configuration variable scripts, and link files.

/sbin/rc

This script invokes execution scripts based on run levels. It is also known as the startup and shutdown sequencer script.

Execution scripts

These scripts start up and shut down various subsystems and are found in the /sbin/init.d directory. /sbin/rc invokes each execution script with one of four arguments, indicating the "mode":
start
Bring the subsystem up
start_msg
Report what the start action will do
stop
Bring the subsystem down
stop_msg
Report what the stop action will do
These scripts are designed never to be modified. Instead, they are customized by sourcing in configuration files found in the /etc/rc.config.d directory. These configuration files contain variables that you can set. For example, in the configuration file /etc/rc.config.d/netconf you can specify routing tables by setting variables like these:
ROUTE_DESTINATION[0]="default"
ROUTE_GATEWAY[0]="gateway_address"
ROUTE_COUNT[0]="1"
 
The execution script /sbin/init.d/net sources these and other network-related variables when it runs upon system startup. More on configuration files is described below.
Upon startup a checklist similar to the one below will appear based upon the exit value of each of the execution scripts.
HP-UX Startup in progress
-----------------------------------
Mount file systems.............................. [ OK ]
Setting hostname................................ [ OK ]
Set privilege group............................. [ OK ]
Display date................................... [FAIL]*
Enable auxiliary swap space.................... [ N/A ]
Start syncer daemon............................. [ OK ]
Configure LAN interfaces........................ [ OK ]
Start Software Distributor agent daemo.......... [ OK ]
 
The execution scripts have the following exit values:
0
Script exited without error. This causes the status OK to appear in the checklist.
1
Script encountered errors. This causes the status FAIL to appear in the checklist.
2
Script was skipped due to overriding control variables from /etc/rc.config.d files or for other reasons, and did not actually do anything. This causes the status N/A to appear in the checklist.
3
Script executed normally and requires an immediate system reboot for the changes to take effect. (NOTE: Reserved for key system components).

Introduction to Linux Part 1

Introduction to Linux Part 1

Introduction to Linux Linux is an operating system that works just like Windows and Mac OS X. As an operating system, Linux is a very h...