1REBOOT(2) System Calls Manual REBOOT(2)
2
3
4
6 reboot - reboot system or halt processor
7
9 #include <sys/reboot.h>
10
11 reboot(howto)
12 int howto;
13
15 Reboot reboots the system, and is invoked automatically in the event of
16 unrecoverable system failures. Howto is a mask of options passed to
17 the bootstrap program. The system call interface permits only RB_HALT
18 or RB_AUTOBOOT to be passed to the reboot program; the other flags are
19 used in scripts stored on the console storage media, or used in manual
20 bootstrap procedures. When none of these options (e.g. RB_AUTOBOOT) is
21 given, the system is rebooted from file “vmunix” in the root file sys‐
22 tem of unit 0 of a disk chosen in a processor specific way. An auto‐
23 matic consistency check of the disks is then normally performed.
24
25 The bits of howto are:
26
27 RB_HALT
28 the processor is simply halted; no reboot takes place. RB_HALT
29 should be used with caution.
30
31 RB_ASKNAME
32 Interpreted by the bootstrap program itself, causing it to
33 inquire as to what file should be booted. Normally, the system
34 is booted from the file “xx(0,0)vmunix” without asking.
35
36 RB_SINGLE
37 Normally, the reboot procedure involves an automatic disk con‐
38 sistency check and then multi-user operations. RB_SINGLE pre‐
39 vents the consistency check, rather simply booting the system
40 with a single-user shell on the console. RB_SINGLE is inter‐
41 preted by the init(8) program in the newly booted system. This
42 switch is not available from the system call interface.
43
44 Only the super-user may reboot a machine.
45
47 If successful, this call never returns. Otherwise, a -1 is returned
48 and an error is returned in the global variable errno.
49
51 [EPERM] The caller is not the super-user.
52
54 crash(8), halt(8), init(8), reboot(8)
55
57 The notion of ``console medium'', among other things, is specific to
58 the VAX.
59
60
61
624th Berkeley Distribution May 9, 1985 REBOOT(2)