Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ reboot(2) — HP-UX 6.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

reboot(1M)

REBOOT(2)  —  HP-UX

NAME

reboot − boot the system

SYNOPSIS

#include <sys/reboot.h>

int reboot (howto, device_file, filename [, server_linkaddress])
int howto;
char *device_file, *filename;
char *server_linkaddress;

DESCRIPTION

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

RB_AUTOBOOT A filesystem 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 filesystem is performed unless the RB_NOSYNC flag is set.  RB_HALT should be used with caution. 

RB_NOSYNC A sync of the filesystem is not performed. 

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

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

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 will be loaded into memory by the bootstrap and control passed to it. 

Only the superuser can reboot a machine. 

RETURN VALUE

If successful, this call never returns.  Otherwise, a −1 is returned and an error code is returned in the global variable errno. 

ERRORS

Reboot fails if any of the following is true:

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

[ENAMETOOLONG] The path name specified by device_file exceeds MAXPATHLEN characters. 

[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 superuser. 

DEPENDENCIES

Series 300 Diskless
On clustered systems, it is necessary to kill all general CSPs (see csp(1M)) as well as user processes before calling reboot(2).

The following additional option for howto can be used to specify a new boot server, allowing any Series 300 system to reboot from a standalone workstation to a diskless cluster server, or from one diskless cluster server to another diskless cluster server. 

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 /etc/clusterconf.  The "0x" prefix is optional. 

Reboot(2) does not verify that server_linkaddress is a valid ETHERNET address, nor that the specified server either is valid or provides the required service.  If an invalid address is specified or if the requested server does not respond, the Series 300 boot ROM displays the message "BOOTING A SYSTEM" and retries infinitely, or until the requested server responds or the system is rebooted manually. 

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

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

Series 300
All user processes, except the calling process, must be killed before calling the reboot system call; otherwise, the file system will not be marked clean, thus causing the system to require an fsck(1M) on reboot. Therefore, either the calling process must be invoked from a shell using the shell’s exec or the calling process must kill the shell it was called from and send a signal to init(1M) to prevent it from respawning the killed process.

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. 

Series 800
The RB_NEWDEVICE and RB_NEWFILE options and the device_file and filename parameters are ignored, and, therefore, none of the errors associated with the device_file parameter are returned. 

The optional parameter server_linkaddress is not supported. 

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). 

Hewlett-Packard Company  —  May 11, 2021

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