Commit graph

215 commits

Author SHA1 Message Date
Brad Davis 71688f3b71 Save others some forehead damange by noting that -r require tmpfs.
Reviewed by:	bapt
2017-12-20 15:21:29 +00:00
Pedro F. Giffuni 1de7b4b805 various: general adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

No functional change intended.
2017-11-27 15:37:16 +00:00
Pedro F. Giffuni 8a16b7a18f General further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.
2017-11-20 19:49:47 +00:00
Warner Losh 25fd081525 Add -c to the usage statements.
Submitted by: Maxim Konovalov
2017-10-31 03:39:36 +00:00
Bryan Drewery ea825d0274 DIRDEPS_BUILD: Update dependencies.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:07:04 +00:00
Warner Losh 7d7d9013f1 Add power cycle support to reboot/halt as -c.
When -c is specified, the system will be power cycled if the
underlying hardware supports it. Otherwise the system will be halted
or rebooted depending on which command was used.

Sponsored by: Netflix
2017-10-25 15:30:35 +00:00
Edward Tomasz Napierala 3d6a5b1434 .Xr mount.conf(5) from boot(8).
MFC after:	2 weeks
2017-05-28 18:13:44 +00:00
Edward Tomasz Napierala 2132a4ef05 Document how to use reroot with NFS.
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2017-03-19 15:49:51 +00:00
Warner Losh fbbd9655e5 Renumber copyright clause 4
Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by:	Jan Schaumann <jschauma@stevens.edu>
Pull Request:	https://github.com/freebsd/freebsd/pull/96
2017-02-28 23:42:47 +00:00
Allan Jude 9dd4cc10f9 sbin/reboot/reboot.8: Amend HISTORY
A standalone reboot utility showed up in 4.0BSD, in AT&T UNIX init has a
case for reboot and is present in the version shipped with V5

either way, current entry is incorrect.

PR:		212548
Submitted by:	Sevan Janiyan <venture37@geeklan.co.uk>
2016-09-16 04:11:04 +00:00
Renato Botelho 89d18e14f1 Add missing parameters -N and -l to reroot and halt usage()
Approved by:	bapt
Sponsored by:	Rubicon Communications (Netgate)
Differential Revision:	https://reviews.freebsd.org/D6173
2016-05-06 20:49:14 +00:00
Glen Barber 0edd2576c0 MFH
Sponsored by:	The FreeBSD Foundation
2016-04-16 02:32:12 +00:00
Mark Johnston ce2761f128 Include -a in the nextboot(8) usage string.
X-MFC-With: r297772
2016-04-14 18:03:55 +00:00
Glen Barber 876d357fa7 MFH
Sponsored by:	The FreeBSD Foundation
2016-04-11 15:24:59 +00:00
Mark Johnston 8553156023 nextboot(8): add a -a option for appending to a configuration.
By default, a nextboot invocation will clobber any existing nextboot
configuration.

MFC after:	2 weeks
Relnotes:	yes
2016-04-10 01:25:12 +00:00
Glen Barber 52259a98ad MFH
Sponsored by:	The FreeBSD Foundation
2016-03-02 16:14:46 +00:00
Edward Tomasz Napierala 0ca11f9ded kenv(8) -> kenv(1)
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-02-29 17:22:34 +00:00
Glen Barber 406d87b1c3 Explicitly add more files to the 'runtime' package.
Sponsored by:	The FreeBSD Foundation
2016-02-09 20:19:31 +00:00
Steven Hartland 0f79b5d72b Fix use of uninitialised Nflag
Initialise Nflag to 0 preventing use of uninitialised value.

Reported by:	uqs
MFC after:	1 week
X-MFC-With:	r292266
Sponsored by:	Multiplay
Differential Revision:	https://reviews.freebsd.org/D4449
2015-12-30 14:57:42 +00:00
Steven Hartland 6237ce0841 Add flag to disable inital reboot(8) userland sync
Add -N flag to reboot(8) which bypasses the userland sync(2) during
reboot(8) while still allow the kernel sync during the reboot(2) syscall
to occur.

An example use of this is when rebooting with disconnected iSCSI sessions
which would otherwise cause the reboot to hang on BIOs that will never
complete.

