linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>
To: Yang Bo <rslovers@yandex.com>
Cc: mtk.manpages@gmail.com, linux-man@vger.kernel.org
Subject: Re: pivot_root.2: new_root must be a mountpoint
Date: Thu, 19 Sep 2019 08:34:49 +0200	[thread overview]
Message-ID: <fc107b16-647b-0ce1-e84e-b8484feacce9@gmail.com> (raw)
In-Reply-To: <20190919053801.bwqWTilN@vla3-2bcfd5e94671.qloud-c.yandex.net>

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/

           reply	other threads:[~2019-09-19  6:34 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20190919053801.bwqWTilN@vla3-2bcfd5e94671.qloud-c.yandex.net>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fc107b16-647b-0ce1-e84e-b8484feacce9@gmail.com \
    --to=mtk.manpages@gmail.com \
    --cc=linux-man@vger.kernel.org \
    --cc=rslovers@yandex.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).