From dc9b6c92852bca1541ed13d730b8653d2b8a806d Mon Sep 17 00:00:00 2001 From: Joseph Sible Date: Thu, 9 Aug 2018 00:23:13 -0400 Subject: [PATCH] pivot_root.2: Document EINVAL if root is rootfs Per the comment on the pivot_root syscall in fs/namespace.c: Also, the current root cannot be on the 'rootfs' (initial ramfs) filesystem. See Documentation/filesystems/ramfs-rootfs-initramfs.txt for alternatives in this situation. Signed-off-by: Joseph C. Sible Signed-off-by: Michael Kerrisk --- man2/pivot_root.2 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/man2/pivot_root.2 b/man2/pivot_root.2 index f744d29b9..2f8f5f4b9 100644 --- a/man2/pivot_root.2 +++ b/man2/pivot_root.2 @@ -112,6 +112,9 @@ or a filesystem is already mounted on \fIput_old\fP. .B EINVAL \fIput_old\fP is not underneath \fInew_root\fP. .TP +.B EINVAL +The current root is on the rootfs (initial ramfs) filesystem. +.TP .B ENOTDIR \fInew_root\fP or \fIput_old\fP is not a directory. .TP