Re: pivot_root.2: new_root must be a mountpoint

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Yang Bo,

On 9/19/19 4:38 AM, Yang Bo wrote:
> The man page says that new_root does not have be a mountpoint
> but it must be, I tried to pivot_root into a non-mountpoint
> directory and always failed with EINVAL, the kernel source
> fs/namespace.c confirms that, to quote a comment from this file:
> 
> - it's okay to pick a root that isn't the root of a file system, e.g.
> - /nfs/my_root where /nfs is the mount point. It must be a mountpoint,
> - though, so you may need to say mount --bind /nfs/my_root /nfs/my_root
> - first.

Yes, you are correct. There are in fact many problems in the
current pivot_root(2) page, and I am in the process of 
substantially revising it.

Thanks

Michael


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux