From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Marusich Subject: Re: Curious unionfs-ro-mount for /gnu/store in installation-image Date: Mon, 30 Oct 2017 18:56:37 -0700 Message-ID: <873760axm2.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49871) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9LnL-0005oq-9U for guix-devel@gnu.org; Mon, 30 Oct 2017 21:56:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e9LnK-0005XT-8F for guix-devel@gnu.org; Mon, 30 Oct 2017 21:56:47 -0400 Received: from mail-pg0-x236.google.com ([2607:f8b0:400e:c05::236]:52960) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e9LnK-0005XC-2C for guix-devel@gnu.org; Mon, 30 Oct 2017 21:56:46 -0400 Received: by mail-pg0-x236.google.com with SMTP id a192so13271254pge.9 for ; Mon, 30 Oct 2017 18:56:45 -0700 (PDT) In-Reply-To: (Hartmut Goebel's message of "Sun, 29 Oct 2017 18:18:08 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Hartmut Goebel Cc: guix-devel --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Hartmut! Hartmut Goebel writes: > immediately after booting the installation image (build according to [1] > and run according to [2]), the "mount" command spits out *two* unionfs > mounted points: > > root@gnu ~# mount > unionfs on / type fuse.unionfs (rw,=E2=80=A6) > unionfs on /gnu/store type fuse.unionfs (ro,=E2=80=A6) > > The first one ("/") is easy to explain: It is created by > gnu/build/linux-boot.scm (mount-root-file-system) if #:volatile-root is > true. > > But I'm curious, where the second one comes from. I've been searching > this for two or three hours now and did not find, where this is defined. The second one is a read-only bind-mount of the store. The fact that this exists is mentioned in the manual in the section titled "File Systems"; look there for the string "%immutable-store". Do 'grep -r %immutable-store .' from the Guix source root directory, and you will find where it is used - in particular: * gnu/system/file-systems.scm - here, the variable %immutable-store is is defined with parameters that cause this file system to be bind-mounted. The mechanism by which the bind-mounting occurs is defined elsewhere, but this might be what you were looking for. * gnu/system/install.scm- here, the %immutable-store is used to construct the definition of the installation image. Hope that helps! For the record, I was able to find this information because I knew that this was a "bind mount" to begin with. So I did a 'grep -ir bind.*mount' and a 'grep -ir mount.*bind' in the Guix source root directory and followed the clues from there. The mount output by itself is cryptic if you don't already know about bind mounts. Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAln32FYACgkQ3UCaFdgi Rp1mYRAAv2kdwBkeQKDK6LNqfN8U8j7LxTO6lVylI6/b1L8mBg2NODwVPWFcxgO0 T9+HPpCwr5fD/bi6w3fw8+QWIqVifxSaph6HCeGTYCYZHvMs1VVJ9tG956kgaRCZ XyWULRfHiHzdMOSVk7vHOoa0c8EwQTVvTnChfAdo2bFgz9eRPiie8Pt1RrFaNMVf ncnb5iaiy50gC6EHRfIrnnGFlDii1JkmgIGpbt2yXwKYTs0LUmV7eprh+DYphxVM IcDS/snnoGWjm6QLoGYOr/+oGcKPaddIbpkYj9TJDoNPl3WbfOpMUQdzR19wimvl BsvoS4zLk1U4ktakzhkt8ewKiHmUIJlyl7tmdqfwuE4M2uVlLv5Cl2oi8uEsWsjd UAeZCcaSg2Tkj3Lwo+435O7DJzCvgIaGUD10w+n41ZlEwzTOqC8A4bP0Mt8WZZXi zH49pMjzjMJygqwGwfR+LOGwKiwH339qQ1MZLqTXf2f4kQcS3VqZflu1fYIeCtXQ ovcHAfL0IL/xx+5VvbvJEb1c/+rE8u8YZFym2LZjLkc0hPvBc/GBnWsV0BSthN3G 1yXFGP2HQ5tlyanOagqCo3du96S1/vZFN4TIVCqBUbbIymI+Wk1SLoJgYAw9hxsz talWhd/asvRH0GVrZbQjgnudXAWy5yJRnqkBMOst+thWxCnxIzw= =7uHq -----END PGP SIGNATURE----- --=-=-=--