From 63cb4b0616bd436846e490fdce5fa1df6b50d5cb Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 20 Nov 2009 15:18:51 +0100 Subject: [PATCH] switch_root: add note about subroots to switch_root.8 Based on patch from Daniel Drake Signed-off-by: Karel Zak --- sys-utils/switch_root.8 | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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) -- 2.39.5