Based on text from Documentation/filesystems/ramfs-rootfs-initramfs.txt. Signed-off-by: Elvira Khabirova <lineprinter@xxxxxxxxxxxx> --- man2/pivot_root.2 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/man2/pivot_root.2 b/man2/pivot_root.2 index 2f8f5f4b9..f01b128a3 100644 --- a/man2/pivot_root.2 +++ b/man2/pivot_root.2 @@ -131,6 +131,17 @@ is Linux-specific and hence is not portable. .SH NOTES Glibc does not provide a wrapper for this system call; call it using .BR syscall (2). +.PP +The rootfs (initial ramfs) cannot be +.BR pivot_root ()ed. +The recommended method of changing the root filesystem in this case is to delete +everything in rootfs, overmount rootfs with the new root, attach +.IR stdin / stdout / stderr +to the new +.IR /dev/console , +and exec the new init. Helper +programs for this process exist; see +.BR switch_root (8). .SH BUGS .BR pivot_root () should not have to change root and current working directory of all other -- 2.19.0