]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sbin/reboot/reboot.8
Add UPDATING entries and bump version.
[FreeBSD/FreeBSD.git] / sbin / reboot / reboot.8
1 .\" Copyright (c) 1990, 1991, 1993
2 .\"     The Regents of the University of California.  All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 3. Neither the name of the University nor the names of its contributors
13 .\"    may be used to endorse or promote products derived from this software
14 .\"    without specific prior written permission.
15 .\"
16 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 .\" SUCH DAMAGE.
27 .\"
28 .\"     @(#)reboot.8    8.1 (Berkeley) 6/9/93
29 .\" $FreeBSD$
30 .\"
31 .Dd December 20, 2017
32 .Dt REBOOT 8
33 .Os
34 .Sh NAME
35 .Nm reboot ,
36 .Nm halt ,
37 .Nm fastboot ,
38 .Nm fasthalt
39 .Nd stopping and restarting the system
40 .Sh SYNOPSIS
41 .Nm halt
42 .Op Fl lNnpq
43 .Op Fl k Ar kernel
44 .Nm
45 .Op Fl cdlNnpqr
46 .Op Fl k Ar kernel
47 .Nm fasthalt
48 .Op Fl lNnpq
49 .Op Fl k Ar kernel
50 .Nm fastboot
51 .Op Fl dlNnpq
52 .Op Fl k Ar kernel
53 .Sh DESCRIPTION
54 The
55 .Nm halt
56 and
57 .Nm
58 utilities flush the file system cache to disk, send all running processes
59 a
60 .Dv SIGTERM
61 (and subsequently a
62 .Dv SIGKILL )
63 and, respectively, halt or restart the system.
64 The action is logged, including entering a shutdown record into the user
65 accounting database.
66 .Pp
67 The options are as follows:
68 .Bl -tag -width indent
69 .It Fl c
70 The system will turn off the power and then turn it back on if it can.
71 If the power down action fails, the system
72 will halt or reboot normally, depending on whether
73 .Nm halt
74 or
75 .Nm
76 was called.
77 At the present time, only the
78 .Xr ipmi 4
79 driver implements the power cycle functionality and only on hardware
80 with a BMC that supports power cycling.
81 Unlike power off, the amount of hardware that supports power cycling
82 is small.
83 .It Fl d
84 The system is requested to create a crash dump.
85 This option is
86 supported only when rebooting, and it has no effect unless a dump
87 device has previously been specified with
88 .Xr dumpon 8 .
89 .It Fl k Ar kernel
90 Boot the specified
91 .Ar kernel
92 on the next system boot.
93 If the kernel boots successfully, the
94 .Em default
95 kernel will be booted on successive boots, this is a one-shot option.
96 If the boot fails, the system will continue attempting to boot
97 .Ar kernel
98 until the boot process is interrupted and a valid kernel booted.
99 This may change in the future.
100 .It Fl l
101 The halt or reboot is
102 .Em not
103 logged to the system log.
104 This option is intended for applications such as
105 .Xr shutdown 8 ,
106 that call
107 .Nm
108 or
109 .Nm halt
110 and log this themselves.
111 .It Fl N
112 The file system cache is not flushed during the initial process clean-up,
113 however the kernel level
114 .Xr reboot 2
115 is still processed with a sync.
116 This option can be useful for performing a
117 .Dq best-effort
118 reboot when devices might be unavailable.
119 This can happen when devices have been disconnected, such as with
120 .Xr iscsi 4 .
121 .It Fl n
122 The file system cache is not flushed.
123 This option should probably not be used.
124 .It Fl p
125 The system will turn off the power if it can.
126 If the power down action fails, the system
127 will halt or reboot normally, depending on whether
128 .Nm halt
129 or
130 .Nm
131 was called.
132 .It Fl q
133 The system is halted or restarted quickly and ungracefully, and only
134 the flushing of the file system cache is performed (if the
135 .Fl n
136 option is not specified).
137 This option should probably not be used.
138 .It Fl r
139 The system kills all processes, unmounts all filesystems, mounts the new
140 root filesystem, and begins the usual startup sequence.
141 After changing vfs.root.mountfrom with
142 .Xr kenv 1 ,
143 .Nm Fl r
144 can be used to change the root filesystem while preserving kernel state.
145 This requires the
146 .Xr tmpfs 5
147 kernel module to be loaded because
148 .Xr init 8
149 needs a place to store itself after the old root is unmounted, but
150 before the new root is in place.
151 .El
152 .Pp
153 The
154 .Nm fasthalt
155 and
156 .Nm fastboot
157 utilities are nothing more than aliases for the
158 .Nm halt
159 and
160 .Nm
161 utilities.
162 .Pp
163 Normally, the
164 .Xr shutdown 8
165 utility is used when the system needs to be halted or restarted, giving
166 users advance warning of their impending doom and cleanly terminating
167 specific programs.
168 .Sh EXAMPLES
169 Replace current root filesystem with UFS mounted from
170 .Pa /dev/ada0s1a :
171 .Bd -literal -offset indent
172 kenv vfs.root.mountfrom=ufs:/dev/ada0s1a
173 reboot -r
174 .Ed
175 .Pp
176 This mechanism can also be used with NFS, with a caveat that
177 it only works with NFSv4, and requires a numeric IPv4 address:
178 .Bd -literal -offset indent
179 kenv vfs.root.mountfrom=nfs:192.168.1.1:/share/name
180 reboot -r
181 .Ed
182 .Sh SEE ALSO
183 .Xr kenv 1 ,
184 .Xr getutxent 3 ,
185 .Xr ipmi 4 ,
186 .Xr boot 8 ,
187 .Xr dumpon 8 ,
188 .Xr nextboot 8 ,
189 .Xr savecore 8 ,
190 .Xr shutdown 8 ,
191 .Xr sync 8
192 .Sh HISTORY
193 A
194 .Nm
195 utility appeared in
196 .Bx 4.0 .