summaryrefslogtreecommitdiff
path: root/usr/src/man/man8/reboot.8
blob: 8115fe5adc8084a039f17a766ff8c5d97c563759 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
'\" te
.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright (c) 1983 Regents of the University of California. All rights reserved. The Berkeley software License Agreement specifies the terms and conditions for redistribution.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
.\"  See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with
.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH REBOOT 8 "August 29, 2021"
.SH NAME
reboot \- restart the operating system
.SH SYNOPSIS
.nf
\fB/usr/sbin/reboot\fR [\fB-dlnq\fR] [\fIboot_arguments\fR]
.fi

.LP
.nf
\fB/usr/sbin/reboot\fR [\fB-f\fR [\fB-e\fR \fIenvironment\fR] | \fB-p\fR] [\fB-dlnq\fR] [\fIboot_arguments\fR]
.fi

.SH DESCRIPTION
The \fBreboot\fR utility restarts the kernel. The kernel is loaded into memory
by the PROM monitor, which transfers control to the loaded kernel.
.sp
.LP
On x86 systems, when the \fB-f\fR flag is specified, the running kernel will
load the next kernel into memory, then transfer control to the newly loaded
kernel. This form of \fBreboot\fR is shown in the second synopsis, above.
.sp
.LP
Although \fBreboot\fR can be run by the super-user at any time,
\fBshutdown\fR(8) is normally used first to warn all users logged in of the
impending loss of service. See \fBshutdown\fR(8) for details.
.sp
.LP
The \fBreboot\fR utility performs a \fBsync\fR(8) operation on the disks, and
then a multi-user reboot is initiated. See \fBinit\fR(8) for details. On x86
systems, reboot may also update the boot archive as needed to ensure a
successful reboot.
.sp
.LP
The \fBreboot\fR utility normally logs the reboot to the system log daemon,
\fBsyslogd\fR(8), and places a shutdown record in the login accounting file
\fB/var/adm/wtmpx\fR. These actions are inhibited if the \fB-n\fR or \fB-q\fR
options are present.
.sp
.LP
Normally, the system reboots itself at power-up or after crashes.
.SH OPTIONS
The following options are supported:
.sp
.ne 2
.na
\fB\fB-d\fR\fR
.ad
.sp .6
.RS 4n
Force a system crash dump before rebooting. See \fBdumpadm\fR(8) for
information on configuring system crash dumps.
.RE

.sp
.ne 2
.na
\fB\fB-e\fR\fR
.ad
.sp .6
.RS 4n
If \fB-f\fR is present, reboot to the specified boot environment.
.RE

.sp
.ne 2
.na
\fB\fB-f\fR\fR
.ad
.sp .6
.RS 4n
Fast reboot, bypassing firmware and boot loader. The new kernel will be loaded
into memory by the running kernel, and control will be transferred to the newly
loaded kernel. If disk or kernel arguments are specified, they must be
specified before other boot arguments.
.sp
This option is currently available only on x86 systems.
.sp
Service \fBsvc:/system/boot-config:default\fR is enabled by default. It
requires \fBsolaris.system.shutdown\fR as \fBaction_authorization\fR and
\fBvalue_authorization\fR. When the \fBconfig/fastreboot_default\fR property is
set to \fBtrue\fR, \fBreboot\fR will behave as \fBreboot\fR \fB-f\fR. The value
of this property can be changed using \fBsvccfg\fR(8) and \fBsvcadm\fR(8), to
control the default reboot behavior.
.sp
See \fBEXAMPLES\fR for details.
.RE

.sp
.ne 2
.na
\fB\fB-l\fR\fR
.ad
.sp .6
.RS 4n
Suppress sending a message to the system log daemon, \fBsyslogd\fR(8) about
who executed \fBreboot\fR.
.RE

.sp
.ne 2
.na
\fB\fB-n\fR\fR
.ad
.sp .6
.RS 4n
Avoid calling \fBsync\fR(2) and do not log the reboot to \fBsyslogd\fR(8) or
to \fB/var/adm/wtmpx\fR. The kernel still attempts to sync filesystems prior to
reboot, except if the \fB-d\fR option is also present. If \fB-d\fR is used with
\fB-n\fR, the kernel does not attempt to sync file systems.
.RE

.sp
.ne 2
.na
\fB\fB-p\fR\fR
.ad
.sp .6
.RS 4n
Reboot to prom. This flag can be used to reboot the system through firmware
without changing the default reboot behavior as denoted by the
\fBconfig/fastreboot_default\fR property setting in \fBsystem/boot-config\fR
service.
.sp
This option is currently available only on x86 systems. The \fB-p\fR and
\fB-f\fR options are mutually exclusive.
.RE

.sp
.ne 2
.na
\fB\fB-q\fR\fR
.ad
.sp .6
.RS 4n
Quick. Reboot quickly and ungracefully, without shutting down running processes
first.
.RE

.SH OPERANDS
The following operands are supported:
.sp
.ne 2
.na
\fB\fIboot_arguments\fR\fR
.ad
.sp .6
.RS 4n
An optional \fIboot_arguments\fR specifies arguments to the \fBuadmin\fR(2)
function that are passed to the boot program and kernel upon restart. The form
and list of arguments is described in the \fBboot\fR(8) and \fBkernel\fR(8)
man pages. If the arguments are specified, whitespace between them is replaced
by single spaces unless the whitespace is quoted for the shell. If the
\fIboot_arguments\fR begin with a hyphen, they must be preceded by the \fB--\fR
delimiter (two hyphens) to denote the end of the \fBreboot\fR argument list.
.RE

