18fae3551SRodney W. Grimes.\" Copyright (c) 1990, 1991, 1993 28fae3551SRodney W. Grimes.\" The Regents of the University of California. All rights reserved. 38fae3551SRodney W. Grimes.\" 48fae3551SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without 58fae3551SRodney W. Grimes.\" modification, are permitted provided that the following conditions 68fae3551SRodney W. Grimes.\" are met: 78fae3551SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright 88fae3551SRodney W. Grimes.\" notice, this list of conditions and the following disclaimer. 98fae3551SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright 108fae3551SRodney W. Grimes.\" notice, this list of conditions and the following disclaimer in the 118fae3551SRodney W. Grimes.\" documentation and/or other materials provided with the distribution. 128fae3551SRodney W. Grimes.\" 4. Neither the name of the University nor the names of its contributors 138fae3551SRodney W. Grimes.\" may be used to endorse or promote products derived from this software 148fae3551SRodney W. Grimes.\" without specific prior written permission. 158fae3551SRodney W. Grimes.\" 168fae3551SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 178fae3551SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 188fae3551SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 198fae3551SRodney W. Grimes.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 208fae3551SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 218fae3551SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 228fae3551SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 238fae3551SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 248fae3551SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 258fae3551SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 268fae3551SRodney W. Grimes.\" SUCH DAMAGE. 278fae3551SRodney W. Grimes.\" 288fae3551SRodney W. Grimes.\" @(#)reboot.8 8.1 (Berkeley) 6/9/93 297f3dea24SPeter Wemm.\" $FreeBSD$ 308fae3551SRodney W. Grimes.\" 316237ce08SSteven Hartland.Dd Dec 12, 2015 328fae3551SRodney W. Grimes.Dt REBOOT 8 338fae3551SRodney W. Grimes.Os 348fae3551SRodney W. Grimes.Sh NAME 358fae3551SRodney W. Grimes.Nm reboot , 3608ad04ceSAlexey Zelkin.Nm halt , 3708ad04ceSAlexey Zelkin.Nm fastboot , 3808ad04ceSAlexey Zelkin.Nm fasthalt 3908ad04ceSAlexey Zelkin.Nd stopping and restarting the system 408fae3551SRodney W. Grimes.Sh SYNOPSIS 418fae3551SRodney W. Grimes.Nm halt 426237ce08SSteven Hartland.Op Fl lNnpq 431de372dcSWes Peters.Op Fl k Ar kernel 447c7fb079SRuslan Ermilov.Nm 456237ce08SSteven Hartland.Op Fl dlNnpqr 461de372dcSWes Peters.Op Fl k Ar kernel 477f4b19d6SDavid Greenman.Nm fasthalt 486237ce08SSteven Hartland.Op Fl lNnpq 491de372dcSWes Peters.Op Fl k Ar kernel 507f4b19d6SDavid Greenman.Nm fastboot 516237ce08SSteven Hartland.Op Fl dlNnpq 521de372dcSWes Peters.Op Fl k Ar kernel 538fae3551SRodney W. Grimes.Sh DESCRIPTION 548fae3551SRodney W. GrimesThe 558fae3551SRodney W. Grimes.Nm halt 568fae3551SRodney W. Grimesand 579448def9SPhilippe Charnier.Nm 588fae3551SRodney W. Grimesutilities flush the file system cache to disk, send all running processes 59d44b4fd2SRuslan Ermilova 60d44b4fd2SRuslan Ermilov.Dv SIGTERM 61d44b4fd2SRuslan Ermilov(and subsequently a 62d44b4fd2SRuslan Ermilov.Dv SIGKILL ) 63d44b4fd2SRuslan Ermilovand, respectively, halt or restart the system. 640806dd92SEd SchoutenThe action is logged, including entering a shutdown record into the user 650806dd92SEd Schoutenaccounting database. 668fae3551SRodney W. Grimes.Pp 678fae3551SRodney W. GrimesThe options are as follows: 689448def9SPhilippe Charnier.Bl -tag -width indent 6985c981ccSJohn Polstra.It Fl d 7010cb9bd3SRuslan ErmilovThe system is requested to create a crash dump. 7110cb9bd3SRuslan ErmilovThis option is 7285c981ccSJohn Polstrasupported only when rebooting, and it has no effect unless a dump 7385c981ccSJohn Polstradevice has previously been specified with 7485c981ccSJohn Polstra.Xr dumpon 8 . 751de372dcSWes Peters.It Fl k Ar kernel 761de372dcSWes PetersBoot the specified 771de372dcSWes Peters.Ar kernel 7810cb9bd3SRuslan Ermilovon the next system boot. 7910cb9bd3SRuslan ErmilovIf the kernel boots successfully, the 801de372dcSWes Peters.Em default 8157bd0fc6SJens Schweikhardtkernel will be booted on successive boots, this is a one-shot option. 821de372dcSWes PetersIf the boot fails, the system will continue attempting to boot 831de372dcSWes Peters.Ar kernel 841de372dcSWes Petersuntil the boot process is interrupted and a valid kernel booted. 851de372dcSWes PetersThis may change in the future. 860ee76202SNik Clayton.It Fl l 870ee76202SNik ClaytonThe halt or reboot is 880ee76202SNik Clayton.Em not 890ee76202SNik Claytonlogged to the system log. 900ee76202SNik ClaytonThis option is intended for applications such as 910ee76202SNik Clayton.Xr shutdown 8 , 920ee76202SNik Claytonthat call 930ee76202SNik Clayton.Nm 940ee76202SNik Claytonor 950ee76202SNik Clayton.Nm halt 960ee76202SNik Claytonand log this themselves. 976237ce08SSteven Hartland.It Fl N 986237ce08SSteven HartlandThe file system cache is not flushed during the initial process clean-up, 996237ce08SSteven Hartlandhowever the kernel level 1006237ce08SSteven Hartland.Xr reboot 2 1016237ce08SSteven Hartlandis still processed with a sync. 1026237ce08SSteven HartlandThis option can be useful for performing a 1036237ce08SSteven Hartland.Dq best-effort 1046237ce08SSteven Hartlandreboot when devices might be unavailable. 1056237ce08SSteven HartlandThis can happen when devices have been disconnected, such as with 1066237ce08SSteven Hartland.Xr iscsi 4 . 1078fae3551SRodney W. Grimes.It Fl n 1089448def9SPhilippe CharnierThe file system cache is not flushed. 1098fae3551SRodney W. GrimesThis option should probably not be used. 11047be7466SJulian Elischer.It Fl p 1112aeb6b27SThomas QuinotThe system will turn off the power if it can. 1122aeb6b27SThomas QuinotIf the power down action fails, the system 1132aeb6b27SThomas Quinotwill halt or reboot normally, depending on whether 1142aeb6b27SThomas Quinot.Nm halt 1152aeb6b27SThomas Quinotor 1168573f805SRuslan Ermilov.Nm 1172aeb6b27SThomas Quinotwas called. 1188d646af5SRuslan Ermilov.It Fl q 1198d646af5SRuslan ErmilovThe system is halted or restarted quickly and ungracefully, and only 1208d646af5SRuslan Ermilovthe flushing of the file system cache is performed (if the 1218d646af5SRuslan Ermilov.Fl n 1228d646af5SRuslan Ermilovoption is not specified). 1238d646af5SRuslan ErmilovThis option should probably not be used. 1243f5ac575SEdward Tomasz Napierala.It Fl r 1253f5ac575SEdward Tomasz NapieralaThe system kills all processes, unmounts all filesystems, mounts the new 1263f5ac575SEdward Tomasz Napieralaroot filesystem, and begins the usual startup sequence. 1273f5ac575SEdward Tomasz NapieralaAfter changing vfs.root.mountfrom with 128*0ca11f9dSEdward Tomasz Napierala.Xr kenv 1 , 1293f5ac575SEdward Tomasz Napierala.Nm Fl r 1303f5ac575SEdward Tomasz Napieralacan be used to change the root filesystem while preserving kernel state. 1318fae3551SRodney W. Grimes.El 1328fae3551SRodney W. Grimes.Pp 1337f4b19d6SDavid GreenmanThe 1347f4b19d6SDavid Greenman.Nm fasthalt 1357f4b19d6SDavid Greenmanand 1367f4b19d6SDavid Greenman.Nm fastboot 1377f4b19d6SDavid Greenmanutilities are nothing more than aliases for the 1387f4b19d6SDavid Greenman.Nm halt 1397f4b19d6SDavid Greenmanand 1409448def9SPhilippe Charnier.Nm 1417f4b19d6SDavid Greenmanutilities. 1427f4b19d6SDavid Greenman.Pp 1438fae3551SRodney W. GrimesNormally, the 1448fae3551SRodney W. Grimes.Xr shutdown 8 1458fae3551SRodney W. Grimesutility is used when the system needs to be halted or restarted, giving 146d44b4fd2SRuslan Ermilovusers advance warning of their impending doom and cleanly terminating 147d44b4fd2SRuslan Ermilovspecific programs. 1483f5ac575SEdward Tomasz Napierala.Sh EXAMPLES 1493f5ac575SEdward Tomasz NapieralaReplace current root filesystem with UFS mounted from 1503f5ac575SEdward Tomasz Napierala.Pa /dev/ada0s1a : 1513f5ac575SEdward Tomasz Napierala.Bd -literal -offset indent 1523f5ac575SEdward Tomasz Napieralakenv vfs.root.mountfrom=ufs:/dev/ada0s1a 1533f5ac575SEdward Tomasz Napieralareboot -r 1543f5ac575SEdward Tomasz Napierala.Ed 1558fae3551SRodney W. Grimes.Sh SEE ALSO 156*0ca11f9dSEdward Tomasz Napierala.Xr kenv 1 , 1575a25553cSEd Schouten.Xr getutxent 3 , 1588fae3551SRodney W. Grimes.Xr boot 8 , 15985c981ccSJohn Polstra.Xr dumpon 8 , 160f7eaf827SJoseph Koshy.Xr nextboot 8 , 16185c981ccSJohn Polstra.Xr savecore 8 , 16278b0b234SMike Pritchard.Xr shutdown 8 , 16378b0b234SMike Pritchard.Xr sync 8 1648fae3551SRodney W. Grimes.Sh HISTORY 1658fae3551SRodney W. GrimesA 1669448def9SPhilippe Charnier.Nm 167629e80efSPhilippe Charnierutility appeared in 1688fae3551SRodney W. Grimes.At v6 . 169