diff options
author | trasz <trasz@FreeBSD.org> | 2015-09-18 17:32:22 +0000 |
---|---|---|
committer | trasz <trasz@FreeBSD.org> | 2015-09-18 17:32:22 +0000 |
commit | bd8e12dd02348a4a6d3bddfaf7870df8e63b850a (patch) | |
tree | 64974d4c066398aa4020300d6dc8d32a856315a2 /lib | |
parent | 0b3a97eb1c435226608d90a80279f70b06c131e1 (diff) | |
download | FreeBSD-src-bd8e12dd02348a4a6d3bddfaf7870df8e63b850a.zip FreeBSD-src-bd8e12dd02348a4a6d3bddfaf7870df8e63b850a.tar.gz |
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().
Reviewed by: kib@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D2698
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/sys/reboot.2 | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/libc/sys/reboot.2 b/lib/libc/sys/reboot.2 index caaba58..c3276389 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. |