xref: /386bsd/usr/share/man/cat2/reboot.0 (revision a2142627)
1REBOOT(2)                 386BSD Programmer's Manual                 REBOOT(2)
2
3NNAAMMEE
4     rreebboooott - reboot system or halt processor
5
6SSYYNNOOPPSSIISS
7     ##iinncclluuddee <<uunniissttdd..hh>>
8     ##iinncclluuddee <<ssyyss//rreebboooott..hh>>
9
10     _i_n_t
11     rreebboooott(_i_n_t _h_o_w_t_o)
12
13DDEESSCCRRIIPPTTIIOONN
14     RReebboooott() reboots the system.  Only the super-user may reboot a machine on
15     demand.  However, a reboot is invoked automatically in the event of
16     unrecoverable system failures.
17
18     _H_o_w_t_o is a mask of options; the system call interface allows the
19     following options, defined in the include file <_s_y_s/_r_e_b_o_o_t._h>, to be
20     passed to the new kernel or the new bootstrap and init programs.
21
22     RB_AUTOBOOT   The default, causing the system to reboot in its usual
23                   fashion.
24
25     RB_ASKNAME    Interpreted by the bootstrap program itself, causing it to
26                   prompt on the console as to what file should be booted.
27                   Normally, the system is booted from the file
28                   ``_x_x(0,0)vmunix'', where _x_x is the default disk name,
29                   without prompting for the file name.
30
31     RB_DFLTROOT   Use the compiled in root device.  Normally, the system uses
32                   the device from which it was booted as the root device if
33                   possible.  (The default behavior is dependent on the
34                   ability of the bootstrap program to determine the drive
35                   from which it was loaded, which is not possible on all
36                   systems.)
37
38     RB_DUMP       Dump kernel memory before rebooting; see savecore(8) for
39                   more information.
40
41     RB_HALT       the processor is simply halted; no reboot takes place.
42                   This option should be used with caution.
43
44     RB_INITNAME   An option allowing the specification of an init program
45                   (see init(8))  other than /_s_b_i_n/_i_n_i_t to be run when the
46                   system reboots.  This switch is not currently available.
47
48     RB_KDB        Load the symbol table and enable a built-in debugger in the
49                   system.  This option will have no useful function if the
50                   kernel is not configured for debugging.  Several other
51                   options have different meaning if combined with this
52                   option, although their use may not be possible via the
53                   rreebboooott() call.  See kadb(4) for more information.
54
55     RB_NOSYNC     Normally, the disks are sync'd (see sync(8))  before the
56                   processor is halted or rebooted.  This option may be useful
57                   if file system changes have been made manually or if the
58                   processor is on fire.
59
60     RB_RDONLY     Initially mount the root file system read-only.  This is
61                   currently the default, and this option has been deprecated.
62
63     RB_SINGLE     Normally, the reboot procedure involves an automatic disk
64                   consistency check and then multi-user operations.
65                   RB_SINGLE prevents this, booting the system with a single-
66                   user shell on the console.  RB_SINGLE is actually
67                   interpreted by the init(8) program in the newly booted
68                   system.
69
70                   When no options are given (i.e., RB_AUTOBOOT is used), the
71                   system is rebooted from file ``vmunix'' in the root file
72                   system of unit 0 of a disk chosen in a processor specific
73                   way.  An automatic consistency check of the disks is
74                   normally performed (see fsck(8)).
75
76RREETTUURRNN VVAALLUUEESS
77     If successful, this call never returns.  Otherwise, a -1 is returned and
78     an error is returned in the global variable _e_r_r_n_o.
79
80EERRRROORRSS
81     [EPERM]       The caller is not the super-user.
82
83SSEEEE AALLSSOO
84     kadb(4),  crash(8),  halt(8),  init(8),  reboot(8),  savecore(8)
85
86BBUUGGSS
87     The HP300 implementation supports neither RB_DFLTROOT nor RB_KDB.
88
89HHIISSTTOORRYY
90     The rreebboooott function call appeared in 4.0BSD.
91
924th Berkeley Distribution       March 10, 1991                               2
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133