From: Peter Humphrey <peter@prh.myzen.co.uk>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] What to put in chroot mtab
Date: Fri, 01 Aug 2014 17:50:54 +0100 [thread overview]
Message-ID: <8601465.W3O5GZyabp@wstn> (raw)
In-Reply-To: <CADPrc81oxKBUC4MigBH6Er7-0Y2aB93NwmGMqX_ReR7-KBEFoA@mail.gmail.com>
On Friday 01 August 2014 10:29:17 Canek Peláez Valdés wrote:
> On Fri, Aug 1, 2014 at 10:21 AM, Peter Humphrey <peter@prh.myzen.co.uk>
wrote:
> > On Friday 01 August 2014 10:00:40 Canek Peláez Valdés wrote:
> >> ... just for completeness, systemd actually requires /etc/mtab as a
> >> link to /proc/self/mounts, so don't be surprised if software in the
> >> future in Linux just assumes that.
> >
> > Well, that seems to imply that you can't run a systemd chroot on a systemd
> > or openrc host, no?
>
> If you want to "boot" a container with systemd-nspawn, then no, you
> can't; you need mtab to be a symlink to /proc/self/mounts. If you
> simply want to chroot to it, it doesn't matter; you will not be
> running systemd anyway.
>
> > Because from inside the chroot, what /proc/self/mounts lists
> > is inaccurate.
>
> In what sense is inaccurate? Inside my systemd-nspawn container:
>
> root@gentoo ~ # sort /etc/mtab | uniq
> /run /var/run none rw,bind 0 0
> debugfs /sys/kernel/debug debugfs rw 0 0
> fusectl /sys/fs/fuse/connections fusectl rw 0 0
> hugetlbfs /dev/hugepages hugetlbfs rw 0 0
> mqueue /dev/mqueue mqueue rw 0 0
> tmpfs /tmp tmpfs rw,strictatime,mode=1777 0 0
>
> That seems accurate to me. Sure, as Rich mentioned, there are
> repetitions and other stuff, but nothing that a quick grep or sort
> will not fix.
I only meant that things mounted outside the chroot are listed inside it, even
though they can't be accessed from there.
I've solved the problem for myself anyway, for now, by constructing a suitable
mtab by hand from outside the chroot for use within it.
> > I wouldn't like to be the one who has to write a new installation handbook
> > for systemd-only systems! :)
>
> We'll need to rewrote the whole thing when we switch to systemd anyway.
Indeed.
--
Regards
Peter
next prev parent reply other threads:[~2014-08-01 16:51 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-01 13:07 [gentoo-user] What to put in chroot mtab Peter Humphrey
2014-08-01 13:12 ` Peter Humphrey
2014-08-01 13:28 ` Dale
2014-08-01 20:46 ` J. Roeleveld
2014-08-01 21:31 ` Canek Peláez Valdés
2014-08-01 21:33 ` Canek Peláez Valdés
2014-08-01 21:39 ` J. Roeleveld
2014-08-01 21:44 ` Canek Peláez Valdés
2014-08-01 21:46 ` Canek Peláez Valdés
2014-08-02 0:27 ` J. Roeleveld
2014-08-02 0:21 ` J. Roeleveld
2014-08-02 10:08 ` Peter Humphrey
2014-08-01 23:39 ` Dale
2014-08-01 14:56 ` Peter Humphrey
2014-08-01 15:00 ` Canek Peláez Valdés
2014-08-01 15:07 ` Rich Freeman
2014-08-01 15:25 ` Peter Humphrey
2014-08-01 15:21 ` Peter Humphrey
2014-08-01 15:29 ` Canek Peláez Valdés
2014-08-01 16:50 ` Peter Humphrey [this message]
2014-08-02 18:28 ` Rich Freeman
2014-08-01 14:02 ` Rich Freeman
2014-08-01 19:32 ` Neil Bothwick
2014-08-01 20:40 ` J. Roeleveld
2014-08-02 10:38 ` Peter Humphrey
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=8601465.W3O5GZyabp@wstn \
--to=peter@prh.myzen.co.uk \
--cc=gentoo-user@lists.gentoo.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