diff options
author | trasz <trasz@FreeBSD.org> | 2015-11-08 17:33:48 +0000 |
---|---|---|
committer | trasz <trasz@FreeBSD.org> | 2015-11-08 17:33:48 +0000 |
commit | 31006b5c68aa377c000619fa0e53bedeaf77ce92 (patch) | |
tree | fd5fdcec0ad6ddb8190c6cf49530ee61a9ac4753 /sbin/reboot/reboot.8 | |
parent | 4e8b6b4a06e9b8bd64928b39a5a6cfe0fabaf9f0 (diff) | |
download | FreeBSD-src-31006b5c68aa377c000619fa0e53bedeaf77ce92.zip FreeBSD-src-31006b5c68aa377c000619fa0e53bedeaf77ce92.tar.gz |
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
Diffstat (limited to 'sbin/reboot/reboot.8')
-rw-r--r-- | sbin/reboot/reboot.8 | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/sbin/reboot/reboot.8 b/sbin/reboot/reboot.8 index 13d7098..ac3bd47 100644 --- a/sbin/reboot/reboot.8 +++ b/sbin/reboot/reboot.8 @@ -28,7 +28,7 @@ .\" @(#)reboot.8 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd October 11, 2010 +.Dd May 22, 2015 .Dt REBOOT 8 .Os .Sh NAME @@ -42,7 +42,7 @@ .Op Fl lnpq .Op Fl k Ar kernel .Nm -.Op Fl dlnpq +.Op Fl dlnpqr .Op Fl k Ar kernel .Nm fasthalt .Op Fl lnpq @@ -111,6 +111,13 @@ the flushing of the file system cache is performed (if the .Fl n option is not specified). This option should probably not be used. +.It Fl r +The system kills all processes, unmounts all filesystems, mounts the new +root filesystem, and begins the usual startup sequence. +After changing vfs.root.mountfrom with +.Xr kenv 8 , +.Nm Fl r +can be used to change the root filesystem while preserving kernel state. .El .Pp The @@ -128,6 +135,13 @@ Normally, the utility is used when the system needs to be halted or restarted, giving users advance warning of their impending doom and cleanly terminating specific programs. +.Sh EXAMPLES +Replace current root filesystem with UFS mounted from +.Pa /dev/ada0s1a : +.Bd -literal -offset indent +kenv vfs.root.mountfrom=ufs:/dev/ada0s1a +reboot -r +.Ed .Sh SEE ALSO .Xr getutxent 3 , .Xr boot 8 , |