.SH EXAMPLES
\fBExample 1 \fRPassing the \fB-r\fR and \fB-v\fR Arguments to \fBboot\fR
.sp
.LP
In the following example, the delimiter \fB--\fR (two hyphens) must be used to
separate the options of \fBreboot\fR from the arguments of \fBboot\fR(8).

.sp
.in +2
.nf
example# \fBreboot -dl -- -rv\fR
.fi
.in -2
.sp

.LP
\fBExample 2 \fRRebooting Using a Specific Disk and Kernel
.sp
.LP
The following example reboots using a specific disk and kernel.

.sp
.in +2
.nf
example# \fBreboot disk1 kernel.test/unix\fR
.fi
.in -2
.sp

.LP
\fBExample 3 \fRFast Rebooting
.sp
.LP
The following examples use the \fB-f\fR option to perform fast reboots.

.sp
.LP
If service \fBsvc:/system/boot-config:default\fR is enabled and property
\fBconfig/fastreboot_default\fR is set to \fBtrue\fR, the \fB-f\fR option can
be omitted.

.sp
.LP
The following command reboots to the default entry in the boot
menu file \fBmenu.lst\fR.

.sp
.in +2
.nf
example# \fBreboot -f\fR
.fi
.in -2
.sp

.sp
.LP
The following command reboots to another UFS root disk.

.sp
.in +2
.nf
example# \fBreboot -f -- '/dev/dsk/c1d0s0'\fR
.fi
.in -2
.sp

.sp
.LP
The following command reboots to another ZFS root pool.

.sp
.in +2
.nf
example# \fBreboot -f -- 'rpool/ROOT/root2'\fR
.fi
.in -2
.sp

.sp
.LP
The following command reboots to \fBmykernel\fR on the same disk with \fB-k\fR
option.

.sp
.in +2
.nf
example# \fBreboot -f -- '/platform/i86pc/mykernel/amd64/unix -k'\fR
.fi
.in -2
.sp

.sp
.LP
The following command reboots to \fBmykernel\fR off another root disk mounted
on \fB/mnt\fR.

.sp
.in +2
.nf
example# \fBreboot -f -- '/mnt/platform/i86pc/mykernel/amd64/unix -k'\fR
.fi
.in -2
.sp

.sp
.LP
The following command reboots to \fB/platform/i86pc/kernel/$ISADIR/unix\fR on
another boot environment named \fBsecond_root\fR.

.sp
.in +2
.nf
example# \fBreboot -f -e second_root\fR
.fi
.in -2
.sp

.sp
.LP
The following command reboots to the same kernel with \fB-kv\fR options.

.sp
.in +2
.nf
example# \fBreboot -f -- '-kv'\fR
.fi
.in -2
.sp

.sp
.LP
The following commands disable the fast-reboot-by-default behavior.

.sp
.in +2
.nf
example# \fBsvccfg -s "system/boot-config:default" \e\fR
\fBsetprop config/fastreboot_default=false\fR
example# \fBsvcadm refresh svc:/system/boot-config:default\fR
.fi
.in -2
.sp

.sp
.LP
The following commands re-enable the fast-reboot-by-default behavior.

.sp
.in +2
.nf
example# \fBsvccfg -s "system/boot-config:default" \e\fR
\fBsetprop config/fastreboot_default=true\fR
example# \fBsvcadm refresh svc:/system/boot-config:default\fR
.fi
.in -2
.sp

.LP
\fBExample 4 \fRRebooting to a Particular Boot Menu Entry
.sp
.LP
The following commands will reboot to entry \fB2\fR in the boot menu.

.sp
.in +2
.nf
example# \fBbootadm list-menu\fR
the location for the active menu is: /rpool/boot/menu.lst
Index  Default  Dataset             Menu
0      -        rpool/ROOT/test-182  test-182
1      *        rpool/ROOT/test-183  test-183
2      -        rpool/ROOT/test-183  test-183
example# \fBreboot 2\fR
.fi
.in -2
.sp

.SH FILES
.ne 2
.na
\fB\fB/var/adm/wtmpx\fR\fR
.ad
.sp .6
.RS 4n
login accounting file
.RE

.SH SEE ALSO
.BR mdb (1),
.BR sync (2),
.BR uadmin (2),
.BR reboot (3C),
.BR attributes (7),
.BR boot (8),
.BR dumpadm (8),
.BR fsck (8),
.BR halt (8),
.BR init (8),
.BR kernel (8),
.BR shutdown (8),
.BR svcadm (8),
.BR svccfg (8),
.BR sync (8),
.BR syslogd (8)
.SH NOTES
The \fBreboot\fR utility does not execute the scripts in
\fB/etc/rc\fInum\fR.d\fR or execute shutdown actions in \fBinittab\fR(5). To
ensure a complete shutdown of system services, use \fBshutdown\fR(8) or
\fBinit\fR(8) to reboot a Solaris system.