Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

boot(1M)

fsck(1M)

init(1M)

isl(1M)

pdc(1M)

errno(2)

a.out(4)

inittab(4)

magic(4)

hpux_700(1M)  —  Series 700 Implementation

NAME

hpux − HP-UX bootstrap utility

SYNOPSIS

hpux [HP-UX arguments] [boot] [devicefile] [arguments]
hpux ls [devicefile]
hpux restore devicefile
hpux −v

DESCRIPTION

hpux is the HP-UX specific initial system loader (isl(1M)) utility for bootstrap and first-time installation. It supports the following operations as indicated in the SYNOPSIS above:

hpux boot
Loads an object file from an HP-UX file system, lif(4), or raw device, then transfers control to the loaded image.

hpux ls Lists the contents of HP-UX directories in a format similar to ls(1).

hpux restore
Used for system installation and recovery.

hpux −v Lists the revision of the hpux loader. 

The command sequences for all operations are presented under SYNOPSIS above.  They can be either entered interactively to isl(1M) or present in an isl(1M) autoexecute file. 

Numerical Representations

hpux accepts numbers (i.e., numeric constants) in many of its options.  Numbers follow the C language notation for decimal, octal, and hexadecimal constants.  A leading zero implies octal and a leading 0x or 0X implies hexadecimal.  For example, 037, 0x1F, 0X1f, and 31 all represent the same number: decimal 31. 

Devicefiles

hpux boot, restore, and ls operations accept devicefile specifications, which have the following format:

manager(path;n)filename

They are called devicefiles because they are composed of a device name part and a file name part.  In the device part, manager(path;n), manager is the class of device manager to be used, for example disk.  path specifies the physical hardware path to the device in either explicit or mnemonic form.  n is the minor number which controls manager dependent functionality.  The file name part, filename, is either a standard HP-UX path name or a lif(4) file name preceeded by :.  Some hpux operations have defaults for particular components.  A devicefile specification containing only a device part specifies a raw device.  A devicefile specification containing a file name preceeded by : implies that the associated device part names a device containing a lif(4) file and that the named file resides on that LIF device.  A devicefile specification containing a standard HP-UX file name implies that the associated device part names a device containing an HP-UX file system.  The named file resides in that file system. 

Managers

Currently, hpux supports the disk, tape, and lan managers.  Disk manages all disks.  Lan manages remote boot through the LAN connection.  Tape manages the DDS tape drive. 

Hardware Paths

The hardware path in a devicefile can be specified explicitly through the use of numbers, /, and ., or can be specified through mnemonics.  For example, scsi.1 specifies a device at address 1 attached to Core SCSI.  Explicitly, this same path could be specified as 2/0/1.1.  The following table indicates the supported mnemonics. 

Mnemonic Description
scsi Core SCSI
lan Core LAN
eisa EISA

Minor Numbers

The minor number, n, in a devicefile specification controls driver dependent functionality.  Currently, all minor numbers should be 0 as they are not used and are reserved for future enhancements. 

File Names

File names can be omitted in which case the device is accessed as if there is no file system format on the device.  Specified file names can be standard HP-UX path names or a lif(4) file name preceeded by :. 

Standard HP-UX files can be CDF files and symbolic links.  In the case of symbolic links, the target of the link must reside in the same physical file system as the link itself.  No attempt to trace links across file systems or physical disks is done. 

DEFAULTS

Currently, only the hardware path, minor number, and CDF context have defaults. 

Hardware Paths

When the hardware path element is not specified, hpux obtains a default for it from information maintained by pdc(1M). The path will be that used to load and run isl(1M).

Minor Numbers

Currently, minor numbers are not used but are reserved for future enhancements.  They default to 0. 

CDF Context

If the target of an hpux command is a CDF and context is not specified, the contexts are searched in the following order. 

cnode name HP-PA localroot default

cnode name is extracted from /etc/clusterconf.  The context name can be entered explicitly in the following form