Reviewed by:	bjk
MFC after:	2 weeks
Sponsored by:	Multiplay
Differential Revision:	https://reviews.freebsd.org/D4449
2015-12-15 14:17:07 +00:00
Edward Tomasz Napierala 3f5ac575ea Userspace part of reroot support. This makes it possible to change
the root filesystem without full reboot, using "reboot -r". This can
be used to to eg. boot from a temporary md_image preloaded by loader(8),
setup an iSCSI session, and continue booting from rootfs mounted over
iSCSI.

Reviewed by:	kib@, bapt@
MFC after:	1 month
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D3693
2015-11-08 17:33:48 +00:00
Edward Tomasz Napierala b8c19fd719 It's 2015, and some people are still trying to use fdisk and then
go asking what debug flags to set for GEOM to make it work.  Advice
them to use gpart(8) instead.

Something similar should probably done with disklabel,
but I need to rewrite the disklabel examples first.

Reviewed by:	wblock@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D3315
2015-09-02 14:08:43 +00:00
Christian Brueffer 99d43aee11 Fix a few mandoc warnings.
MFC after:	1 week
2015-08-12 10:34:05 +00:00
Simon J. Gerraty ccfb965433 Add META_MODE support.
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.

Still need to add real targets under targets/ to build packages.

Differential Revision:       D2796
Reviewed by: brooks imp
2015-06-13 19:20:56 +00:00
Simon J. Gerraty 44d314f704 dirdeps.mk now sets DEP_RELDIR 2015-06-08 23:35:17 +00:00
Simon J. Gerraty 98e0ffaefb Merge sync of head 2015-05-27 01:19:58 +00:00
Allan Jude 1596158c05 Document that nextboot(8) doesn't work as expected with ZFS
Differential Revision:	https://reviews.freebsd.org/D2087
Submitted by:	feld (request)
Reviewed by:	feld
Approved by:	bcr (mentor)
Sponsored by:	ScaleEngine Inc.
2015-03-17 20:15:49 +00:00
Simon J. Gerraty 9268022b74 Merge from head@274682 2014-11-19 01:07:58 +00:00
Ed Maste 9d1334e076 Reference uefi(8) from i386 boot(8)
Suggested by trasz.

Differential Revision: https://reviews.freebsd.org/D1162
2014-11-14 20:12:33 +00:00
Simon J. Gerraty ee7b0571c2 Merge head from 7/28 2014-08-19 06:50:54 +00:00
Baptiste Daroussin bd0891ceb3 use .Mt to mark up email addresses consistently (part1)
PR:		191174
Submitted by:	Franco Fichtner  <franco@lastsummer.de>
2014-06-20 09:40:43 +00:00
Joel Dahl b6829dc82a Minor mdoc improvements. 2014-06-06 19:00:43 +00:00
Simon J. Gerraty fae50821ae Updated dependencies 2014-05-16 14:09:51 +00:00
Simon J. Gerraty 76b28ad6ab Updated dependencies 2014-05-10 05:16:28 +00:00
Simon J. Gerraty d1d0158641 Merge from head 2013-09-05 20:18:59 +00:00
Warren Block 42c916d7ee Add a new gptboot(8) man page. Factor out the redundant information
in gpart(8) and boot(8), adding references to gptboot(8) in both.

Reviewed by:	jhb, ae, pjd, Paul Schenkeveld <bsdcan@psconsult.nl>, david_a_bright@dell.com (portions), gjb
MFC after:	1 week
2013-07-01 22:38:36 +00:00
Simon J. Gerraty 69e6d7b75e sync from head 2013-04-12 20:48:55 +00:00
Simon J. Gerraty 7cf3a1c6b2 Updated dependencies 2013-03-11 17:21:52 +00:00
Nick Hibma 0e52eb5ac5 Clarify that overriding the -h/-D flags through flags in device.hints
only works for sio(4) but not for uart(4) which no longer has this flag.
2013-02-26 23:18:35 +00:00
Simon J. Gerraty f5f7c05209 Updated dependencies 2013-02-16 01:23:54 +00:00
Marcel Moolenaar 7750ad47a9 Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
Requested by: Simon Gerraty <sjg@juniper.net>
2012-08-22 19:25:57 +00:00
Ed Maste 9a50115921 Add BSD copyright notice.
Approved by:	gordon@
2012-02-07 14:06:30 +00:00
Ed Maste b7fa166b60 Add -e to set arbitrary kernel environment variables.
Nextboot(8) can now set any combination of kernel name (-k), kernel
options (-o), and environment strings (-e).  As a result of this change
-k also becomes optional.

