From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 4F3B213877A for ; Fri, 1 Aug 2014 16:51:02 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E1037E093A; Fri, 1 Aug 2014 16:50:56 +0000 (UTC) Received: from smarthost01a.mail.zen.net.uk (smarthost01a.mail.zen.net.uk [212.23.1.1]) by pigeon.gentoo.org (Postfix) with ESMTP id C46B1E0917 for ; Fri, 1 Aug 2014 16:50:55 +0000 (UTC) Received: from [82.69.80.10] (helo=wstn.localnet) by smarthost01a.mail.zen.net.uk with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1XDG2g-000H2J-O7 for gentoo-user@lists.gentoo.org; Fri, 01 Aug 2014 16:50:54 +0000 From: Peter Humphrey 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 Message-ID: <8601465.W3O5GZyabp@wstn> Organization: at home User-Agent: KMail/4.12.5 (Linux/3.12.21-gentoo-r1; KDE/4.12.5; x86_64; ; ) In-Reply-To: References: <3566559.YT61t9IyHV@wstn> <2759907.J6mR1A4EQB@wstn> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" X-Originating-smarthost01a-IP: [82.69.80.10] X-Archives-Salt: 01f0da63-18a4-4dd0-81f8-742d727cbfda X-Archives-Hash: 79dbe9bd0d352eee2496b7aefa1dc58f On Friday 01 August 2014 10:29:17 Canek Pel=E1ez Vald=E9s wrote: > On Fri, Aug 1, 2014 at 10:21 AM, Peter Humphrey =20 wrote: > > On Friday 01 August 2014 10:00:40 Canek Pel=E1ez Vald=E9s wrote: > >> ... just for completeness, systemd actually requires /etc/mtab as = a > >> link to /proc/self/mounts, so don't be surprised if software in th= e > >> future in Linux just assumes that. > >=20 > > Well, that seems to imply that you can't run a systemd chroot on a = systemd > > or openrc host, no? >=20 > 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. >=20 > > Because from inside the chroot, what /proc/self/mounts lists > > is inaccurate. >=20 > In what sense is inaccurate? Inside my systemd-nspawn container: >=20 > 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=3D1777 0 0 >=20 > 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 i= t, even=20 though they can't be accessed from there. I've solved the problem for myself anyway, for now, by constructing a s= uitable=20 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 h= andbook > > for systemd-only systems! :) >=20 > We'll need to rewrote the whole thing when we switch to systemd anywa= y. Indeed. --=20 Regards Peter