<file>+/<context>

BOOT

The boot operation loads an object file from an HP-UX file system, lif(4), or raw device as specified by the devicefile. It then transfers control to the loaded image, passing optional arguments.

Some missing components in the devicefile are supplied with a default (see DEFAULTS).  For example, a devicefile of disk(;)/vmunix.new would actually yield disk(scsi.1;0)/vmunix.new and a devicefile of disk(scsi.6;)/hp-ux, for booting from the disk at Core SCSI address 6, would yield disk(scsi.6;0)/hp−ux. 

The boot operation is the default command for hpux. And so,

hpux

and

hpux disk(;0)/hp-ux

are both valid and equivalent when booting from disk.  However, if the boot command is specified, it must be given a devicefile. Therefore,

hpux boot

is not valid. 

Once the image has been loaded, boot gives the sizes of the TEXT, DATA, and BSS segments and the entry offset, before transferring control to it. 

The boot operation accepts several optional arguments.  These arguments are passed along to the loaded image.  If the loaded image is an HP-UX operating system kernel, the following arguments are available:

−fnumber This option takes a number (see Numerical Representations) and passes it as the flags word to the kernel. 

−istring This option accepts a string that specifies the initial run-level for init(1M). Note that the run-level specified overrides any run-level specified in an initdefault entry in /etc/inittab (see inittab(4)).

These optional arguments are specified before the boot command.  However, if the image is not the HP-UX operating system, up to eight optional arguments of any type can be passed to the image.  hpux does no interpretation of these arguments before passing them to the image.  These arguments are specified after devicefile and are mutually exlusive to the HP-UX arguments. 

boot currently places some minor restrictions on object files it can load.  It accepts only the HP-UX magic numbers SHAREMAGIC (0410), EXECMAGIC (0407), and DEMANDMAGIC (0413) (see magic(4)). The object file must contain an Auxiliary Header of the HPUX_AUX_ID type and it must be the first Auxiliary Header (see a.out(4)).

ls

The ls operation lists the contents of the HP-UX directory specified by the optional devicefile. The output is similar to that of the ls −alFH command, except that the owner, group, and date information is not printed. 

RESTORE

The restore operation is provided as a recovery mechanism in the event that a disk becomes totally corrupted.  It copies data from a properly formatted bootable tape to disk.  When this tape contains a back-up image of the disk, the entire disk is restored.  To create a properly formatted tape (DDS ONLY), the following commands should be executed:

dd if=/usr/lib/uxbootlf.700 of=/dev/rmt/0mn bs=2k
dd if=/dev/rdsk/1ss of=/dev/rmt/0m bs=64k

The first dd(1) puts a boot area on the tape, making it a bootable image. Once the boot image is on tape, the tape is not rewound.  The next dd appends an image of the disk to the tape.  This whole process takes about one hour for a 660Mb HP2213 disk.  To avoid later problems with fsck(1) after the disk is restored, bring the system to single-user mode and type sync a few times before doing the second dd. Once created, the tape can be used to completely restore the disk:

1.  Insert the tape into the tape drive. 

2.  Instruct the machine to boot to ISL from the tape. 

This is usually done by specifying scsi.3 as the boot path. 

3.  Enter the following in response to the ISL prompt:

ISL> hpux restore disk(scsi.1;0)

This restores the disk image from the tape to the actual disk at scsi.1.  ANY EXISTING DATA ON THE DISK WILL BE LOST. The restoration process also takes about one hour for a 660Mb drive.

WARNING: This command destroys the contents of the device specified by devicefile.  Also, this command may be replaced in the future by superior installation and recovery mechanisms.  At that time, this command will be removed. 

EXAMPLES

As a preface to the examples which follow, here is a brief overview of HP-UX system boot-up sequences. 

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, processor-dependent code (firmware) is executed to verify hardware and general system integrity (see pdc(1M)). After checking the hardware, pdc announces that the user has the option to override the autoboot sequence by pressing the Esc key.  At that point, a message resembling the following usually appears on the console. 