Reviewed by:	freebsd-current (Ian Lepore, pluknet@, jhb@)
2012-01-31 15:32:05 +00:00
Ulrich Spörlein 4b85a12f71 Spelling fixes for sbin/ 2012-01-07 16:09:33 +00:00
Ed Schouten e802a0b31e Let reboot(8) use getprogname() to compare the program name.
While there, mark the global variable dohalt static, as reboot(8) only
consists of a single C file.
2011-12-11 11:42:44 +00:00
Sergey Kandaurov 603c2b9b9b Remove vestiges of disklabel(5).
Reviewed by:	uqs
MFC after:	5 days
2011-04-14 08:53:04 +00:00
Ed Schouten 5a25553cc3 Remove stale reference to wtmp(5).
Reported by:	pluknet
2010-10-11 20:17:23 +00:00
Andriy Gapon aa997bb947 nextboot: warn about limitations of /boot/nextboot.conf on ZFS
MFC after:	1 week
2010-09-17 09:50:36 +00:00
Benedict Reuschling d3f4dbc513 Let boot(8) refer to the uart(4) serial driver, which is the replacement
for the obsolete sio(4) driver.

PR:             docs/144498
Submitted by:   Bruce Cran (bruce at cran dot org dot uk)
Approved by:    marcel
MFC after:      2 weeks
2010-07-04 20:39:07 +00:00
Ed Schouten 0806dd9238 Remove stale references to utmp(5) and its corresponding filenames.
I removed utmp and its manpage, but not other manpages referring to it.
2010-01-21 17:25:12 +00:00
Ed Schouten bf8959b05d Port the remaining apps in sbin/ to utmpx; only reboot(8). 2010-01-13 17:59:23 +00:00
Ed Schouten 88a8f792b6 Add forgotten `void' keyword. This function has no arguments. 2009-12-29 09:13:20 +00:00
Ed Schouten 14c69f2136 Let init(8) and reboot(8) use utmpx to log wtmp entries.
logwtmp() gets called with the raw strings that are written to disk. For
regular user entries, this isn't too bad, but when booting/shutting
down, the contents get rather cryptic.

Just call the standardized pututxline().
2009-12-05 20:26:55 +00:00
Dag-Erling Smørgrav c574558f28 More rational usage() 2009-11-10 09:44:55 +00:00
Ruslan Ermilov 106d839190 Switch the default WARNS level for sbin/ to 6.
Submitted by:	Ulrich Spörlein
2009-10-19 16:00:24 +00:00
Bjoern A. Zeeb c09a6b1ab6 Remove and unused variable.
Submitted by:	Christoph Mallon christoph.mallon@gmx.de
MFC after:	2 weeks
2009-01-31 13:48:15 +00:00
Daniel Gerzo 75803d7f94 - Sweep the boot(8) man page after addition of boot.config(5).
Reviewed by: keramida
Approved by: re (kensmith)
2007-08-18 07:58:36 +00:00
Joseph Koshy f7eaf827ab Cross-reference nextboot(8).
MFC after:	3 days
2006-11-22 13:12:34 +00:00
Bruce M Simpson d8f7093860 Block a variety of signals which may afffect reboot(8), before killing
init(8), to avoid losing a race to them and dying before being able
to call reboot(2).

PR:		bin/64664
Submitted by:	maxim
Obtained from:	NetBSD
MFC after:	30 days
2006-08-02 13:05:38 +00:00
Bruce M Simpson b08d1553f4 Block SIGHUP before killing init(8), to avoid a race condition which may
kill the current process and hang the system when attempting reboot.

PR:		bin/64664
Reviewed by:	ssouhal, phk (historic)
MFC after:	30 days
2006-08-02 12:42:20 +00:00
Maxim Konovalov 4d05699b2f o Describe what actually boot(8) -m mutes.
PR:		docs/67893
Submitted by:	Chris Pepper, Daniel Gerzo
MFC after:	2 weeks
2006-04-18 19:00:02 +00:00
Wes Peters 52488123f3 Revert previous change, "getopts" (with an 's') is a builtin in
/bin/sh.
2006-01-18 04:48:45 +00:00
Wes Peters 8812100321 Remove dependency on getopts because it is on /usr and we want to
use 'nextboot -D' in rc.  Option parsing cribbed from vgrind.sh.
2006-01-16 16:18:54 +00:00
Ruslan Ermilov 4e9e907d63 -mdoc sweep. 2005-11-18 10:36:29 +00:00
Ruslan Ermilov 389ec19476 Do not install boot_i386.8 on all architectures. 2005-11-17 09:39:36 +00:00
Maxim Sobolev 50d89fc56a Add new option `q', which makes second stage loader quiet unless autoboot
is disabled or fails.

