AIX/HP-UX Interoperability Guide (continued)
[Last Chapter: 1. Introduction]
The HP and RS/6000 machines, like all UNIX machines, can be booted in one of two ways: normal (or automatic) boot and standalone boot. Normal boot is a boot from a local hard disk, be it internal or external. The process for a normal boot usually requires no user intervention and is therefore frequently referred to as an automatic boot. Standalone boot brings the system up to a minimal level for purposes of troubleshooting, diagnostics, and sometimes software installation. This kind of booting usually requires user intervention and is thus also known as manual, attended, or interactive booting. There is actually a third way to boot these machines-a network boot-which is usually reserved for diskless workstations and is beyond the scope of this document.
If everything is configured properly, normal boot simply involves two things: 1) making sure the front panel key switch is in NORMAL position (all the way to the left), and 2) powering on the system. Everything else is automatic: the system comes up in multi-user mode, ready for someone to log in. The following sequence of events takes place when an RS/6000 is powered on or reset:
Up until the runtime phase all you have as an indicator of how the boot sequence is going is the LED display on the front panel of the machine. Three-digit codes flash as the sequence progresses, and if you want to know the meaning of the codes, you have to look them up in the Diagnostics Guide. At a certain point, however, you will see either the code c32 or c33, which indicates that the runtime phase is assigning the console. c32 is for high-function terminal devices (hfts) and c33 is for serial-line terminals (ttys). After that, boot output goes to the display until finally the Console Login: message appears, at which time the machine is completely up and in multi-user mode.
This kind of boot can be done from a local disk or tape, but most commonly it is done with diskettes. See Appendix B for information on creating bootable diskettes. There are four diskettes used in this process: a boot diskette, two display diskettes, and an installation/maintenance diskette. The procedure for booting off of these diskettes is a follows:
The following examples must be done while logged in as root.
To shut down the system in 10 minutes:
# shutdown +10
To do a fast shutdown now with no warnings:
# shutdown -F
To shut down with a warning for users to log off:
# shutdown now
To shut down with a one-minute warning and then reboot:
# shutdown -r
To reboot immediately:
# shutdown -Fr
# reboot
To shut down AIX to single-user mode:
# telinit S
# init s
To shut down to maintenance mode:
HP-UX system startup occurs in two phases:
Powering on the system or pressing the Reset button causes processor-dependent code (PDC) and I/O-dependent code (IODC) firmware to be executed. The PDC runs self-tests and locates the console, using IODC and the paths stored in Stable Storage. The PDC displays on the console screen copyright information, PDC and IODC ROM revisions, and the amount of memory configured. Then PDC displays copyright information as well as a message that reads:
Selecting a system to boot.
To stop selection process, press and hold the ESCAPE key
If the Escape key is not pressed, PDC loads the initial system loader (ISL) from the primary path in Stable Storage (for example, a SCSI disk with address scsi.6.0) and transfers control to it. The ISL, scheduled by the autoboot sequence, finds the autoexecute file and executes the command specified in it (usually hpux or hpux boot disc(;0)/hp-ux). By default, the autoexecute arguments load /hp-ux. While loading, hpux displays information about the device and file being booted, the text, data, and BSS size of the kernel and the kernel's startup address.
CAUTION: Do not confuse the ISL utility hpux with the /hp-ux file that it loads. hpux is invoked from the ISL prompt, and, during an automatic boot, loads /hpux, a file that contains the HP-UX operating system kernel
Once HP-UX starts (when the kernel is loaded), it searches for the root file system. Generally, the root file system is found on the disk from which HP-UX booted. After finding the root file system, the operating system starts a shell to read commands from /etc/pre_init_rc. Among these commands is fsck, which checks the root file system (currently in a read-only state). Any problems fsck encounters that it is unable to fix are caught later by /etc/bcheckrc. After fsck exits, the operating system remounts the file system in a read-write state.
CAUTION: Do not modify the /etc/pre_init_rc script; it might cause the system to be unbootable.
Then, HP-UX starts its first process, /etc/init. The init process has process ID one (1) and no parent process. The init process reads /etc/inittab file to define the environment for normal working conditions. The /etc/inittab file is similar to the one found in AIX, and once the entries in that file have been started, the HP-UX machine, by default, is in multi-user state.
A standalone boot in HP-UX is a manual boot, also known as an Attended Mode boot. Pressing the Escape key at the boot banner halts the automatic boot sequence, puts you into Attended Mode, and displays the Boot Console User Interface main menu.[2] The system searches the SCSI, LAN, and EISA interfaces for all potential boot devices-devices for which boot I/O code (IODC) exists. The system then displays a table, such as the following:
Device Selection Device Path Device Type
---------------- ----------- -----------
P0 scsi.6.0 QUANTUM PD210S
P1 scsi.1.0 HP 2213A
P2 lan.ffffff-ffff.ff hpfoobar
At this point, the Boot Console User Interface main menu offers the following options:
b) Boot from specified device
s) Search for bootable devices
a) Enter Boot Administration mode
x) Exit and continue boot sequence
?) Help
Using the b) option, you can direct hpux to boot from a specific device. For example, to direct hpux to boot from the SCSI disk drive, you would type the key sequence P0. The key to booting to standalone 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. After displaying a few messages, the system then produces the ISL> prompt. From here you can run the hpux utility to boot the kernel to single-user (or standalone) mode:
ISL>hpux -is boot disk(scsi.6;0)/hp-ux
This essentially tells hpux to load the kernel (/hp-ux) into single-user mode (-is) off the SCSI disk drive at address 6. 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 (or standalone) mode. In fact, you will see something similar to the following after typing the above command:
Secondary Loader 9000/700
Revision 1.1
Booting disk(scsi.6;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!!
#
To shut down and halt using HP-UX commands when HP VUE is running, you must first stop HP VUE and then shut the system down.
To shut down HP-UX for power-off, you can do any of the following:
# telinit 0
# shutdown -h -y now
To shut down and reboot HP-UX:
# reboot
# shutdown -r -y now
To shut down HP-UX to single-user mode:
# telinit S
# shutdown -y now
# shutdown 0
Administrators can customize their system's shutdown through the use of user-supplied scripts. If, for example, you have Oracle running on the system and want to shut the database down before shutting the system down, you simply put the script that shuts the database down into a directory called /etc/shutdown.d. A shutdown command first runs the scripts in the /etc/shutdown.d directory before shutting down the system. The order of execution is based on the scripts' names: the ASCII order of the script names is the order of execution.
Administrators can also allow non-root users to shut down the system by creating a file called /etc/shutdown.allow. The hostname of the system and the user login name must be present in the /etc/shutdown.allow file. For example, if /etc/shutdown.allow contains the following:
foobar bobby
foobar sissy
then users bobby and sissy can shut down system foobar.
The bootup of the IBM and HP platforms, in typical UNIX fashion, is completely platform-specific. The point at which the two platforms follow a similar procedure is when the init process is started. Both machines use the AT&T-style of startup by having init read the /etc/inittab file. Both inittab files, though they may differ in some details, follow the same basic format.
Both platforms support a manual boot. The IBM needs bootable media, usually diskettes, in order to do a manual boot. HP-UX requires pressing the Escape key at the appropriate time and then booting to ISL and then to standalone mode. In both cases standalone mode gives whoever performs the boot root privileges, something you should consider before doing such a thing in front of a casual user.[3]
The shutdown procedures for the two platforms resemble each other quite a bit. Both support the shutdown and reboot commands, as well as the telinit command to change init's run level. In the case of HP-UX, it is a good idea to stop HP VUE before rebooting. HP-UX supports running special scripts to be run at shutdown by placing them in /etc/shutdown.d. HP-UX also supports allowing users other than root to shut down a system by means of an /etc/shutdown.allow file. AIX supports neither shutdown scripts nor non-root system shutdowns.
Footnotes:
[1]: This assumes that your root file system is on
hdisk0. If it is not, use hdiskx, where x is the number
of the physical volume where the root file system resides.
[2]: This process is for models 715/33. 715/50, 715/75, 725/50, 725/75, 735, and 755. See A HREF="appendix_d.html">appendix D for other models.
[3]: HP machines have a secure command in the BOOT_ADMIN command set that can be used to prevent the Boot Console User Interface from appearing. Once the secure boot mode is set to on, however, the only way to turn it off is to disconnect all booot devices. This will cause the Boot Console Interface to reappear, which will enabel you to issue the secure off command. IBM machines use keys to maintain security: turning the key to the SECURE position and then removing it prevents anyone from booting the machine.
[Next Chapter: 3. User Login and Logout]
Provide feedback to: alan_roberts@hp.com