Monday, March 19, 2012

Difference between HP-UX EFI boot and PA-RISC boot

  Itanium-based System Hardware

  The Itanium-based system's bootstrap process involves the execution of   four software components:

           +  CMOS

           +  option ROM

           +  EFI

           +  Boot Manager

           +  hpux.efi

      After the processor is reset, firmware initializes and tests processors and platform.  During initialization, the firmware lets a user interrupt and configure CMOS and option ROMs.  It then transfers
 control to EFI, the Extensible Firmware Interface.  EFI, in turn,   initializes EFI boot and runtime services and launches the Boot Manager.  The Boot Manager, which allows loading of EFI application or       drivers from EFI defined file system, loads and transfers control to hpux.efi, the HP-UX-specific bootstrap loader.  hpux.efi then loads the HP-UX kernel object file from the HP-UX file system to memory and transfers control to the loaded kernel image.
  
  PA-RISC Hardware    

      The Series 700 and 800 bootstrap process involves the execution of
      three software components:

           +  pdc

           +  isl

           +  hpux.

After the processor is RESET, pdc, the processor-dependent code  (firmware), performs a self-test and initializes the processor.  It  then loads and transfers control to isl, the operating-systemindependent initial system loader.  isl, in turn, loads and transfers  control to the hpux utility, the HP-UX-specific bootstrap loader.   hpux then downloads the HP-UX kernel object file from an HP-UX file   system and transfers control to the loaded kernel image.

Common for both

1. The HPUX/HPUX.EFI program (also known as the secondary loader ) figures out what HP-UX kernel to load, and what arguments to pass to it (like init state).

2. The secondary loader relocates itself to the end of the initial memory module, loadsthe kernel at the beginning and starts running it. The kernel needs to fit into that area!

3. Kernel initialization (real mode):
initialize all of the memory, read /stand/ioconfig and /stand/rootconf files using the hpux loader’s system calls, initialize all modules (1st level I/O configuration), allocate equivalently-mapped data structures, PDIR and hash table, optimize assembly, craft process 0, go virtual.

4. Kernel initialization (virtual mode):
start the clock, start up the other processors, finish the I/O configuration (2nd level),initialize subsystems, intialize LVM/swap/dump, mount root file system read-only,fork() off system daemons.

5. fork() off /sbin/pre_init_rc and mount root file system read-write afterwards.

6. Start /etc/init process which, depending on the passed init state, starts working trough /etc/inittab or launches a shell in the case of a Single User or LVM Maintenance boot.
7. login console

Vpar Commands

ioscan

0/0 ba Local PCI Bus Adapter (782)
0/0/0/0 lan HP PCI 10/100Base-TX Core
0/0/1/0 ext_bus SCSI C895 Fast Wide LVD
0/0/1/0.7 target
0/0/1/0.7.0 ctl Initiator
0/0/2/0 ext_bus SCSI C875 Ultra Wide Single-Ended
0/0/2/0.6 target
0/0/2/0.6.0 disk SEAGATE ST39102LC
0/0/2/0.7 target
0/0/2/0.7.0 ctl Initiator
0/0/2/1 ext_bus SCSI C875 Ultra Wide Single-Ended
0/0/2/1.7 target
0/0/2/1.7.0 ctl Initiator
0/0/4/0 tty PCI Serial (103c1048)
0/0/5/0 tty PCI Serial (103c1048)

0/4 ba Local PCI Bus Adapter (782)
0/4/0/0 ba PCItoPCI Bridge
0/4/0/0/4/0 lan HP A5506A PCI 10/100Base-TX 4 Port
0/4/0/0/5/0 lan HP A5506A PCI 10/100Base-TX 4 Port
0/4/0/0/6/0 lan HP A5506A PCI 10/100Base-TX 4 Port
0/4/0/0/7/0 lan HP A5506A PCI 10/100Base-TX 4 Port

vparcreate

vparcreate -p vpar01  -a cpu::2 -a io:0/0 -a io:0/4 -a mem::1024 -a io:/0/0/2/0.6.0:boot -B auto

create vpar with 3 total cpu and  2 bound cpu at hardware path 41 and 45 and maximum of 4 cpus

vparcreate -p vpar01 -a cpu::3  -a cpu:::2:4 -a cpu:41 -a cpu:45  -a io:0/0 -a io:0/4 -a mem::1024
                                                                                                    -a io:/0/0/2/0.6.0:boot -B auto

Bound CPUs are attached to a vPar and cannot be removed while the vPar is up and running. IO interupts use the bound CPUs.

Booting monitor

vpar monitor is a file called /stand/vpmon. This file is loaded before hpux kernel is loaded. It will be loaded at ISL prompt.

Manually loading vpmon

Iterrupt boot at ISL prompt and then

ISL> hpux /stand/vpmon
MON>

boot/load commands available in vparmon prompt

MON> vparload  -all                         (boots all vpars )

MON> vparload -p vpar01                (boots vpar01)

MON> vparload -auto                       (boots all vpars, whose atuoboot flag set to AUTO)

MON> vparload -p vpar01 -o "is"         (boot vpar in single user mode )

MON > vparload -p vpar01 -b /stand/vmunix.prev ( boot alternate kernel)

MON > vparload -p vpar01 -B 0/3/0/0.2.0  (boot using disk device)

Boot vpar without entering vpmon prompt

ISL>hpux /stand/vpmon -p vpar01

Default partition database is /stand/vpdb


Booting  another vpar from running vpar


vpar01# vparboot -p vpar02

Modify  primary boot path

vpar01#vparmodify -p vpar01 -m io:0/4/0/0.0.5.0:BOOT

Modify alternate boot path

vpar01# vparmodofy -p vpar01 -m io:0/6/0/0.8.0:ALTBOOT

Delete a vpar

vpar01# vparremove -p vpar02

TOC a vpar

vpar01#vparreset -p vpar02 -t

shutdown/halt a  vpar 

vpar01#shutdown -h now

vpar01#vpararrest -p vpar02 -h

Status of vpar

vpar01# vparstatus


vpar01#vparstatus -v  -p vpar01