MFC after:	1 week
2005-10-16 01:55:35 +00:00
Yaroslav Tykhiy 08b9134350 Replace "/etc/make.conf" with references to make.conf(5)
where applicable.  The main reason for this change is that
the location of make.conf is not constant and can be
modified via __MAKE_CONF.  This change also improves
hyper-text linkage in our manpages.

MFC after:	2 weeks
2005-10-10 14:55:59 +00:00
Ruslan Ermilov 8c81e13758 Simplified markup. 2005-09-28 06:57:56 +00:00
Ian Dowse a00a259113 Add the ability to specify the boot2 serial console speed in
/boot.config or on the "boot:" prompt line via a "-S<speed>" flag,
e.g. "-h -S19200". This adds about 50 bytes to the size of boot2
and required a few other small changes to limit the size impact.
This changes only affects boot2; there are further loader changes
to follow.
2005-08-18 00:42:45 +00:00
Giorgos Keramidas 497dd0f938 Spell "partition" correctly.
PR:		docs/84198
Submitted by:	Gary W. Swearingen
MFC after:	3 days
2005-07-28 10:48:07 +00:00
Pawel Jakub Dawidek 3edf7a78b7 Truncate nextboot.conf file on creation, so existing garbage will be removed.
Submitted by:	Gary Allan <dragonfly@gallan.plus.com>
Obtained from:	DragonFlyBSD
MFC after:	3 days
2005-03-21 23:44:04 +00:00
Ruslan Ermilov 8d646af581 Sync program's usage() with manpage's SYNOPSIS. 2005-02-10 09:19:34 +00:00
Xin LI 36737a0b77 Code style tweaks: Use static and const where suitable. 2005-01-25 08:24:06 +00:00
Xin LI faa0ecdd5d The kernel specified in main() of reboot(8) will be initialized
with -k option and never be used without kflag.  This confuses
gcc because we set "kflag" at the same time with "kernel", but
the logic is not that apparant for gcc.

Since we can initialize "kernel" to NULL then know if "k" option
is set through determining whether it is still NULL, don't try
to have gcc to guess why we are connecting "kflag" with "kernel"
and use "kernel" directly in place of kflag.

Bump WARNS?= from 2 to 6
2005-01-25 08:14:00 +00:00
Ruslan Ermilov 6087df9e8b Sort sections. 2005-01-18 10:09:38 +00:00
Ruslan Ermilov 214144704b Scheduled mdoc(7) sweep. 2005-01-10 16:17:34 +00:00
Ruslan Ermilov 52501c5ede Fixed desctiptions of some options:
- Document better what the -C option means.
- The -c option is currently a no-op.
- The -D and -h options do not allow switching between
  single/dual console modes and internal/video consoles.
  (This used to be true for the old biosdisk boot code,
  but now they just force the multiple consoles mode and
  serial console, respectively.)
2004-09-30 09:59:44 +00:00
Ruslan Ermilov 295a9701bb FreeBSD has full support for multiple consoles since 2001. 2004-09-30 09:15:33 +00:00
Brooks Davis 0513a60b6b Sort the SEE ALSO list correctly. Update the document date.
Reported by:	ru
2004-09-23 15:26:01 +00:00
Brooks Davis 9f4709d67c Refrence bsdlabel.8 and bsdlabel.5 rather then the obsolete disklabel.8
and disklabel.5.  Refrencing bsdlabel.5 is somewhat bogus as it is not
connected to the build and is mostly unwritten at this point.

