1b277773dSGordon Tetlow.\" Copyright (c) 2002 Gordon Tetlow 2b277773dSGordon Tetlow.\" All rights reserved. 3b277773dSGordon Tetlow.\" 4b277773dSGordon Tetlow.\" Redistribution and use in source and binary forms, with or without 5b277773dSGordon Tetlow.\" modification, are permitted provided that the following conditions 6b277773dSGordon Tetlow.\" are met: 7b277773dSGordon Tetlow.\" 1. Redistributions of source code must retain the above copyright 8b277773dSGordon Tetlow.\" notice, this list of conditions and the following disclaimer. 9b277773dSGordon Tetlow.\" 2. Redistributions in binary form must reproduce the above copyright 10b277773dSGordon Tetlow.\" notice, this list of conditions and the following disclaimer in the 11b277773dSGordon Tetlow.\" documentation and/or other materials provided with the distribution. 12b277773dSGordon Tetlow.\" 13b277773dSGordon Tetlow.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14b277773dSGordon Tetlow.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15b277773dSGordon Tetlow.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16b277773dSGordon Tetlow.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17b277773dSGordon Tetlow.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18b277773dSGordon Tetlow.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19b277773dSGordon Tetlow.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20b277773dSGordon Tetlow.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21b277773dSGordon Tetlow.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22b277773dSGordon Tetlow.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23b277773dSGordon Tetlow.\" SUCH DAMAGE. 24b277773dSGordon Tetlow.\" 25*075999d3SMateusz Piotrowski.Dd March 29, 2022 26b277773dSGordon Tetlow.Dt NEXTBOOT 8 27b277773dSGordon Tetlow.Os 28b277773dSGordon Tetlow.Sh NAME 29b277773dSGordon Tetlow.Nm nextboot 30afb09e9fSRuslan Ermilov.Nd "specify an alternate kernel and boot flags for the next reboot" 31b277773dSGordon Tetlow.Sh SYNOPSIS 32b277773dSGordon Tetlow.Nm 33ce2761f1SMark Johnston.Op Fl af 34b7fa166bSEd Maste.Op Fl e Ar variable=value 35b7fa166bSEd Maste.Op Fl k Ar kernel 36b277773dSGordon Tetlow.Op Fl o Ar options 37b277773dSGordon Tetlow.Nm 38b277773dSGordon Tetlow.Fl D 39b277773dSGordon Tetlow.Sh DESCRIPTION 40b277773dSGordon TetlowThe 41b277773dSGordon Tetlow.Nm 4253098f0eSAlexey Dokuchaevutility allows specifying some combination of an alternate kernel, boot 4353098f0eSAlexey Dokuchaevflags, and kernel environment for the next time the machine is booted. 44afb09e9fSRuslan ErmilovOnce the 45afb09e9fSRuslan Ermilov.Xr loader 8 4653098f0eSAlexey Dokuchaevloads in the new kernel information from the 4753098f0eSAlexey Dokuchaev.Pa /boot/nextboot.conf 4853098f0eSAlexey Dokuchaevfile, it is disabled so in case the new kernel hangs the machine, once 4953098f0eSAlexey Dokuchaevit is rebooted, the machine will automatically revert to its previous 50b277773dSGordon Tetlowconfiguration. 51b277773dSGordon Tetlow.Pp 52b277773dSGordon TetlowThe options are as follows: 53b277773dSGordon Tetlow.Bl -tag -width ".Fl o Ar options" 5485531560SMark Johnston.It Fl a 5585531560SMark JohnstonThis option causes 5685531560SMark Johnston.Nm 5785531560SMark Johnstonto append to an existing configuration in 5885531560SMark Johnston.Pa /boot/nextboot.conf . 5985531560SMark JohnstonBy default any existing configuration is overwritten. 60b277773dSGordon Tetlow.It Fl D 61b277773dSGordon TetlowInvoking 62b277773dSGordon Tetlow.Nm 63afb09e9fSRuslan Ermilovwith this 64afb09e9fSRuslan Ermilovoption removes an existing 65afb09e9fSRuslan Ermilov.Nm 66afb09e9fSRuslan Ermilovconfiguration. 67b7fa166bSEd Maste.It Fl e Ar variable=value 68b7fa166bSEd MasteThis option adds the provided variable and value to the kernel environment. 69b7fa166bSEd MasteThe value is quoted when written to the 70b7fa166bSEd Maste.Nm 71b7fa166bSEd Masteconfiguration. 72b277773dSGordon Tetlow.It Fl f 73afb09e9fSRuslan ErmilovThis 74b277773dSGordon Tetlowoption disables the sanity checking which checks if the kernel really exists 75afb09e9fSRuslan Ermilovbefore writing the 76afb09e9fSRuslan Ermilov.Nm 77afb09e9fSRuslan Ermilovconfiguration. 78b277773dSGordon Tetlow.It Fl k Ar kernel 79afb09e9fSRuslan ErmilovThis option specifies a kernel directory relative to 80b277773dSGordon Tetlow.Pa /boot 81b277773dSGordon Tetlowto load the kernel and any modules from. 82b277773dSGordon Tetlow.It Fl o Ar options 83afb09e9fSRuslan ErmilovThis option 84b277773dSGordon Tetlowallows the passing of kernel flags for the next boot. 85b277773dSGordon Tetlow.El 86b277773dSGordon Tetlow.Sh FILES 87b277773dSGordon Tetlow.Bl -tag -width ".Pa /boot/nextboot.conf" -compact 88b277773dSGordon Tetlow.It Pa /boot/nextboot.conf 89afb09e9fSRuslan ErmilovThe configuration file that the 90afb09e9fSRuslan Ermilov.Nm 91afb09e9fSRuslan Ermilovconfiguration is written into. 92b277773dSGordon Tetlow.El 93b277773dSGordon Tetlow.Sh EXAMPLES 94afb09e9fSRuslan ErmilovTo boot the 95afb09e9fSRuslan Ermilov.Pa GENERIC 96afb09e9fSRuslan Ermilovkernel with the 97b277773dSGordon Tetlow.Nm 98b277773dSGordon Tetlowcommand: 99b277773dSGordon Tetlow.Pp 100b277773dSGordon Tetlow.Dl "nextboot -k GENERIC" 101b277773dSGordon Tetlow.Pp 102b277773dSGordon TetlowTo enable into single user mode with the normal kernel: 103b277773dSGordon Tetlow.Pp 104b277773dSGordon Tetlow.Dl "nextboot -o ""-s"" -k kernel" 105b277773dSGordon Tetlow.Pp 106b277773dSGordon TetlowTo remove an existing nextboot configuration: 107b277773dSGordon Tetlow.Pp 108b277773dSGordon Tetlow.Dl "nextboot -D" 109b277773dSGordon Tetlow.Sh SEE ALSO 110b277773dSGordon Tetlow.Xr boot 8 , 111*075999d3SMateusz Piotrowski.Xr freebsd-update 8 , 112b277773dSGordon Tetlow.Xr loader 8 113b277773dSGordon Tetlow.Sh HISTORY 114b277773dSGordon TetlowThe original 115b277773dSGordon Tetlow.Nm 116b277773dSGordon Tetlowmanual page first appeared in 117b277773dSGordon Tetlow.Fx 2.2 . 118b277773dSGordon TetlowIt used a very different interface to achieve similar results. 119b277773dSGordon Tetlow.Pp 120b277773dSGordon TetlowThe current incarnation of 121b277773dSGordon Tetlow.Nm 122b277773dSGordon Tetlowappeared in 123b277773dSGordon Tetlow.Fx 5.0 . 124b277773dSGordon Tetlow.Sh AUTHORS 125b277773dSGordon TetlowThis manual page was written by 126bd0891ceSBaptiste Daroussin.An Gordon Tetlow Aq Mt gordon@FreeBSD.org . 127b277773dSGordon Tetlow.Sh BUGS 128afb09e9fSRuslan ErmilovThe 129afb09e9fSRuslan Ermilov.Nm 130afb09e9fSRuslan Ermilovcode is implemented in the 131afb09e9fSRuslan Ermilov.Xr loader 8 . 1324b85a12fSUlrich SpörleinIt is not the most thoroughly tested code. 133afb09e9fSRuslan ErmilovIt is also my first attempt to write in Forth. 134b277773dSGordon Tetlow.Pp 135b277773dSGordon TetlowFinally, it does some evil things like writing to the file system before it 136afb09e9fSRuslan Ermilovhas been checked. 137afb09e9fSRuslan ErmilovIf it scrambles your file system, do not blame me. 138