6253 F_GETLK doesn't always return lock owner
[illumos-gate.git] / usr / src / man / man1m / reboot.1m
blob1ff92b6f33c232615c86433429dbe216e947cd30
1 '\" te
2 .\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
3 .\" Copyright (c) 1983 Regents of the University of California. All rights reserved. The Berkeley software License Agreement specifies the terms and conditions for redistribution.
4 .\" 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.
5 .\"  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
6 .\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 .TH REBOOT 1M "Aug 24, 2009"
8 .SH NAME
9 reboot \- restart the operating system
10 .SH SYNOPSIS
11 .LP
12 .nf
13 \fB/usr/sbin/reboot\fR [\fB-dlnq\fR] [\fIboot_arguments\fR]
14 .fi
16 .LP
17 .nf
18 \fB/usr/sbin/reboot\fR [\fB-f\fR [\fB-e\fR \fIenvironment\fR] | \fB-p\fR] [\fB-dlnq\fR] [\fIboot_arguments\fR]
19 .fi
21 .SH DESCRIPTION
22 .sp
23 .LP
24 The \fBreboot\fR utility restarts the kernel. The kernel is loaded into memory
25 by the PROM monitor, which transfers control to the loaded kernel.
26 .sp
27 .LP
28 On x86 systems, when the \fB-f\fR flag is specified, the running kernel will
29 load the next kernel into memory, then transfer control to the newly loaded
30 kernel. This form of \fBreboot\fR is shown in the second synopsis, above.
31 .sp
32 .LP
33 Although \fBreboot\fR can be run by the super-user at any time,
34 \fBshutdown\fR(1M) is normally used first to warn all users logged in of the
35 impending loss of service. See \fBshutdown\fR(1M) for details.
36 .sp
37 .LP
38 The \fBreboot\fR utility performs a \fBsync\fR(1M) operation on the disks, and
39 then a multi-user reboot is initiated. See \fBinit\fR(1M) for details. On x86
40 systems, reboot may also update the boot archive as needed to ensure a
41 successful reboot.
42 .sp
43 .LP
44 The \fBreboot\fR utility normally logs the reboot to the system log daemon,
45 \fBsyslogd\fR(1M), and places a shutdown record in the login accounting file
46 \fB/var/adm/wtmpx\fR. These actions are inhibited if the \fB-n\fR or \fB-q\fR
47 options are present.
48 .sp
49 .LP
50 Normally, the system reboots itself at power-up or after crashes.
51 .SH OPTIONS
52 .sp
53 .LP
54 The following options are supported:
55 .sp
56 .ne 2
57 .na
58 \fB\fB-d\fR\fR
59 .ad
60 .sp .6
61 .RS 4n
62 Force a system crash dump before rebooting. See \fBdumpadm\fR(1M) for
63 information on configuring system crash dumps.
64 .RE
66 .sp
67 .ne 2
68 .na
69 \fB\fB-e\fR\fR
70 .ad
71 .sp .6
72 .RS 4n
73 If \fB-f\fR is present, reboot to the specified boot environment.
74 .RE
76 .sp
77 .ne 2
78 .na
79 \fB\fB-f\fR\fR
80 .ad
81 .sp .6
82 .RS 4n
83 Fast reboot, bypassing firmware and boot loader. The new kernel will be loaded
84 into memory by the running kernel, and control will be transferred to the newly
85 loaded kernel. If disk or kernel arguments are specified, they must be
86 specified before other boot arguments.
87 .sp
88 This option is currently available only on x86 systems.
89 .sp
90 Service \fBsvc:/system/boot-config:default\fR is enabled by default. It
91 requires \fBsolaris.system.shutdown\fR as \fBaction_authorization\fR and
92 \fBvalue_authorization\fR. When the \fBconfig/fastreboot_default\fR property is
93 set to \fBtrue\fR, \fBreboot\fR will behave as \fBreboot\fR \fB-f\fR. The value
94 of this property can be changed using \fBsvccfg\fR(1M) and \fBsvcadm\fR(1M), to
95 control the default reboot behavior.
96 .sp
97 See \fBEXAMPLES\fR for details.
98 .RE
101 .ne 2
103 \fB\fB-l\fR\fR
105 .sp .6
106 .RS 4n
107 Suppress sending a message to the system log daemon, \fBsyslogd\fR(1M) about
108 who executed \fBreboot\fR.
112 .ne 2
114 \fB\fB-n\fR\fR
116 .sp .6
117 .RS 4n
118 Avoid calling \fBsync\fR(2) and do not log the reboot to \fBsyslogd\fR(1M) or
119 to \fB/var/adm/wtmpx\fR. The kernel still attempts to sync filesystems prior to
120 reboot, except if the \fB-d\fR option is also present. If \fB-d\fR is used with
121 \fB-n\fR, the kernel does not attempt to sync file systems.
125 .ne 2
127 \fB\fB-p\fR\fR
129 .sp .6
130 .RS 4n
131 Reboot to prom. This flag can be used to reboot the system through firmware
132 without changing the default reboot behavior as denoted by the
133 \fBconfig/fastreboot_default\fR property setting in \fBsystem/boot-config\fR
134 service.
136 This option is currently available only on x86 systems. The \fB-p\fR and
137 \fB-f\fR options are mutually exclusive.
141 .ne 2
143 \fB\fB-q\fR\fR
145 .sp .6
146 .RS 4n
147 Quick. Reboot quickly and ungracefully, without shutting down running processes
148 first.
151 .SH OPERANDS
154 The following operands are supported:
156 .ne 2
158 \fB\fIboot_arguments\fR\fR
160 .sp .6
161 .RS 4n
162 An optional \fIboot_arguments\fR specifies arguments to the \fBuadmin\fR(2)
163 function that are passed to the boot program and kernel upon restart. The form
164 and list of arguments is described in the \fBboot\fR(1M) and \fBkernel\fR(1M)
165 man pages.. If the arguments are specified, whitespace between them is replaced
166 by single spaces unless the whitespace is quoted for the shell. If the
167 \fIboot_arguments\fR begin with a hyphen, they must be preceded by the \fB--\fR
168 delimiter (two hyphens) to denote the end of the \fBreboot\fR argument list.
171 .SH EXAMPLES
173 \fBExample 1 \fRPassing the \fB-r\fR and \fB-v\fR Arguments to \fBboot\fR
176 In the following example, the delimiter \fB--\fR (two hyphens) must be used to
177 separate the options of \fBreboot\fR from the arguments of \fBboot\fR(1M).
180 .in +2
182 example# \fBreboot -dl -- -rv\fR
184 .in -2
188 \fBExample 2 \fRRebooting Using a Specific Disk and Kernel
191 The following example reboots using a specific disk and kernel.
194 .in +2
196 example# \fBreboot disk1 kernel.test/unix\fR
198 .in -2
202 \fBExample 3 \fRFast Rebooting
205 The following examples use the \fB-f\fR option to perform fast reboots.
209 If service \fBsvc:/system/boot-config:default\fR is enabled and property
210 \fBconfig/fastreboot_default\fR is set to \fBtrue\fR, the \fB-f\fR option can
211 be omitted.
215 The following command reboots to the default entry in the GRUB (see
216 \fBgrub\fR(5)) menu file \fBmenu.lst\fR.
219 .in +2
221 example# \fBreboot -f\fR
223 .in -2
228 The following command reboots to another UFS root disk.
231 .in +2
233 example# \fBreboot -f -- '/dev/dsk/c1d0s0'\fR
235 .in -2
240 The following command reboots to another ZFS root pool.
243 .in +2
245 example# \fBreboot -f -- 'rpool/ROOT/root2'\fR
247 .in -2
252 The following command reboots to \fBmykernel\fR on the same disk with \fB-k\fR
253 option.
256 .in +2
258 example# \fBreboot -f -- '/platform/i86pc/mykernel/amd64/unix -k'\fR
260 .in -2
265 The following command reboots to \fBmykernel\fR off another root disk mounted
266 on \fB/mnt\fR.
269 .in +2
271 example# \fBreboot -f -- '/mnt/platform/i86pc/mykernel/amd64/unix -k'\fR
273 .in -2
278 The following command reboots to \fB/platform/i86pc/kernel/$ISADIR/unix\fR on
279 another boot environment named \fBsecond_root\fR.
282 .in +2
284 example# \fBreboot -f -e second_root\fR
286 .in -2
291 The following command reboots to the same kernel with \fB-kv\fR options.
294 .in +2
296 example# \fBreboot -f -- '-kv'\fR
298 .in -2
303 The following commands disable the fast-reboot-by-default behavior.
306 .in +2
308 example# \fBsvccfg -s "system/boot-config:default" \e\fR
309 \fBsetprop config/fastreboot_default=false\fR
310 example# \fBsvcadm refresh svc:/system/boot-config:default\fR
312 .in -2
317 The following commands re-enable the fast-reboot-by-default behavior.
320 .in +2
322 example# \fBsvccfg -s "system/boot-config:default" \e\fR
323 \fBsetprop config/fastreboot_default=true\fR
324 example# \fBsvcadm refresh svc:/system/boot-config:default\fR
326 .in -2
330 \fBExample 4 \fRRebooting to a Particular GRUB Menu
333 The following commands will reboot to entry \fB2\fR in the GRUB menu.
336 .in +2
338 example# \fBbootadm list-menu\fR
339   the location for the active GRUB menu is: /rpool/boot/grub/menu.lst
340   default 0
341   timeout 10
342   0 zfsbe1
343   1 zfsbe1 failsafe
344   2 zfsbe2
345   3 zfsbe2 Solaris xVM
346   4 zfsbe2 failsafe
347 example# \fBreboot 2\fR
349 .in -2
352 .SH FILES
354 .ne 2
356 \fB\fB/var/adm/wtmpx\fR\fR
358 .sp .6
359 .RS 4n
360 login accounting file
363 .SH SEE ALSO
366 \fBmdb\fR(1), \fBboot\fR(1M), \fBdumpadm\fR(1M), \fBfsck\fR(1M),
367 \fBhalt\fR(1M), \fBinit\fR(1M), \fBkernel\fR(1M), \fBshutdown\fR(1M),
368 \fBsvcadm\fR(1M), \fBsvccfg\fR(1M), \fBsync\fR(1M), \fBsyslogd\fR(1M),
369 \fBsync\fR(2), \fBuadmin\fR(2), \fBreboot\fR(3C), \fBattributes\fR(5),
370 \fBgrub\fR(5)
371 .SH NOTES
374 The \fBreboot\fR utility does not execute the scripts in
375 \fB/etc/rc\fInum\fR.d\fR or execute shutdown actions in \fBinittab\fR(4). To
376 ensure a complete shutdown of system services, use \fBshutdown\fR(1M) or
377 \fBinit\fR(1M) to reboot a Solaris system.