Reported by:	Matthias Andree <matthias.andree at web.de>
PR:		docs/72020
2004-09-23 04:57:58 +00:00
Mike Silbersack 9e09a91233 Clarify boot.8 (i386 version) a bit, so that people know
where boot.config needs to reside.  Also change /kernel
to /boot/loader, as that is the apparent default now.  This
man page probably requires more updates.
2004-07-18 21:39:45 +00:00
Ruslan Ermilov 9806e23132 Mechanically kill hard sentence breaks. 2004-07-02 21:45:06 +00:00
Mark Murray 4c723140a4 Remove advertising clause from University of California Regent's license,
per letter dated July 22, 1999.

Approved by: core, imp
2004-04-09 19:58:40 +00:00
David E. O'Brien 9055e6fd1b Share the i386 boot manual page. 2004-03-22 00:52:27 +00:00
David E. O'Brien c69284ca08 Use __FBSDID() to quiet GCC 3.3 warnings. 2003-05-03 18:41:59 +00:00
Robert Watson 6ab0d6c220 When kill(-1) returns ESRCH, it could be because the current process
doesn't have a process group, which can occur if you're working with
a custom init that doesn't set up a full tty context.  Rather than
refusing to reboot, ignore ESRCH from the kill attempt in reboot(8).
2003-04-02 22:13:56 +00:00
Tom Rhodes 1512a2352d Add the /boot prefix. I forgot this when updating the location.
Neglected by:	trhodes
2003-01-13 18:57:19 +00:00
Tom Rhodes 3df9fdfb2f Update the kernel location in FILES.
PR:	47015
2003-01-13 16:15:56 +00:00
Jens Schweikhardt 57bd0fc6e8 english(4) police. 2002-12-27 12:15:40 +00:00
Ruslan Ermilov 8d5d039f80 Uniformly refer to a file system as "file system".
Approved by:	re
2002-12-12 17:26:04 +00:00
Ruslan Ermilov afb09e9fb8 mdoc(7) police: overhaul. 2002-12-12 13:40:31 +00:00
Ruslan Ermilov 8573f80562 mdoc(7) police: Nits.
Approved by:	re
2002-11-26 09:05:06 +00:00
Bruce A. Mah bec89d6c57 Fix one misspelling and two punctuation nits. 2002-11-07 16:00:48 +00:00
Gordon Tetlow e2b57789f8 Hook the new nextboot(8) manpage up to the build. 2002-11-04 17:39:54 +00:00
Gordon Tetlow b277773de2 Add a nextboot manual page.
Spotted by:	brandt@fokus.gmd.de
2002-11-04 17:35:22 +00:00
Thomas Quinot 2aeb6b2708 Document behaviour change in reboot(8) introduced in reboot.c rev. 1.17:
when using '-p' with reboot, and the power down action failds, reboot
the system normally. The behaviour of 'halt -p' and of shutdown(8) is
unchanged.

Approved by:	roberto
2002-10-07 21:18:20 +00:00
Thomas Quinot cfde77fbdf Set only the RB_POWEROFF flag (not the RB_HALT flag) when
'-p' is used on the reboot(8) command line.

This is intended for use when you want to attempt a power down
action, but you want the system to reboot (not halt) if the
power down action fails.

This is typically useful when the power-off action performed by
the kernel consists in signalling an uninterrupted power supply
that it should shut down its inverter if mains power has not returned.

The behaviour of shutdown(8) and init(8) is not modified;
only the behaviour of invoking 'reboot -p' manually is
modified, and then only in the case when a power-down action
fails.

Sounded reasonable to:	phk
Approved by:		roberto (mentor)
2002-10-06 16:24:36 +00:00
Tom Rhodes ce66ddb763 s/filesystem/file system/g as discussed on -developers 2002-08-21 18:11:48 +00:00
Philippe Charnier 629e80effb The .Nm utility. 2002-07-06 19:35:14 +00:00
Ruslan Ermilov 10cb9bd3d8 mdoc(7) police: nits. 2002-05-29 16:47:55 +00:00