From 355c35a189c2f841c4660bf6e63e376f77a2c04b Mon Sep 17 00:00:00 2001 From: trasz Date: Tue, 12 Jan 2016 10:11:29 +0000 Subject: 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 --- lib/libc/sys/reboot.2 | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/libc') 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. -- cgit v1.1