From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Svante v. Erichsen" Subject: bug#33517: Problem booting when using btrfs subvolume for /gnu/store Date: Sun, 27 Jan 2019 00:59:45 +0100 Message-ID: <20190126235945.GP9163@krustig.localdomain> References: <87mupva8j5.fsf@cbaines.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="kERJ49nCKmnv470N" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:34910) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gnY7t-0005sz-Pg for bug-guix@gnu.org; Sat, 26 Jan 2019 19:16:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gnXsk-0005VW-8Y for bug-guix@gnu.org; Sat, 26 Jan 2019 19:01:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:47586) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gnXsk-0005VG-3W for bug-guix@gnu.org; Sat, 26 Jan 2019 19:01:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gnXsj-0007zm-S1 for bug-guix@gnu.org; Sat, 26 Jan 2019 19:01:01 -0500 In-Reply-To: <87mupva8j5.fsf@cbaines.net> Sender: "Debbugs-submit" Resent-Message-ID: Content-Disposition: inline List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: 33517@debbugs.gnu.org --kERJ49nCKmnv470N Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable The subvolume and the mount point are independent issues. For example, I have a subvolume named @ as root volume: (file-system (device "/dev/mapper/hd") (mount-point "/") (type "btrfs") (options "compress=3Dlzo,ssd,subvol=3D@")) It also appears that the subvolume name must be prepended to the path as if= it just was an ordinary directory (grub.cfg): =E2=80=A6 linux /@/gnu/store/=E2=80=A6 =E2=80=A6 I could not yet confirm this from documentation, but it works like that for= me. (I semi-manually edit the generated grub.cfg currently.) So, additionally to stripping the mount point, the subvolume needs to be prepended (grub.scm): (let ((kernel (prepend-subvol device-subvol (strip-mount-point device-mount-point kernel))) (initrd (prepend-subvol device-subvol (strip-mount-point device-mount-point initrd)))) =E2=80=A6) This would mean that the menu-entry structure needs the subvol information. However, I wouldn't want to parse this from the options field in the file-s= ystem entry, so I'd propose allowing a list there, maybe like this: (file-system (device "/dev/mapper/hd") (mount-point "/") (type "btrfs") (options '(("compress" . "lzo") "ssd" ("subvol" . "@")))) On the other hand, it might be surprising that declaring the options like t= his would work for subvols, while using a string doesn't, especially when some = older documentation/blogs/gists is still hanging around on the internet, so maybe= it would be necessary to parse the options anyway (to this list structure). I'm lacking experience in guix and guile, so making this work and submit a = patch will take me some time. Do you think this is sensible? --=20 Svante von Erichsen GPG fingerprint: A78A D4FB 762F A922 A495 57E8 2649 9081 6E61 20DE --kERJ49nCKmnv470N Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEp4rU+3YvqSKklVfoJkmQgW5hIN4FAlxM9GsACgkQJkmQgW5h IN40jA//U1RLVPOBXIhvNKUTs5R313VDa1KwPooWyBHjkoHnw8eZ9+/BsPiKIcoQ PaEseDK66NpctxjBW8TMHV3xVfVF6kloNJuMLvDnfCXUCTfIGzaqH+4VoHSn6TnV qBNOsfeP3misebz8tySrJq44NzD/qy1fVZ+D8HUiei9QBkor/x8VbBF7WuDFiAAu 2QJlHGsrIGi8aPGZX4suEynDQKvPMUMaALpKE7WveH1ilS9mkWNv7TV/rFngLfan eXPbb82AHMKvmT5PIZ1gfgxhLMXGxFbwCfmqSIpBHPsZg3bHrVGEHVVNgvBzSlGj AWc64QdTXVX38HcDG5DCnyXD4GY7gon0OQ1VzKKY6wMrkrXnJsXQ4fPRbjIHRtiE kQ81BpjjRu4mwxoApLGAbONkEPYy5tp8ea9FUBfaMqHHjFjWv1o9wfnm1hNrL/sg j5bfreAUURFHYnOaM/B0/aGgxXjZU2kT4oEuwGpncd0lH1CsyQtJydSVK0aA+isE qKN+ZFHV+DpFJR/4hxWp2+Zf/q2GSIrlkn8DFU6ZIg7FZSeUQWOARumtDO328Kia c4OpPunm26+JG11rbRIHJkno/yKto+mOAJg+KhFeoFcrcod/Gt3/M8EgmOF0gF2x JWOM1W+vdojp2kXofTNyT8+pxAstQEl8xYiuXNZvmJ2ChhjqttE= =ksF0 -----END PGP SIGNATURE----- --kERJ49nCKmnv470N--