1 .\" $NetBSD: reboot.2,v 1.29 2010/03/22 19:30:55 joerg Exp $
3 .\" Copyright (c) 1980, 1991, 1993
4 .\" The Regents of the University of California. All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
14 .\" 3. Neither the name of the University nor the names of its contributors
15 .\" may be used to endorse or promote products derived from this software
16 .\" without specific prior written permission.
18 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" @(#)reboot.2 8.1 (Berkeley) 6/4/93
37 .Nd reboot system or halt processor
44 .Fn reboot "int howto" "char *bootstr"
48 Only the super-user may reboot a machine on demand.
49 However, a reboot is invoked
50 automatically in the event of unrecoverable system failures.
53 is a mask of options; the system call interface allows the following
54 options, defined in the include file
57 to the new kernel or the new bootstrap and init programs.
58 In addition to the options described below, other options
61 may be set, but such options may be ignored by the system.
63 Options can be combined together by OR'ing them, eg.
66 would be interpreted as
67 .Dq dump kernel memory before rebooting and don't sync the disks .
68 .Bl -column RB_INITNAMEA 0x0000
69 .It Dv RB_AUTOBOOT Ta Li 0x0000 Ta
70 The default, causing the system to reboot in its usual fashion.
71 .It Dv RB_ASKNAME Ta Li 0x0001 Ta
72 Interpreted by the bootstrap program itself, causing it to
73 prompt on the console as to what file should be booted.
74 Normally, the system is booted from the file
75 .Dq Em xx Ns No (0,0)netbsd ,
78 is the default disk name,
79 without prompting for the file name.
81 .\" .It Dv RB_DFLTROOT Ta Li 0x0020 Ta
82 .\" Use the compiled in root device.
83 .\" Normally, the system uses the device from which it was booted
84 .\" as the root device if possible.
85 .\" (The default behavior is dependent on the ability of the bootstrap program
86 .\" to determine the drive from which it was loaded, which is not possible
88 .It Dv RB_DUMP Ta Li 0x0100 Ta
89 Dump kernel memory before rebooting; see
92 .It Dv RB_HALT Ta Li 0x0008 Ta
93 the processor is simply halted; no reboot takes place.
94 This option should be used with caution.
95 .It Dv RB_POWERDOWN Ta Li 0x0808 Ta
96 This option is always used in conjunction with
98 and if the system hardware supports the function, the system will be
99 powered off, otherwise it has no effect.
100 .It Dv RB_INITNAME Ta Li 0x0010 Ta
101 An option allowing the specification of an init program (see
105 to be run when the system reboots.
106 This switch is not currently available.
107 .It Dv RB_KDB Ta Li 0x0040 Ta
108 Load the symbol table and enable a built-in debugger in the system.
109 This option will have no useful function if the kernel is not configured
111 Several other options have different meaning if combined
112 with this option, although their use may not be possible
118 for more information.
119 .It Dv RB_NOSYNC Ta Li 0x0004 Ta
120 Normally, the disks are sync'd (see
122 before the processor is halted or rebooted.
123 This option may be useful if file system changes have been made manually
124 or if the processor is on fire.
125 .It Dv RB_RDONLY Ta Li 0x0080 Ta
126 Initially mount the root file system read-only.
127 This is currently the default, and this option has been deprecated.
128 .It Dv RB_SINGLE Ta Li 0x0002 Ta
129 Normally, the reboot procedure involves an automatic disk consistency
130 check and then multi-user operations.
132 prevents this, booting the system with a single-user shell
135 is actually interpreted by the
137 program in the newly booted system.
139 When no options are given (i.e.,
141 is used), the system is
142 rebooted from file ``netbsd'' in the root file system of unit 0
143 of a disk chosen in a processor specific way.
144 An automatic consistency check of the disks is normally performed
147 .It Dv RB_STRING Ta Li 0x0400 Ta
149 is a string passed to the firmware on the machine, if possible, if this
151 Currently this is only implemented on the sparc and the sun3 ports.
152 .It Dv RB_USERCONF Ta Li 0x1000 Ta
155 facility when the system starts up again, if it has been compiled into
156 the kernel that is loaded.
159 If successful, this call never returns.
160 Otherwise, a \-1 is returned and an error is returned in the global
166 The caller is not the super-user.
179 function call appeared in