(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.
Booting from: scsi.6 HP 2213A Hard booted. ISL Revision A.00.09 March 27, 1990 ISL booting hpux boot disk(;0)/stand/vmunix
Booting disk(scsi.6;0)/stand/vmunix 966616+397312+409688 start 0x6c50Finally, the loaded image displays numerous configuration and status messages, and passes control to the init process.
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 islThis 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 islOnce you get the ISL prompt you can run the hpux utility to boot the kernel to single-user mode:
ISL>hpux -isThis 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!! #
|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="default" ROUTE_GATEWAY="gateway_address" ROUTE_COUNT="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).|
variable=valueNo trailing comments may appear on a variable definition line. Comment statements must be on separate lines, with the "#" comment character in column 1. An example of the required syntax for configuration files is given below:
# Cron configuration. See cron(1m) # # CRON: Set to 1 to start cron daemon # CRON=1Both the execution scripts and the configuration files are named after the subsystem they control. For example, the /sbin/init.d/cron execution script controls the cron daemon, and it is customized by the /etc/rc.config.d/cron configuration variable script.
These directories contain two types of link files: start links and kill links. Start links have names beginning with the capital letter S and are invoked with the start argument at system boot time or on transition to a higher run level. Kill links have names beginning with the capital letter K and are invoked with the stop argument at system shutdown time, or when moving to a lower run level.
Further, all link files in a sequencer directory are numbered to ensure a particular execution sequence. Each script has, as part of its name, a three-digit sequence number. This, in combination with the start and kill notation, provides all the information necessary to properly start up and shut down a system.
The table below shows some samples from the run-level directories. (The sequence numbers shown are only for example and may not accurately represent your system.)
Because each script in /sbin/init.d performs both the startup and shutdown functions, each will have two links pointing towards the script from /sbin/rc*.d; one for the start action and one for the stop action.
/sbin/rc sequences the startup and shutdown scripts in the appropriate sequencer directories in lexicographical order. Upon transition from a lower to a higher run level, the start scripts for the new run level and all intermediate levels between the old and new level are executed. Upon transition from a higher to a lower run level, the kill scripts for the new run level and all intermediate levels between the old and new level are executed.
When a system is booted to a particular run level, it will execute startup scripts for all run levels up to and including the specified level (except run level 0). For example, if booting to run level 4, /sbin/rc looks at the old run level (S) and the new run level (4) and executes all start scripts in states 1, 2, 3, and 4. Within each level, the start scripts are sorted lexicographically and executed in that order. Each level is sorted and executed separately to ensure that the lower level subsystems are started before the higher level subsystems.
Consequently, when shutting down a system, the reverse takes place. The kill scripts are executed in lexicographical order starting at the highest run level and working down, as to stop the subsystems in the reverse order they were started. As mentioned earlier, the numbering is reversed from the startup order.
# cron config # # CRON=1 to start CRON=1This would be necessary because the execution script, /sbin/init.d/cron contains the following:
# cron startup # . /etc/rc/config if [ $CRON = 1 ] then /usr/sbin/cron ficron will start at run level 2 because in /sbin/rc2.d a link exists from S730cron to /sbin/init.d/cron. /sbin/rc will invoke /sbin/init.d/cron with a start argument because the link name starts with an S.
# init 0 # shutdown -h -y nowTo shut down and reboot HP-UX:
# reboot # shutdown -r -y nowTo shut down HP-UX to single-user mode:
# init S # shutdown -y now # shutdown 0The -h option to the shutdown command halts the system completely but will prompt you for a message to issue users. The -y option completes the shutdown without asking you any of the questions it would normally ask.