Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

crash(8)

halt(8)

init(8)

reboot(8)

savecore(8)

reboot(2)  —  System Calls

OSF

NAME

reboot − Reboots system or halts processor

SYNOPSIS

#include <sys/reboot.h> void reboot(
int howto );

PARAMETERS

howtoSpecifies a mask of options. 

DESCRIPTION

The reboot() function restarts the system.  The startup is automatic and brings up /vmunix in the normal, nonmaintenance mode.  The calling process must have superuser privilege to run this function successfully.  However, a reboot is invoked automatically in the event of unrecoverable system failures. 

The following options, defined in the sys/reboot.h include file are passed to the new kernel or the new bootstrap and init programs.  They are supplied as values to the howto parameter. 

RB_AUTOBOOT
The default, causing the system to reboot in its usual fashion.

RB_ASKNAME
Interpreted by the bootstrap program itself, causing it to prompt on the console as to what file should be booted.

RB_DFLTROOT
Use the compiled-in root device. If possible, the system uses the device from which it was booted as the root device. (The default behavior is dependent on the ability of the bootstrap program to determine the drive from which it was loaded, which is not possible on all systems.)

RB_DUMPDump kernel memory before rebooting; see the savecore command for more information. 

RB_HALTThe processor is simply halted; no reboot takes place.  This option should be used with caution. 

RB_INITNAME
Allows the specification of an init program (see the init program) other than /sbin/init to be run when the system reboots.  This switch is not currently available. 

RB_KDBLoad the symbol table and enable a built-in debugger in the system.  This option has no useful function if the kernel is not configured for debugging.  Several other options have different meanings if combined with this option, although their use may not be possible via the reboot() function. 

RB_NOSYNC
Normally, the disks are sync’d (see the sync() command) before the processor is halted or rebooted. 

RB_RDONLY
Initially mount the root file system read-only. This is currently the default, and this option has been deprecated as a no-op.

RB_SINGLE
Normally, the reboot procedure involves an automatic disk consistency check and then multiuser operations. RB_SINGLE prevents this, booting the system with a single-user shell on the console. RB_SINGLE is actually interpreted by the init program in the newly booted system. 

RB_UNIPROC
Restart the system in uniprocessor mode.

When no options are given (that is, RB_AUTOBOOT is used), the system is rebooted from file vmunix in the root file system of unit 0 (zero) of a disk chosen in a processor-specific way.  An automatic consistency check of the disks is then normally performed (see the fsck command). 

Some options may not be supported on all machines. 

RETURN VALUES

If successful, this call does not return.  Otherwise, a −1 is returned and errno is set to indicate the error. 

ERRORS

If the reboot() function fails, errno may be set to the following value:

[EPERM]The calling process does not have appropriate privilege. 

RELATED INFORMATION

Commands: crash(8), halt(8), init(8), reboot(8), savecore(8)

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