(c) Copyright. Hewlett-Packard Company. 1991. 
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 (see isl(1M)) and transferring control to it. Since an autoboot sequence is occurring, isl merely announces itself, finds and executes the autoexecute file which, on an HP-UX system, requests that hpux be run with appropriate arguments.  Messages similar to the following are displayed 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)/hp-ux

hpux then announces the operation it is performing, in this case boot, the devicefile from which the load image comes, and the TEXT size, DATA size, BSS size, and start address of the load image.  The following is displayed before control is passed to the image. 

Secondary Loader 9000/700
Revision 1.1
Booting disk(scsi.6;0x0)/hp−ux
966616+397312+409688 start 0x6c50

The loaded image, in this case an HP-UX operating system kernel, then starts by giving numerous configuration and status messages. 

In order to use hpux interactively, isl must be brought up in interactive mode by pressing the Esc key during the interval allowed by pdc(1M). pdc then searches for and displays all bootable devices then presents a set of boot options.  If the appropriate option is chosen, pdc loads isl(1M) and isl interactively prompts for commands.  Information similar to the following is displayed:

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:  b p0 isl

Trying scsi.6.0
Boot path initialized.
Attempting to load IPL.

Hard booted.

ISL Revision A.00.09  March 27, 1990

ISL>

Although all the operations and options of hpux can be used from isl interactively, they can also be executed from an autoexecute file.  In the examples below, all user input is in boldface type. 

Boot

ISL> hpux boot disk(scsi.0;0)/hp-ux
Secondary Loader 9000/700
Revision 1.1
Booting disk(scsi.0;0)/hp−ux
966616+397312+409688 start 0x6c50

If ISL has been booted from the disk at scsi.0, the command

hpux

would be equivalent to the example. 

Booting a CDF

ISL> hpux boot disk(scsi.0;0)/hp-ux+/localroot
Secondary Loader 9000/700
Revision 1.1
Booting disk(scsi.0;0)/hp−ux+/localroot
966616+397312+409688 start 0x6c50

In this example, the context localroot is booted.  If it were omitted hpux would try each context from the list specified in the defaults section of this man page until finding a match.  That context would then be booted. 

Booting Another Kernel

ISL> hpux boot disk(scsi.6;0)/vmunix.new
Secondary Loader 9000/700
Revision 1.1
Booting disk(scsi.6;0)/vmunix.new
966616+397312+409688 start 0x6c50

Here hpux initiates a boot operation where the name of the object file is vmunix.new. 

Booting from LAN

ISL> hpux boot lan(;0)hp-ux
Secondary Loader 9000/700
Revision 1.1
Booting lan(;0)hp-ux
966616+397312+409688 start 0x6c50

This example shows how to boot a diskless client from the LAN.  It assumes that ISL was also booted from the LAN.  The file name must be specified and be no more than 127 characters in length.  Booting to isl from a local disk and then requesting an image to be loaded from the LAN is not supported. 

If hp-ux is the target of the intended boot operation, and it is being booted from CORE LAN , the command

hpux

is equivalent to the above example. 

Booting from a Raw Device

ISL> hpux boot tape(scsi.3;0)
Secondary Loader 9000/700
Revision 1.1
Booting tape(scsi.3;0)
966616+397312+409688 start 0x6c50

This example shows booting from a raw device (i.e., no file system is on the device).  It assumes that a kernel has been put onto tape with dd(1) and a 2K-byte block size. Note that no file name is specified in the devicefile. The device is a DDS tape drive and therefore tape is the manager used. 

Booting to Single User Mode

ISL> hpux −is boot disk(scsi.0;0x0)/hp−ux
Secondary Loader 9000/700
Revision 1.1
Booting disk(scsi.0;0)/hp-ux
966616+397312+409688 start 0x6c50

