2002-11-04 17:35:22 +00:00
|
|
|
.\" Copyright (c) 2002 Gordon Tetlow
|
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
|
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
.\" SUCH DAMAGE.
|
|
|
|
.\"
|
|
|
|
.\" $FreeBSD$
|
|
|
|
.\"
|
2012-01-31 15:32:05 +00:00
|
|
|
.Dd January 31, 2012
|
2002-11-04 17:35:22 +00:00
|
|
|
.Dt NEXTBOOT 8
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm nextboot
|
2002-12-12 13:40:31 +00:00
|
|
|
.Nd "specify an alternate kernel and boot flags for the next reboot"
|
2002-11-04 17:35:22 +00:00
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm
|
2012-01-31 15:32:05 +00:00
|
|
|
.Op Fl e Ar variable=value
|
2002-11-04 17:35:22 +00:00
|
|
|
.Op Fl f
|
2012-01-31 15:32:05 +00:00
|
|
|
.Op Fl k Ar kernel
|
2002-11-04 17:35:22 +00:00
|
|
|
.Op Fl o Ar options
|
|
|
|
.Nm
|
|
|
|
.Fl D
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm
|
2012-01-31 15:32:05 +00:00
|
|
|
utility allows specifying some combination of an alternate kernel, boot flags
|
|
|
|
and kernel environment for the
|
2002-12-12 13:40:31 +00:00
|
|
|
next time the machine is booted.
|
|
|
|
Once the
|
|
|
|
.Xr loader 8
|
|
|
|
loads in the new kernel
|
2002-11-04 17:35:22 +00:00
|
|
|
information, it is deleted so in case the new kernel hangs the machine,
|
2002-11-07 16:00:48 +00:00
|
|
|
once it is rebooted, the machine will automatically revert to its previous
|
2002-11-04 17:35:22 +00:00
|
|
|
configuration.
|
|
|
|
.Pp
|
|
|
|
The options are as follows:
|
|
|
|
.Bl -tag -width ".Fl o Ar options"
|
|
|
|
.It Fl D
|
|
|
|
Invoking
|
|
|
|
.Nm
|
2002-12-12 13:40:31 +00:00
|
|
|
with this
|
|
|
|
option removes an existing
|
|
|
|
.Nm
|
|
|
|
configuration.
|
2012-01-31 15:32:05 +00:00
|
|
|
.It Fl e Ar variable=value
|
|
|
|
This option adds the provided variable and value to the kernel environment.
|
|
|
|
The value is quoted when written to the
|
|
|
|
.Nm
|
|
|
|
configuration.
|
2002-11-04 17:35:22 +00:00
|
|
|
.It Fl f
|
2002-12-12 13:40:31 +00:00
|
|
|
This
|
2002-11-04 17:35:22 +00:00
|
|
|
option disables the sanity checking which checks if the kernel really exists
|
2002-12-12 13:40:31 +00:00
|
|
|
before writing the
|
|
|
|
.Nm
|
|
|
|
configuration.
|
2002-11-04 17:35:22 +00:00
|
|
|
.It Fl k Ar kernel
|
2002-12-12 13:40:31 +00:00
|
|
|
This option specifies a kernel directory relative to
|
2002-11-04 17:35:22 +00:00
|
|
|
.Pa /boot
|
|
|
|
to load the kernel and any modules from.
|
|
|
|
.It Fl o Ar options
|
2002-12-12 13:40:31 +00:00
|
|
|
This option
|
|
|
|
allows the passing of kernel flags for the next boot.
|
2002-11-04 17:35:22 +00:00
|
|
|
.El
|
|
|
|
.Sh FILES
|
|
|
|
.Bl -tag -width ".Pa /boot/nextboot.conf" -compact
|
|
|
|
.It Pa /boot/nextboot.conf
|
2002-12-12 13:40:31 +00:00
|
|
|
The configuration file that the
|
|
|
|
.Nm
|
|
|
|
configuration is written into.
|
2002-11-04 17:35:22 +00:00
|
|
|
.El
|
|
|
|
.Sh EXAMPLES
|
2002-12-12 13:40:31 +00:00
|
|
|
To boot the
|
|
|
|
.Pa GENERIC
|
|
|
|
kernel with the
|
2002-11-04 17:35:22 +00:00
|
|
|
.Nm
|
|
|
|
command:
|
|
|
|
.Pp
|
|
|
|
.Dl "nextboot -k GENERIC"
|
|
|
|
.Pp
|
|
|
|
To enable into single user mode with the normal kernel:
|
|
|
|
.Pp
|
|
|
|
.Dl "nextboot -o ""-s"" -k kernel"
|
|
|
|
.Pp
|
|
|
|
To remove an existing nextboot configuration:
|
|
|
|
.Pp
|
|
|
|
.Dl "nextboot -D"
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr boot 8 ,
|
|
|
|
.Xr loader 8
|
|
|
|
.Sh HISTORY
|
|
|
|
The original
|
|
|
|
.Nm
|
|
|
|
manual page first appeared in
|
|
|
|
.Fx 2.2 .
|
|
|
|
It used a very different interface to achieve similar results.
|
|
|
|
.Pp
|
|
|
|
The current incarnation of
|
|
|
|
.Nm
|
|
|
|
appeared in
|
|
|
|
.Fx 5.0 .
|
|
|
|
.Sh AUTHORS
|
|
|
|
This manual page was written by
|
|
|
|
.An Gordon Tetlow Aq gordon@FreeBSD.org .
|
|
|
|
.Sh BUGS
|
2002-12-12 13:40:31 +00:00
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
code is implemented in the
|
|
|
|
.Xr loader 8 .
|
2012-01-07 16:09:33 +00:00
|
|
|
It is not the most thoroughly tested code.
|
2002-12-12 13:40:31 +00:00
|
|
|
It is also my first attempt to write in Forth.
|
2002-11-04 17:35:22 +00:00
|
|
|
.Pp
|
2002-12-12 17:26:04 +00:00
|
|
|
Finally, it does some evil things like writing to the file system before it
|
2002-12-12 13:40:31 +00:00
|
|
|
has been checked.
|
2002-12-12 17:26:04 +00:00
|
|
|
If it scrambles your file system, do not blame me.
|