From: Karel Zak Date: Fri, 20 Nov 2009 14:18:51 +0000 (+0100) Subject: switch_root: add note about subroots to switch_root.8 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=63cb4b0616bd436846e490fdce5fa1df6b50d5cb;p=util-linux switch_root: add note about subroots to switch_root.8 Based on patch from Daniel Drake Signed-off-by: Karel Zak --- diff --git a/sys-utils/switch_root.8 b/sys-utils/switch_root.8 index 4fdc8e94..b6712ecb 100644 --- a/sys-utils/switch_root.8 +++ b/sys-utils/switch_root.8 @@ -32,6 +32,19 @@ show version number and exit .B switch_root returns 0 on success and 1 on failure. +.SH NOTES +switch_root will fail to function if +.B newroot +is not the root of a mount. If you want to switch root into a directory that +does not meet this requirement then you can first use a bind-mounting trick to +turn any directory into a mount point: +.sp +.nf +.RS +mount --bind $DIR $DIR +.RE +.fi + .SH "SEE ALSO" .BR mount (8) .BR chroot (2)