Kernel Startup Messages Omitted

INIT: Overriding default level with level ’s’

INIT: SINGLE USER MODE
WARNING:  YOU ARE SUPERUSER !!

#

In this example, the −i option is used to make the system come up in run-level s, for single user mode of operation. 

Listing Directory Contents

ISL> hpux ls disk(;)/.
Secondary Loader 9000/700
Revision 1.1

d r w x r — x r — x 9 2048 ./
d r w x r — x r — x 6 2048 ../
d r w x r — x r — x 2 4096 lost+found/
— r w — r w — r — — 1 746 .profile
d r w x r w x r — x 2 1024 bin/
d r w x r — x r — x 12 1024 dev/
d r w x r w x r — x 5 1024 etc/
d r w x r w x r w x 2 64 tmp/
d r w x r w x r — x 3 1024 usr/
H r w x r w x r — x 3 1024 foo+
— r w x r — x r — x 1 884736 hp-ux*
— r w x r — x r — x 1 884736 SYSBCKUP*
— r w x r — x r — x 1 1032192 hp-ux.test*

The contents of the root directory (/) on the root disk are listed.  The format shows the file protections, number of links, and size in bytes for each file in the directory.  There are three available kernels to boot: hp-ux, hp-ux.test, and SYSBCKUP.  Listing the files of a diskless server from a diskless client is not supported. 

Getting the Version

ISL> hpux −v
Secondary Loader 9000/700
Revision 1.1
@(#) Revision 1.1 Wed Dec 10 17:24:28 PST 1986

ISL>

The −v option is used to get more detailed information about the version of hpux.

Installing/Recovering a System

ISL> hpux restore disk(scsi.6;0)

Restore scsi.6
Skipping boot area
Skip done
Copying tape
Copy done 10560
Restoration Done.

The restore command will copy a specially formatted DDS tape to disk.  This is useful when copying the install image or a back-up of your disk from tape.  The restore command displays forward progress as it positions on the tape and copies data to the disk.  The final message indicates that the restore has completed and, in this case, 10560 blocks of 64k bytes has been copied.  Currently, the restore command only supports disk devices as output. 

WARNING: This command destroys the contents of the specified target device.  Also, this command may be replaced in the future by superior installation and recovery mechanisms.  At that time, this command will be removed. 

DIAGNOSTICS

When errors occur, hpux prints diagnostic messages indicating the cause of the error:

bad number in minor spec
Illegal minor number in devicefile specification. 

Unable to initialize boot device
The device specified by devicefile cannot be initialized.  Check cables, addresses, and device status (On-line/Off-line). 

No such command
Illegal or unknown command specified.

Bad fs magic
Device has a file system of unknown type or no file system.

bad number in flags spec
number argument specified with the −f option is invalid. 

bad magic
Specified object file does not have a legal magic number.

Exec failed
An unknown error caused a failure while launching the application, or the application returned prematurely.

isl not present, please hit system RESET button to continue
An unsuccessful boot operation has overlaid isl in memory making it impossible to return control to isl.

short read
Specified object file is internally inconsistent. It is not long enough.

would overlay
Loading the specified object file would overlay hpux.

BTLAN: Using /hp-ux instead
Encountered a boot request by a cluster client asking for a filename more than seven characters in length. hpux cannot supply that file and is launching hp-ux instead. 

Unable to open lif file
The lif(4) file to be booted is not bootable or does not exist.

bad number in path spec
A number or mnemonic specified as the path is invalid.

iodc_open failure in fopen
devicefile specifies a path that cannot be opened.  See Unable to initialize boot device . 

SEE ALSO

boot(1M), fsck(1M), init(1M), isl(1M), pdc(1M), errno(2), a.out(4), inittab(4), magic(4). 

Hewlett-Packard Company  —  HP-UX Release 9.0: August 1992

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026