From: Karel Zak <kzak-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Daniel Drake <dsd-2X9k7bc8m7Mdnm+yROfE0A@public.gmane.org>,
Peter Jones <pjones-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: util-linux-ng-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH] switch_root: a better approach to subroots
Date: Fri, 20 Nov 2009 15:30:17 +0100 [thread overview]
Message-ID: <20091120143017.GA29950@nb.net.home> (raw)
In-Reply-To: <20091118153312.16E989D404F-k/4jFdqg8LLlyo9zxV8I99HuzzzSOjJt@public.gmane.org>
On Wed, Nov 18, 2009 at 03:33:12PM +0000, Daniel Drake wrote:
> This reverts commit a692a8745941a192528c5e2a05de97155ba586f9.
Revered and man page updated. switch_root does not support subroots
from now.
On Wed, Nov 18, 2009 at 03:13:58PM -0500, Peter Jones wrote:
> On 11/18/2009 01:47 PM, Karel Zak wrote:
> > On Wed, Nov 18, 2009 at 03:33:12PM +0000, Daniel Drake wrote:
> >> +.SH NOTES
> >> +switch_root will fail to function if
> >> +.B newroot
> >> +is not the root of a mount. If you want to switch root into a directory that
> >> +does not meet this requirement then you can first use a bind-mounting trick to
> >> +turn any directory into a mount point:
> >> +.sp
> >> +.nf
> >> +.RS
> >> +mount --bind $DIR $DIR
> >
> > Cannot we add this functionality directly to the switch_root command?
> > I mean call:
> >
> > mount --bind /newroot/subroot /newroot/subroot
> > mount --move /newroot/subroot /
> >
> > Now we have:
> >
> > mount --move newroot /
> > chroot /newroot/subroot
>
> That certainly seems preferable to reverting the patch, especially if, as
I agree. People (IMHO OLPC project only) who need subroots can easily
add "mount --bind" to their initrd.
Karel
--
Karel Zak <kzak-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2009-11-20 14:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20091118153312.16E989D404F@zog.reactivated.net>
[not found] ` <20091118153312.16E989D404F-k/4jFdqg8LLlyo9zxV8I99HuzzzSOjJt@public.gmane.org>
2009-11-18 18:47 ` [PATCH] switch_root: a better approach to subroots Karel Zak
[not found] ` <20091118184706.GB23977-sHeGUpI7y9L/9pzu0YdTqQ@public.gmane.org>
2009-11-18 20:13 ` Peter Jones
[not found] ` <4B045586.1090906-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-11-19 8:19 ` Harald Hoyer
2009-11-20 14:05 ` Victor Lowther
2009-11-20 14:30 ` Karel Zak [this message]
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=20091120143017.GA29950@nb.net.home \
--to=kzak-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=dsd-2X9k7bc8m7Mdnm+yROfE0A@public.gmane.org \
--cc=harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=pjones-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=util-linux-ng-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/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