summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authortrasz <trasz@FreeBSD.org>2016-01-12 10:11:29 +0000
committertrasz <trasz@FreeBSD.org>2016-01-12 10:11:29 +0000
commit355c35a189c2f841c4660bf6e63e376f77a2c04b (patch)
tree80e73a1e8e4e3f10ec17f3c3b146a796efee3373 /lib
parenta35cfac66cd13b8a8193084a71a760710f87703e (diff)
downloadFreeBSD-src-355c35a189c2f841c4660bf6e63e376f77a2c04b.zip
FreeBSD-src-355c35a189c2f841c4660bf6e63e376f77a2c04b.tar.gz
MFC r287964:
Kernel part of reroot support - a way to change rootfs without reboot. Note that the mountlist manipulations are somewhat fragile, and not very pretty. The reason for this is to avoid changing vfs_mountroot(), which is (obviously) rather mission-critical, but not very well documented, and thus hard to test properly. It might be possible to rework it to use its own simple root mount mechanism instead of vfs_mountroot(). Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D2698
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/sys/reboot.27
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/libc/sys/reboot.2 b/lib/libc/sys/reboot.2
index f5571ae..b010c41 100644
--- a/lib/libc/sys/reboot.2
+++ b/lib/libc/sys/reboot.2
@@ -113,6 +113,13 @@ Normally, the disks are sync'd (see
before the processor is halted or rebooted.
This option may be useful if file system changes have been made manually
or if the processor is on fire.
+.It Dv RB_REROOT
+Instead of rebooting, unmount all filesystems except the one containing
+currently-running executable, and mount root filesystem using the same
+mechanism which is used during normal boot, based on
+vfs.root.mountfrom
+.Xr kenv 8
+variable.
.It Dv RB_RDONLY
Initially mount the root file system read-only.
This is currently the default, and this option has been deprecated.
OpenPOWER on IntegriCloud