Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

reboot(1M)

clusterconf(4)

reboot(2)

NAME

reboot − boot the system

SYNOPSIS

#include <sys/reboot.h>

int reboot (int howto, ... 

/* const char *device_file,
   const char *filename,
   const char *filename,
   const char *server_linkaddress */

);

DESCRIPTION

reboot() causes the system to reboot.  howto is a mask of reboot options (see <sys/reboot.h>), specified as follows:

RB_AUTOBOOT A file system sync is performed (unless RB_NOSYNC is set) and the processor is rebooted from the default device and file. 

RB_HALT The processor is simply halted.  A sync of the file system is performed unless the RB_NOSYNC flag is set.  RB_HALT should be used with caution. 

RB_NOSYNC A sync of the file system is not performed. 

RB_NEWDEVICE The device_file argument is used as the file name of the device from which to reboot. 

RB_NEWFILE The filename argument is used as the name of the file being rebooted. 

RB_NEWSERVER The additional optional parameter, server_linkaddress, specifies the ETHERNET link address of a new boot server.  The server_linkaddress is a 12-character hexadecimal number that has the same format as the machine ID field of /etc/clusterconf.  The 0x prefix is optional. 

This allows a standalone system or HP cluster server to reboot and join an HP cluster as a client node, or for an existing client to join a different HP cluster. 

device_file specifies the "boot device", the device from which the reboot occurs.  device_file must be a block or character special file name and is used only if the RB_NEWDEVICE option is set. 

If the RB_NEWFILE option is set, filename specifies the "boot file", the name of the file being rebooted.  This file is loaded into memory by the bootstrap then control is passed to it. 

If the RB_NEWSERVER option is set, reboot(2) does not verify that server_linkaddress is a valid ETHERNET address, nor that the specified server is valid or provides the required service. 

If the boot device is not a LAN device, the server_linkaddress information is ignored.  The boot device is considered a LAN device if the previous boot was from a LAN device or if a LAN device is specified via the RB_NEWDEVICE option. 

Unless the RB_NOSYNC flag has been specified, reboot(2) unmounts all mounted file systems and marks them clean so that it will not be necessary to run fsck(1M) on these file systems when the system reboots.

Only users with appropriate privileges can reboot a machine. 

RETURN VALUE

If successful, this call never returns.  Otherwise, a −1 is returned and errno is set to indicate the error. 

ERRORS

reboot() fails if any of the following conditions are encountered:

[EFAULT] device_file points outside the allocated address space of the process. 

[ENAMETOOLONG] the path name specified by device_file exceeds PATH_MAX bytes, or the length of a component of the path name exceeds NAME_MAX bytes while _POSIX_NO_TRUNC is in effect. 

[EINVAL] device_file is not a block or a character device. 

[ENET] The device specified by device_file is remote. 

[ENOENT] The file specified by device_file does not exist. 

[ENOTDIR] A component of the path prefix specified by device_file is not a directory. 

[ENXIO] The device named by device_file does not exist. 

[EPERM] The effective user ID of the caller is not a user with appropriate privileges. 

DEPENDENCIES

Series 300/400

filename must be one of the files listed by the boot ROM at power-up. 

The default device, file, and server for RB_AUTOBOOT are those from which the system was previously booted. 

If the RB_NEWDEVICE option is used and device_file specifies a LAN device, the RB_NEWSERVER option and server_linkaddress parameter must also be used. 

If an invalid server_linkaddress is specified with the RB_NEWSERVER option, or if the requested server does not respond, the Series 300/400 boot ROM displays the message BOOTING A SYSTEM and retries indefinitely, or until the requested server responds, or the system is rebooted manually. 

Series 700/800

The RB_NEWDEVICE, RB_NEWFILE, and RB_NEWSERVER options and the device_file, filename and server_linkaddress parameters are ignored.  Therefore, none of the errors associated with them are returned. 

The default file and device for RB_AUTOBOOT are /hp-ux on the current root device. 

AUTHOR

reboot() was developed by HP and the University of California, Berkeley. 

SEE ALSO

reboot(1M), clusterconf(4). 

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

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