From: Al Viro <viro@ftp.linux.org.uk>
To: Jan Engelhardt <jengelh@computergmbh.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>,
Mark Cannon <random.bits@rogers.com>,
linux-kernel@vger.kernel.org
Subject: Re: Use of directories to hold root?
Date: Sat, 11 Aug 2007 17:07:04 +0100 [thread overview]
Message-ID: <20070811160704.GA21089@ftp.linux.org.uk> (raw)
In-Reply-To: <Pine.LNX.4.64.0708111753510.3101@fbirervta.pbzchgretzou.qr>
On Sat, Aug 11, 2007 at 05:55:37PM +0200, Jan Engelhardt wrote:
>
> On Aug 10 2007 17:08, H. Peter Anvin wrote:
> >Jan Engelhardt wrote:
> >> On Aug 10 2007 17:24, Mark Cannon wrote:
> >>> You pass the kernel the root option to specify the root partition.
> >>> Is there a way to identify a directory in that partition that holds the
> >>> root or something equivalent to this?
> >>
> >> No, but you can use pivot_root.
> >
> >Or better yet, use an initramfs with MS_MOVE; same as you would with the
> >"normal" use of initramfs.
>
> mount --move /foo /
> => error
mount("foo", "foo", NULL, MS_BIND, 0);
chdir("foo");
mount(".", "/", NULL, MS_MOVE, 0);
chroot(".");
next prev parent reply other threads:[~2007-08-11 16:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-10 21:24 Use of directories to hold root? Mark Cannon
2007-08-10 21:33 ` Jan Engelhardt
2007-08-11 0:08 ` H. Peter Anvin
2007-08-11 15:55 ` Jan Engelhardt
2007-08-11 16:07 ` Al Viro [this message]
2007-08-12 19:39 ` Mark Cannon
2007-08-12 19:49 ` Jan Engelhardt
2007-08-12 20:23 ` Al Viro
2007-08-12 20:55 ` Jan Engelhardt
2007-08-12 20:57 ` H. Peter Anvin
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=20070811160704.GA21089@ftp.linux.org.uk \
--to=viro@ftp.linux.org.uk \
--cc=hpa@zytor.com \
--cc=jengelh@computergmbh.de \
--cc=linux-kernel@vger.kernel.org \
--cc=random.bits@rogers.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