From unknown Fri Sep 05 10:04:47 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33517: Problem booting when using btrfs subvolume for /gnu/store Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 26 Nov 2018 20:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 33517 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 33517@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.154326411011110 (code B ref -1); Mon, 26 Nov 2018 20:29:02 +0000 Received: (at submit) by debbugs.gnu.org; 26 Nov 2018 20:28:30 +0000 Received: from localhost ([127.0.0.1]:50174 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gRNUb-0002t6-SU for submit@debbugs.gnu.org; Mon, 26 Nov 2018 15:28:30 -0500 Received: from eggs.gnu.org ([208.118.235.92]:51152) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gRNUa-0002su-3J for submit@debbugs.gnu.org; Mon, 26 Nov 2018 15:28:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gRNUT-0002pL-Ku for submit@debbugs.gnu.org; Mon, 26 Nov 2018 15:28:22 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:56489) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gRNUT-0002pH-Go for submit@debbugs.gnu.org; Mon, 26 Nov 2018 15:28:21 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60739) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRNUR-0005lE-TM for bug-guix@gnu.org; Mon, 26 Nov 2018 15:28:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gRNUO-0002nM-Lf for bug-guix@gnu.org; Mon, 26 Nov 2018 15:28:19 -0500 Received: from mira.cbaines.net ([2a01:7e00::f03c:91ff:fe69:8da9]:37630) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRNUH-0002lh-Ha for bug-guix@gnu.org; Mon, 26 Nov 2018 15:28:12 -0500 Received: by mira.cbaines.net (Postfix, from userid 113) id 00F53167E5; Mon, 26 Nov 2018 20:28:01 +0000 (GMT) Received: from localhost (cpc102582-walt20-2-0-cust14.13-2.cable.virginm.net [86.27.34.15]) by mira.cbaines.net (Postfix) with ESMTPSA id 767C516724 for ; Mon, 26 Nov 2018 20:28:01 +0000 (GMT) Received: from capella (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 09138ff3 for ; Mon, 26 Nov 2018 20:28:01 +0000 (UTC) User-agent: mu4e 1.0; emacs 26.1 From: Christopher Baines Date: Mon, 26 Nov 2018 20:27:58 +0000 Message-ID: <87mupva8j5.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain I'm loosing track of this issue a bit, as I've been dealing with it for a while. I have a machine that I've setup where /gnu/store is a btrfs subvolume. I do this so that I can make flexible use of the space on that btrfs filesystem. Unfortunately, the grub configuration generated for this doesn't seem to account for this, and so it requires some tweaking to get it to boot. A long while back, I discovered I could make the following change, then the generated grub configuration would be fine. --=-=-= Content-Type: text/x-patch Content-Disposition: inline --- gnu/bootloader/grub.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm index 06856dd58c..c3ddc3e128 100644 --- a/gnu/bootloader/grub.scm +++ b/gnu/bootloader/grub.scm @@ -320,8 +320,8 @@ entries corresponding to old generations of the system." ;; Use the right file names for KERNEL and INITRD in case ;; DEVICE-MOUNT-POINT is not "/", meaning that the store is on a ;; separate partition. - (let ((kernel (strip-mount-point device-mount-point kernel)) - (initrd (strip-mount-point device-mount-point initrd))) + (let ((kernel kernel) + (initrd initrd)) #~(format port "menuentry ~s { ~a linux ~a ~a -- 2.19.2 --=-=-= Content-Type: text/plain Unfortunately, it's not a proper solution, as it obviously breaks when you actually want to strip the mount point off so that grub can find the right files. I'm creating a bug for this, as I think it would be good to track the issue. I've also written a system test that I believe reproduced the issue. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-WIP-Btrfs-store-subvolume-test.patch Content-Transfer-Encoding: quoted-printable From=207eee5685f95d0b6baeb97f5fdd947fe5223a61c9 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Fri, 26 Oct 2018 18:48:32 +0100 Subject: [PATCH] WIP Btrfs store subvolume test =2D-- gnu/tests/install.scm | 91 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 90 insertions(+), 1 deletion(-) diff --git a/gnu/tests/install.scm b/gnu/tests/install.scm index 4764ffffde..cfa071187c 100644 =2D-- a/gnu/tests/install.scm +++ b/gnu/tests/install.scm @@ -43,7 +43,8 @@ %test-separate-home-os %test-raid-root-os %test-encrypted-os =2D %test-btrfs-root-os)) + %test-btrfs-root-os + %test-btrfs-root-with-store-subvolume-os)) =20 ;;; Commentary: ;;; @@ -826,4 +827,92 @@ build (current-guix) and then store a couple of full s= ystem images.") (command (qemu-command/writable-image image))) (run-basic-test %btrfs-root-os command "btrfs-root-os"))))) =20 + +;;; +;;; Btrfs root file system with store subvolume. +;;; + +(define-os-with-source (%btrfs-root-with-store-subvolume-os + %btrfs-root-with-store-subvolume-os-source) + ;; The OS we want to install. + (use-modules (gnu) (gnu tests) (srfi srfi-1)) + + (operating-system + (host-name "liberigilo") + (timezone "Europe/Paris") + (locale "en_US.UTF-8") + + (bootloader (bootloader-configuration + (bootloader grub-bootloader) + (target "/dev/vdb"))) + (kernel-arguments '("console=3DttyS0")) + (file-systems (cons* (file-system + (device (file-system-label "my-root")) + (mount-point "/") + (type "btrfs")) + (file-system + (device (file-system-label "my-root")) + (mount-point "/gnu/store") + (type "btrfs") + (options "subvol=3D/gnu/store")) + %base-file-systems)) + (users (cons (user-account + (name "charlie") + (group "users") + (home-directory "/home/charlie") + (supplementary-groups '("wheel" "audio" "video"))) + %base-user-accounts)) + (services (cons (service marionette-service-type + (marionette-configuration + (imported-modules '((gnu services herd) + (guix combinators))))) + %base-services)))) + +(define %btrfs-root-with-store-subvolume-installation-script + ;; Shell script of a simple installation. + "\ +. /etc/profile +set -e -x +guix --version + +export GUIX_BUILD_OPTIONS=3D--no-grafts +ls -l /run/current-system/gc-roots +parted --script /dev/vdb mklabel gpt \\ + mkpart primary ext2 1M 3M \\ + mkpart primary ext2 3M 2G \\ + set 1 boot on \\ + set 1 bios_grub on +mkfs.btrfs -L my-root /dev/vdb2 +mount /dev/vdb2 /mnt +btrfs subvolume create /mnt/home +mkdir /mnt/gnu +btrfs subvolume create /mnt/gnu/store +herd start cow-store /mnt +mkdir /mnt/etc +cp /etc/target-config.scm /mnt/etc/config.scm +guix system build /mnt/etc/config.scm +guix system init /mnt/etc/config.scm /mnt --no-substitutes +sync +reboot\n") + +(define %test-btrfs-root-with-store-subvolume-os + (system-test + (name "btrfs-root-with-store-subvolume-os") + (description + "Test basic functionality of an OS installed like one would do by hand. +This test is expensive in terms of CPU and storage usage since we need to +build (current-guix) and then store a couple of full system images.") + (value + (mlet* %store-monad + ((image (run-install + %btrfs-root-with-store-subvolume-os + %btrfs-root-with-store-subvolume-os-source + #:script + %btrfs-root-with-store-subvolume-installation-script)) + + (command (qemu-command/writable-image image))) + (run-basic-test %btrfs-root-with-store-subvolume-os + command + "btrfs-root-with-store-subvolume-os"))))) + ;;; install.scm ends here =2D-=20 2.19.2 --=-=-= Content-Type: text/plain It would be good if a way could be found to make this "just work". I just don't know whether the best way to do that is tweaking the way Guix generates the grub configuration to be aware of the odd mounting, or somehow making grub find things in the subvolume, or something else. Thanks, Chris --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAlv8V05fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9Xdlog//WFBd/LdzhI11lOnfHmS4uVxoAGC5MzZJ6nvThjzrZLxmPVbezYTOnU27 1ye73COsNLFD9I+YO30PcTxXz5fJbe0oOELrHIbb/dfk4tJ3vpR6M3kiWu6DRs2e Nr4+g6KS65oPAgyTp2O3t3NPAWC0pLlSx644ABu1IoGr7/EgsPuZ4F536nNw51zO WXvgGFgRtKsYjTR6AWS3AJF1zxcVW2H6Kr5U6cSSUXjZ5CspgKi9QbAH5ftew/Rc 15wxdrrO8z5F+wR5LVnoTDL5r/0LmHHlNoqvIz4cA/R33SpJkSWiscXGg9gwzfQJ FDMGv/szhIYBXgknAvZSvJJl1NtA+UrmjG4dYXmPPabljyR1giJJhmh4VD6uuspA LXpzTQi9jH6+Mc2FGxFcQ+WdRFuAq9tc9awv2NJKXIufQnOLTLgNbJspP1/jcGEU PfCjC4iCQcYvAJha1jkxfV9U4uVO7wNLZtM1UtXV4Gy47uFH+R2BruTTFqsNB5Tm q6aUkCRtF/hYZiL/bs5IvK9V43vodpKM8Hf7jxyMmipb+dXaNsCAZgxKzBFmVb8b U7oYe40Md0cd3SrlZVju0B61KZPe3i0DW9qh0TVODscKUVd3GCGAOOyNXk3rlyZb KqNX05l3HFAR1QsSZkLYdkz5vrCuLkqjKKjxVB7ZwI7Xz4Wdt7g= =wgZK -----END PGP SIGNATURE----- --==-=-=-- From unknown Fri Sep 05 10:04:47 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33517: Problem booting when using btrfs subvolume for /gnu/store Resent-From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 28 Nov 2018 13:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33517 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Christopher Baines Cc: 33517@debbugs.gnu.org Received: via spool by 33517-submit@debbugs.gnu.org id=B33517.154341131715291 (code B ref 33517); Wed, 28 Nov 2018 13:22:02 +0000 Received: (at 33517) by debbugs.gnu.org; 28 Nov 2018 13:21:57 +0000 Received: from localhost ([127.0.0.1]:52941 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gRzmv-0003yZ-0j for submit@debbugs.gnu.org; Wed, 28 Nov 2018 08:21:57 -0500 Received: from eggs.gnu.org ([208.118.235.92]:43351) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gRzms-0003yJ-Sj for 33517@debbugs.gnu.org; Wed, 28 Nov 2018 08:21:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gRzmn-0004sU-4F for 33517@debbugs.gnu.org; Wed, 28 Nov 2018 08:21:49 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:36292) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRzmn-0004sN-1J; Wed, 28 Nov 2018 08:21:49 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=57368 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gRzmm-0000Mx-P4; Wed, 28 Nov 2018 08:21:48 -0500 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <87mupva8j5.fsf@cbaines.net> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 8 Frimaire an 227 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Wed, 28 Nov 2018 14:21:47 +0100 In-Reply-To: <87mupva8j5.fsf@cbaines.net> (Christopher Baines's message of "Mon, 26 Nov 2018 20:27:58 +0000") Message-ID: <87zhtt49sk.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) Hello, Christopher Baines skribis: > I'm loosing track of this issue a bit, as I've been dealing with it for > a while. I have a machine that I've setup where /gnu/store is a btrfs > subvolume. I do this so that I can make flexible use of the space on > that btrfs filesystem. > > Unfortunately, the grub configuration generated for this doesn't seem to > account for this, and so it requires some tweaking to get it to boot. > > A long while back, I discovered I could make the following change, then > the generated grub configuration would be fine. > > > --- > gnu/bootloader/grub.scm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm > index 06856dd58c..c3ddc3e128 100644 > --- a/gnu/bootloader/grub.scm > +++ b/gnu/bootloader/grub.scm > @@ -320,8 +320,8 @@ entries corresponding to old generations of the syste= m." > ;; Use the right file names for KERNEL and INITRD in case > ;; DEVICE-MOUNT-POINT is not "/", meaning that the store is on a > ;; separate partition. > - (let ((kernel (strip-mount-point device-mount-point kernel)) > - (initrd (strip-mount-point device-mount-point initrd))) > + (let ((kernel kernel) > + (initrd initrd)) > #~(format port "menuentry ~s { > ~a > linux ~a ~a > -- > 2.19.2 > > > > Unfortunately, it's not a proper solution, as it obviously breaks when > you actually want to strip the mount point off so that grub can find the > right files. Is there a way =E2=80=98strip-mount-point=E2=80=99 or some higher-level cod= e could determine whether we actually need to strip the mount point? Thanks, Ludo=E2=80=99. From unknown Fri Sep 05 10:04:47 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33517: Problem booting when using btrfs subvolume for /gnu/store Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 01 Dec 2018 17:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33517 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 33517@debbugs.gnu.org Received: via spool by 33517-submit@debbugs.gnu.org id=B33517.15436864931692 (code B ref 33517); Sat, 01 Dec 2018 17:49:02 +0000 Received: (at 33517) by debbugs.gnu.org; 1 Dec 2018 17:48:13 +0000 Received: from localhost ([127.0.0.1]:57229 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gT9NE-0000RD-Qk for submit@debbugs.gnu.org; Sat, 01 Dec 2018 12:48:13 -0500 Received: from li622-129.members.linode.com ([212.71.249.129]:56056 helo=mira.cbaines.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gT9NC-0000R5-Ts for 33517@debbugs.gnu.org; Sat, 01 Dec 2018 12:48:11 -0500 Received: by mira.cbaines.net (Postfix, from userid 113) id 1661D1684C; Sat, 1 Dec 2018 17:48:10 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from localhost (130.85.159.143.dyn.plus.net [143.159.85.130]) by mira.cbaines.net (Postfix) with ESMTPSA id 96DEA167B7; Sat, 1 Dec 2018 17:48:09 +0000 (GMT) Received: from phact (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 8b6bbeb6; Sat, 1 Dec 2018 17:48:09 +0000 (UTC) References: <87mupva8j5.fsf@cbaines.net> <87zhtt49sk.fsf@gnu.org> User-agent: mu4e 1.0; emacs 26.1 From: Christopher Baines In-reply-to: <87zhtt49sk.fsf@gnu.org> Date: Sat, 01 Dec 2018 17:48:04 +0000 Message-ID: <875zwdqgtn.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: > Hello, > > Christopher Baines skribis: > >> Unfortunately, it's not a proper solution, as it obviously breaks when >> you actually want to strip the mount point off so that grub can find the >> right files. > > Is there a way =E2=80=98strip-mount-point=E2=80=99 or some higher-level c= ode could > determine whether we actually need to strip the mount point? So, this is the file-system value that I'm using currently for the store. The information about subvolume is in the options value. (file-system (device (uuid "84fc6b78-d7ff-45df-8659-bef44b5bf0ea")) (type "btrfs") (title 'uuid) (mount-point "/gnu/store") (needed-for-boot? #t) (options "subvol=3D/gnu/store")) I guess one approach for dealing with this would be to allow directly configuring the stripping of the mount point somehow. Or maybe having some btrfs-file-system record, which could store the subvol option in a more machine readable way. One thing that still makes me uncertian, is how grub actually is trying to find files on the btrfs filesystem. I tried changing the default subvolume to the one containing the store, but that didn't seem to help. Looks like it might not be aware of subvolumes. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAlwCyVRfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9XcZHBAAsQblOAw+xOoJP7tJhh1e+Zjf+Ky1lCIhNN7OMrgMmam3ziBhX2fi5XZi 2TiyoNrqnPouQ+aigRVT51HONe84nrw/9Yu/56s2FVHhmAoUlS1Dw9AOc0agH6D2 GDQVty51NSh3C0yYcInPxvb5TAuk+QmzLb7A2iqJRiHI7h8THCUrB8SjdwBcC0Yc qeNkG5JVokAHXmymgiTHTRQjvtfV9uE+QGYHeRV7lB4Vxn/YUWQtJPoWiajFvH3i ghO0Xcwryl9WjGUbHogKsKhqdhcfrpLKg87svzpU8GUDjzG2w35FC8fDkKJonF+d xnkAgGq8jDCryMAb7qwNxKRXAkVaqmQmtHenMxt9/Xfuo24/kz1fXLcOE9M92dKt 4uVFQ2quPyFJdxd1VZewe1vR9HEhiIwboCvgV0T1yGitGapJ1qXjJJKi+hNbg0P8 HHhDLUYsfPiB+AGkjaIle2ylDuy6M4y5wBfUcJgvnOXBouT78cEHU+38AVmFPM8l jgaccJ4hTySkjH/yORKSakpu+3wWAv6FRxwRyVkLw8uC4fsmRfNXqQWTKlvlHmYf 23aWrPtIse5U8ej9afkUFcLDjN+GVBPKZAl6XKO1q7KZfd0bDnNZJdRTXqWTEhVV IY84LTVryYnpF86nAtWfFG+yUQlJARVXyk1utlDRTUxQHrBieqc= =LD+E -----END PGP SIGNATURE----- --=-=-=-- From unknown Fri Sep 05 10:04:47 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33517: Problem booting when using btrfs subvolume for /gnu/store References: <87mupva8j5.fsf@cbaines.net> In-Reply-To: <87mupva8j5.fsf@cbaines.net> Resent-From: "Svante v. Erichsen" Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 27 Jan 2019 00:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33517 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 33517@debbugs.gnu.org Received: via spool by 33517-submit@debbugs.gnu.org id=B33517.154854722930676 (code B ref 33517); Sun, 27 Jan 2019 00:01:01 +0000 Received: (at 33517) by debbugs.gnu.org; 27 Jan 2019 00:00:29 +0000 Received: from localhost ([127.0.0.1]:46867 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gnXsC-0007yi-Sw for submit@debbugs.gnu.org; Sat, 26 Jan 2019 19:00:29 -0500 Received: from mout.web.de ([212.227.17.12]:58525) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gnXsA-0007yS-7U for 33517@debbugs.gnu.org; Sat, 26 Jan 2019 19:00:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1548547219; bh=s5LKDvujo2Au2Ym03RUvUaKz2iBPYSqMqg/zzxteSJQ=; h=X-UI-Sender-Class:Date:From:To:Subject; b=gxoWWZDJJCMcMh916hdxcTR13dxHVDkD6ROrBeUcHqC8ps/m/5AgWXnY14JiEecT9 GQ1afGU+Hjfktr/EGjZHbE4hFZYRyWtn96N0KKYtceRKttJ11eSVx5AmIv1LPch92N ngIPr03/xmiRBuClRTSCjmzfDonjPefYcPu7KLVc= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from krustig.localdomain ([77.3.129.235]) by smtp.web.de (mrweb101 [213.165.67.124]) with ESMTPSA (Nemesis) id 0Lb1wz-1hTSH41uqv-00kgSU for <33517@debbugs.gnu.org>; Sun, 27 Jan 2019 01:00:19 +0100 Date: Sun, 27 Jan 2019 00:59:45 +0100 From: "Svante v. Erichsen" Message-ID: <20190126235945.GP9163@krustig.localdomain> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="kERJ49nCKmnv470N" Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-Provags-ID: V03:K1:EA25g2nFnZ9hT2cNbsskev08xuTAey4DDP2Zls2RtsBjbmuBpZJ AXrfL94wQx4C/ie1fqTLFPdl8XzXM3O47Y8Kd/XP/legcSNHQX0ypDkQnTXgjHsicibxb25 eoLpR3/R0BGFuo4JlCxF/qiHWcQzuid0/oyIJEm20XimOzBiN+hCQuv0lnrDREPmUGdfy4a Ne2zqpjnpLbCU2W85fu+A== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:en9pz3781UQ=:bYpYqDASJKryp6gU4sUOHT gE8nLD2Njn6y4lof1YMDZiWXvjP8OFDw0F8ENyEHhWZBQQUKunKGcEPTqMgiaxx6YsPTvL0R/ TsfTaMou7LzSu9a1pEli0TD4qn+zkrmE70PdtMJXXll5f8wUBSeTV05lSNxGlpyPEGybh2v95 If0M6NoRN+2z1N7EJsKi4HyGaXrhsiozUxU25oHdG6x/J5LZHpJeH/660KYeCxApysalXrN1o XdBGdvgCZkEI+fgneNEBexCbf8wLzgOGHm36CkDrpxqWzYqDj/p/C2gJaaF69Fbg+i+9nWhSk TDm+UaPW4g0DupPHLIbfAJctWf11z8qB6itI11OUPR4TMYicShPrHq1YrVRVK9C+Q2dZUgQAJ Xrpjgei4GYC2q/yvfHlqEbh1gpx4X5JY6D9Eu3a3QcjZL3tZ+uT4XD/pjIytPtDjbZGfaOp4d ue0XT1iwOhdo2Wxit09jazc31fJ6p7GxIBTzZSM6zGkvLGFIN801DyoaWS2eHuKV/OCspn29z 7DgQN0osPMpidHIY5Emwfn+7nGEbTU0Pumjh1hMfYvl4UPLX1ugA93B0pjucWLZ0LBKwjIddv Sz2+pumWM33SDdU3GkCnYWRm2/xaQAoCGMBpir78mOh7hkQ6vHAypfvpb++vhRNfZCx+/SgbL tGYEC6/ZI8AebsuD74vS+nIv6v4W2O5No6fPFcjQcDtJsYtOiqPzlwN+Ux9ZwQgdxb1jfxil7 /JXYNF4kffVck+xyWXzh1Q4JADtgYKbTwe05YHkPLkI0aFuYuyboMkvYdhExHOGDmL6qBH3zR E4pa0el8Ry+ROLMYC8Hhi34yzdpK3KbAcsGcYk+uRl0TAoJb6sP7IRTEAWgvPjYniggB9UtRw 1/bDjqvL6/1MF/iSpYWITAWO1LyxUSB5Qq2lOa2wAU2Zm2p3EEcCTArfFMT1R6 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --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-- From unknown Fri Sep 05 10:04:47 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33517: Problem booting when using btrfs subvolume for /gnu/store Resent-From: david.larsson@selfhosted.xyz Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 03 Feb 2019 14:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33517 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: "Svante v. Erichsen" Cc: 33517@debbugs.gnu.org X-Debbugs-Original-Cc: 33517@debbugs.gnu.org, bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.154920497311935 (code B ref -1); Sun, 03 Feb 2019 14:43:02 +0000 Received: (at submit) by debbugs.gnu.org; 3 Feb 2019 14:42:53 +0000 Received: from localhost ([127.0.0.1]:56811 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gqIyz-00036Q-4F for submit@debbugs.gnu.org; Sun, 03 Feb 2019 09:42:53 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51336) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gqIyx-00036D-FG for submit@debbugs.gnu.org; Sun, 03 Feb 2019 09:42:51 -0500 Received: from lists.gnu.org ([209.51.188.17]:57914) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gqIyn-0004IV-4L for submit@debbugs.gnu.org; Sun, 03 Feb 2019 09:42:42 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37470) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqIym-0000lk-4G for bug-guix@gnu.org; Sun, 03 Feb 2019 09:42:40 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_LOW, UNPARSEABLE_RELAY,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gqIyc-00049n-IC for bug-guix@gnu.org; Sun, 03 Feb 2019 09:42:35 -0500 Received: from server0.selfhosted.xyz ([185.147.237.19]:60448) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gqIyW-0003hi-Al for bug-guix@gnu.org; Sun, 03 Feb 2019 09:42:25 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=selfhosted.xyz; s=dkim; t=1549204929; bh=sWZVwJj/Md6FxI4T0S6b/TjdJRf6wUuxglisaUc9Chw=; h=Date:From:To:cc:Subject:In-Reply-To:References; b=s80A6kaCQT5ci4yQPvU+SyJsiAvj3nXIEhCC8ToF3duK9GlpLTq56nE2CwgmEWMVu Lu5+u7n+S2ZvBJefy7PTnyNeB6wqsUavuzCAeGbAz128UR2rIc5eldqEy0WzyuciHi XmKRCiKtle49+zszSse3aoU9+pKg5wPoe9iYYSS2XT+PxOwjisHPXyH9F3uWuHyj6N 0OxK71EuE6R/r13drpR1gzJYabmxQzXj05teqdBIQzP82R4vRnrkOFmgDbR1BGwXIY CsgCqcUYrcrnCaXsoZkRhykiBHdF+Bns9X98ji9qpKVIfIaLeSPnFDes0J23Na3AsJ nifwiBssvkmeA== X-Fuglu-Suspect: f8a8a181931b4f58a3e4cbd7691b9299 X-Fuglu-Spamstatus: NO Received: from [127.0.0.1] (localhost [127.0.0.1]) Date: Sun, 3 Feb 2019 15:41:44 +0100 (CET) From: david.larsson@selfhosted.xyz In-Reply-To: <20190126235945.GP9163@krustig.localdomain> Message-ID: References: <87mupva8j5.fsf@cbaines.net> <20190126235945.GP9163@krustig.localdomain> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="-1463766527-488047257-1549204917=:55299" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 185.147.237.19 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: 0.9 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. ---1463766527-488047257-1549204917=:55299 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable I also lack the experience with guile but it sounds very sensible to me. I can confirm that just fixing the grub-menu entries with the subvol path works. I have been invoking guix system reconfigure with a bash script that in the end calls a grubfix function below with the path to each newly generated grub.cfg: In my case the subvol is located at /snap2_rw function grubfix(){ sudo sed -i "s/linux\ \/gnu/linux\ \/snap2_rw\/gnu/g" "$1" sudo sed -i "s/initrd\ \/gnu/initrd\ \/snap2_rw\/gnu/g" "$1" sudo sed -i "s/--set\ \/gnu/--set\ \/snap2_rw\/gnu/g" "$1" } Your suggestion to do this directly in config.scm sounds great. Best regads, David L On Sun, 27 Jan 2019, Svante v. Erichsen wrote: > 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 a= s 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 b= e > 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 informat= ion. > However, I wouldn't want to parse this from the options field in the fi= le-system > 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 li= ke this > would work for subvols, while using a string doesn't, especially when s= ome older > documentation/blogs/gists is still hanging around on the internet, so m= aybe 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 submi= t 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 > ---1463766527-488047257-1549204917=:55299-- From unknown Fri Sep 05 10:04:47 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33517: Problem booting when using btrfs subvolume for /gnu/store Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 06 Sep 2019 01:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33517 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: "Svante v. Erichsen" Cc: 33517@debbugs.gnu.org Received: via spool by 33517-submit@debbugs.gnu.org id=B33517.15677325838984 (code B ref 33517); Fri, 06 Sep 2019 01:17:01 +0000 Received: (at 33517) by debbugs.gnu.org; 6 Sep 2019 01:16:23 +0000 Received: from localhost ([127.0.0.1]:36276 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i62rP-0002Kq-7t for submit@debbugs.gnu.org; Thu, 05 Sep 2019 21:16:23 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:37006) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i62rN-0002KU-70 for 33517@debbugs.gnu.org; Thu, 05 Sep 2019 21:16:21 -0400 Received: by mail-pf1-f193.google.com with SMTP id y5so402359pfo.4 for <33517@debbugs.gnu.org>; Thu, 05 Sep 2019 18:16:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=p6og+RaYyrEjROfuIgj9quTMOYpzLTe4oPgyQNoEJFs=; b=YXxRl1n9WCwQD1L50uDmgcUsdvE+lv9mEO4sNsjS8h3Fwjr3RF669CGv0UXYKAcdx/ AaNfJREF2aNglhI46oKHnxCjpY7rOdJ72LP4BcOrzQDJPf+2bsJ+PWkSIpLUzlEKsHcy LOa8a1TiAcJEeAhkmtK+cr5d5z57QAWB/IJ03tHwUv9eTJOCgCx0weMXbDtgcbLdowh0 133pLCI9HQsEelN3+vVoppz5uXpoELQrysynnGg67N7S7/fLuQQuRZGxF3Q++vkBZD5I v3BjPXPH8nmVtu2IiRpu3O+Uv8VeQvL/TPkV3/J6VlXQIiGUZGslBJBuxXkNvwyZif97 D8bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=p6og+RaYyrEjROfuIgj9quTMOYpzLTe4oPgyQNoEJFs=; b=IvelyEU+F7GJqjYVUiZfZmu1di+NtvagWc2+yadU7H5RmsFKmBm830B11iroiUDzKJ AvuPTP1JPstQO8Gmc5kFOrAWEWWa1ZBBUqCXEwSJzvCewGyUsZQFy8/9nycjO5RSuj7g sB2DqZl+ObPdBlfBujSuZMkj6I3X0XUPRbmi7cWIz1xGQJCpcYZvivZW6iqP6DfesBrG o+pXzmvIqdQjBRgd7DQGb9Vbe2wET61YrL6Q6ypA0AF+AIL5cY6HpmRUZP1+oX4gfxgz MDwRQ3joMptsBfDSHoXpjVShG8lMaAnFLNwwpI9mZWGrK+KTntBc+c/VNY4/sEmYHgOp 7ifQ== X-Gm-Message-State: APjAAAUHhY2yA5RZFQ8vd9jUMj1S/JpLKtR3/ZbQotKkWevSbVND64fr IRXouiEfKZ21LksUzxjtXQt7iTm8 X-Google-Smtp-Source: APXvYqwTcp42LsFWdLVwtth0/Al/e1BClu2vGx/rQ9NM14ctsx348+Kf2FY+bLyoTOSAJlBvZ5ilMg== X-Received: by 2002:a62:4e52:: with SMTP id c79mr7672693pfb.28.1567732575110; Thu, 05 Sep 2019 18:16:15 -0700 (PDT) Received: from x200 ([240f:c7:38e9:1:314b:485c:9ba4:72c6]) by smtp.gmail.com with ESMTPSA id h11sm3886982pgv.5.2019.09.05.18.16.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Sep 2019 18:16:14 -0700 (PDT) From: Maxim Cournoyer References: <87mupva8j5.fsf@cbaines.net> <20190126235945.GP9163@krustig.localdomain> Date: Fri, 06 Sep 2019 10:16:10 +0900 In-Reply-To: <20190126235945.GP9163@krustig.localdomain> (Svante v. Erichsen's message of "Sun, 27 Jan 2019 00:59:45 +0100") Message-ID: <878sr2xm05.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, "Svante v. Erichsen" writes: > 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 f= or 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 informatio= n. > However, I wouldn't want to parse this from the options field in the file= -system > 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= this > would work for subvols, while using a string doesn't, especially when som= e older > documentation/blogs/gists is still hanging around on the internet, so may= be 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? I had not seen this issue before implementing the solution, but it seems we've reached the same conclusion in that the entries of initrd and kernel of the Grub configuration need to be prepended with the subvolume name in order for Grub to successfully boot from a subvolume. My implementation differs a bit in that the subvolume name to be used in the Grub config is parsed from the kernel argument "rootflags=3D" value; the reasoning being that you'd have to specify it there anyway for the kernel to mount the root partition correctly (for non-root partitions, fstab (file-system fields) can take care of it alone). If anyone wants to give it a try, it's available to review here: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D37305. Maxim From unknown Fri Sep 05 10:04:47 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33517: Problem booting when using btrfs subvolume for /gnu/store Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 26 Sep 2019 08:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33517 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Christopher Baines Cc: 33517@debbugs.gnu.org, Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 33517-submit@debbugs.gnu.org id=B33517.156948508416581 (code B ref 33517); Thu, 26 Sep 2019 08:05:02 +0000 Received: (at 33517) by debbugs.gnu.org; 26 Sep 2019 08:04:44 +0000 Received: from localhost ([127.0.0.1]:42652 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iDOlX-0004JN-LU for submit@debbugs.gnu.org; Thu, 26 Sep 2019 04:04:43 -0400 Received: from mail-pl1-f182.google.com ([209.85.214.182]:37735) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iDOlT-0004J5-AV for 33517@debbugs.gnu.org; Thu, 26 Sep 2019 04:04:43 -0400 Received: by mail-pl1-f182.google.com with SMTP id u20so997906plq.4 for <33517@debbugs.gnu.org>; Thu, 26 Sep 2019 01:04:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=ZFG2dfvRkoUhzppbGaV6wWK1m992+hD9/Faf8yyf96M=; b=mqmPri/V1j4mEQ76ZahmWuL4FICVF9jZHrBCx2NUCiORner18Po/OPTQbVXEcURL5L 3g06I4mPKwlpHpx8QT0ihUJOyv7rPDbW6HA5wdZEo+dmgEiNYu5JBmP2kVPCC7J0+Ze1 5LpJLW93M7MGF3N9+zXojSgFgKWQxM4XLx+uHr+2hdXTK3lDNDFJqg/d3jSnkY6n+jlP reI7cFu5sY20T0kLJcyxEPnp55HepVEXpZeaAirkz38hYgPihTfTHFtn2bL3eKYTYIAu AkOUiqeU9yTpF1Vo7TMlBepnSqdW42fIeL9CyLx8lHwFEaasLrFLttEv25dtxmkQDrKa yw6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=ZFG2dfvRkoUhzppbGaV6wWK1m992+hD9/Faf8yyf96M=; b=j+lf3klxRnH8SV2QHX5b6StNZp5mxXQHYIB6oSuMwGPoie9+bEQOeIbeduKyWhBkql sJ/Kga873pzvwDEYsiISJo03F2cvmxdDPxXal534uLozy8s8bc1xn3lJIX2Q1FjNcwg9 mBl/0Y6oC0yuZ9tf+aFdWqmuYezf0zVaEjnCXBe1P4L9BEIyK6oHqMkNmQ/pvvKQu4/g NsuFFL2wg35z8P4CriCgFftqCuUvXtoOZZyLzK8GOsWzwzZevRubI9I8fy9k+EY7QAGz +QsQvnLO0vu4q93l80T9Un7iTIyOezGvj1W6Bl5SnScL5kCOcCcNlkPCIxgXngOnEgto FKAw== X-Gm-Message-State: APjAAAVfCi8rTXK/ZD89uRCl6r3E+HL0+h+jVckSYNpxAttOxWLuh/gK EBb/nNVJdXRvILsbrGZLOFvzvpQx X-Google-Smtp-Source: APXvYqzBymaib8H9I/enr2dlJeHEbry8X+mpWTZfDuckoymgCNhNlVSaOxAxrB4z1LjwrKtzVmv2HQ== X-Received: by 2002:a17:902:9a95:: with SMTP id w21mr2441479plp.336.1569485071323; Thu, 26 Sep 2019 01:04:31 -0700 (PDT) Received: from x200 ([240f:c7:38e9:1:314b:485c:9ba4:72c6]) by smtp.gmail.com with ESMTPSA id s5sm1248497pjn.24.2019.09.26.01.04.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Sep 2019 01:04:29 -0700 (PDT) From: Maxim Cournoyer References: <87mupva8j5.fsf@cbaines.net> <87zhtt49sk.fsf@gnu.org> <875zwdqgtn.fsf@cbaines.net> Date: Thu, 26 Sep 2019 17:04:24 +0900 In-Reply-To: <875zwdqgtn.fsf@cbaines.net> (Christopher Baines's message of "Sat, 01 Dec 2018 17:48:04 +0000") Message-ID: <87ef03eb5j.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Christopher, Christopher Baines writes: > Ludovic Court=C3=A8s writes: > >> Hello, >> >> Christopher Baines skribis: >> >>> Unfortunately, it's not a proper solution, as it obviously breaks when >>> you actually want to strip the mount point off so that grub can find the >>> right files. >> >> Is there a way =E2=80=98strip-mount-point=E2=80=99 or some higher-level = code could >> determine whether we actually need to strip the mount point? > > So, this is the file-system value that I'm using currently for the > store. The information about subvolume is in the options value. > > (file-system > (device (uuid "84fc6b78-d7ff-45df-8659-bef44b5bf0ea")) > (type "btrfs") > (title 'uuid) > (mount-point "/gnu/store") > (needed-for-boot? #t) > (options "subvol=3D/gnu/store")) Ah, that subvolume name explains why your fix would work. I was confused at first why such fix should work. Grub mounts the Btrfs partition at its 'top level'. In Btrfs, the subvolume names appear as directories under the top level, so in your case not striping the mount-point amounts to prepending the subvolume name to the "real" file path location (as it has the same value as the mount-point). That means that your fix only works when mount-point =3D=3D subvol. Maxim From unknown Fri Sep 05 10:04:47 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Christopher Baines Subject: bug#33517: closed (Re: bug#33517: Problem booting when using btrfs subvolume for /gnu/store) Message-ID: References: <87h7wapwaq.fsf@gmail.com> <87mupva8j5.fsf@cbaines.net> X-Gnu-PR-Message: they-closed 33517 X-Gnu-PR-Package: guix Reply-To: 33517@debbugs.gnu.org Date: Wed, 20 May 2020 13:33:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1589981582-4092-1" This is a multi-part message in MIME format... ------------=_1589981582-4092-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #33517: Problem booting when using btrfs subvolume for /gnu/store which was filed against the guix package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 33517@debbugs.gnu.org. --=20 33517: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D33517 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1589981582-4092-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 33517-done) by debbugs.gnu.org; 20 May 2020 13:32:02 +0000 Received: from localhost ([127.0.0.1]:52646 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jbOp4-00011u-8n for submit@debbugs.gnu.org; Wed, 20 May 2020 09:32:02 -0400 Received: from mail-qk1-f173.google.com ([209.85.222.173]:41329) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jbOp3-00011i-1I for 33517-done@debbugs.gnu.org; Wed, 20 May 2020 09:31:49 -0400 Received: by mail-qk1-f173.google.com with SMTP id n14so3470793qke.8 for <33517-done@debbugs.gnu.org>; Wed, 20 May 2020 06:31:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=4o897JzsZLlo4qjHu2j1M03K1g1tq1TRPWOWy7Mh2uU=; b=HtH53pg1asiiyOuY/sQ2nfE84+d0QDC239uoMwFPyEC/x0C8eQv0d2hKRi3TTc7yYU Wc6IKZYLJkke+/FbjMBy31Laj6bAJFozbQu39iSIiqi22xXitS8J/WKxC2hEuce7iUBQ l8cplmGEANibt92Ed13vFhQqbWEyq6Ve5GlFa6584SnVaAQmvwqRO9ucv2fa6/+BeEdC q1o9FVBKbrJ6MeSYkpsKOwmOe4giSxKs8MyBkHBR0ddhAode3EvMJxi/VzsRhWuJmZmK vTO3TyDsPhtTfb7PdF1Kp7XQbh8ELC8YWSyclz0uMX1Tzp58zoGpttY2S6qDFnlVvuvo DF0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=4o897JzsZLlo4qjHu2j1M03K1g1tq1TRPWOWy7Mh2uU=; b=TabG/bNZEp08lREZPF7Ejki4feSul5z5kx80jYyLJ7sQMfxEVB0bT5HZwVtZD5JMgR xi6YAvAT7k5J5kAY9h6teG2pBp1zkYlscVSeTL0JARAqe9aFo0WiAOVf9QqLcRqoLJ/r eKgCtgdw5IeU+Gcvmdf3Kv9UIBcNTfmXVTkshHuDESCQ8VbsRuOeFv4kDvOam6d8ss2o a/NDKeB538Yrq9s6QuvbE8ewWXL6v2IjlOQdMNHtBg98pHdAvd9bfbAx4njreqKTauuC JrNkIvbY2Qx3s/4JTYaxej4f2cxaAQ01FYYltdM/43OccgB7hsgzr/IyrpS2MlRzqLlZ EocA== X-Gm-Message-State: AOAM5331B3CAoEdKpH+YizqwQmawZOElPuT8j7kgyxAVphDOLJ2enTLk 71VUPVoYjK9aaot8+5tN4Pn5T3cy2NA= X-Google-Smtp-Source: ABdhPJz/mtlIpW4BqfbDSn/D29QdCVR3xCa767KnrqA9nA4HNik8Lgq8fog4EF5QpQDSBdfjWd1nyQ== X-Received: by 2002:a37:6e42:: with SMTP id j63mr4603850qkc.495.1589981503333; Wed, 20 May 2020 06:31:43 -0700 (PDT) Received: from hurd (dsl-10-130-184.b2b2c.ca. [72.10.130.184]) by smtp.gmail.com with ESMTPSA id z19sm2652585qtz.81.2020.05.20.06.31.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 May 2020 06:31:42 -0700 (PDT) From: Maxim Cournoyer To: Christopher Baines Subject: Re: bug#33517: Problem booting when using btrfs subvolume for /gnu/store References: <87mupva8j5.fsf@cbaines.net> Date: Wed, 20 May 2020 09:31:41 -0400 In-Reply-To: <87mupva8j5.fsf@cbaines.net> (Christopher Baines's message of "Mon, 26 Nov 2018 20:27:58 +0000") Message-ID: <87h7wapwaq.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 33517-done Cc: 33517-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Christopher Baines writes: > I'm loosing track of this issue a bit, as I've been dealing with it for > a while. I have a machine that I've setup where /gnu/store is a btrfs > subvolume. I do this so that I can make flexible use of the space on > that btrfs filesystem. > > Unfortunately, the grub configuration generated for this doesn't seem to > account for this, and so it requires some tweaking to get it to boot. [...] This issue is now resolved as of commit 12df6684b983507b2a73e14f45d28a71cddfb3b1 on master. Closing! Maxim ------------=_1589981582-4092-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 26 Nov 2018 20:28:30 +0000 Received: from localhost ([127.0.0.1]:50174 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gRNUb-0002t6-SU for submit@debbugs.gnu.org; Mon, 26 Nov 2018 15:28:30 -0500 Received: from eggs.gnu.org ([208.118.235.92]:51152) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gRNUa-0002su-3J for submit@debbugs.gnu.org; Mon, 26 Nov 2018 15:28:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gRNUT-0002pL-Ku for submit@debbugs.gnu.org; Mon, 26 Nov 2018 15:28:22 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:56489) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gRNUT-0002pH-Go for submit@debbugs.gnu.org; Mon, 26 Nov 2018 15:28:21 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60739) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRNUR-0005lE-TM for bug-guix@gnu.org; Mon, 26 Nov 2018 15:28:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gRNUO-0002nM-Lf for bug-guix@gnu.org; Mon, 26 Nov 2018 15:28:19 -0500 Received: from mira.cbaines.net ([2a01:7e00::f03c:91ff:fe69:8da9]:37630) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRNUH-0002lh-Ha for bug-guix@gnu.org; Mon, 26 Nov 2018 15:28:12 -0500 Received: by mira.cbaines.net (Postfix, from userid 113) id 00F53167E5; Mon, 26 Nov 2018 20:28:01 +0000 (GMT) Received: from localhost (cpc102582-walt20-2-0-cust14.13-2.cable.virginm.net [86.27.34.15]) by mira.cbaines.net (Postfix) with ESMTPSA id 767C516724 for ; Mon, 26 Nov 2018 20:28:01 +0000 (GMT) Received: from capella (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 09138ff3 for ; Mon, 26 Nov 2018 20:28:01 +0000 (UTC) User-agent: mu4e 1.0; emacs 26.1 From: Christopher Baines To: bug-guix@gnu.org Subject: Problem booting when using btrfs subvolume for /gnu/store Date: Mon, 26 Nov 2018 20:27:58 +0000 Message-ID: <87mupva8j5.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain I'm loosing track of this issue a bit, as I've been dealing with it for a while. I have a machine that I've setup where /gnu/store is a btrfs subvolume. I do this so that I can make flexible use of the space on that btrfs filesystem. Unfortunately, the grub configuration generated for this doesn't seem to account for this, and so it requires some tweaking to get it to boot. A long while back, I discovered I could make the following change, then the generated grub configuration would be fine. --=-=-= Content-Type: text/x-patch Content-Disposition: inline --- gnu/bootloader/grub.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm index 06856dd58c..c3ddc3e128 100644 --- a/gnu/bootloader/grub.scm +++ b/gnu/bootloader/grub.scm @@ -320,8 +320,8 @@ entries corresponding to old generations of the system." ;; Use the right file names for KERNEL and INITRD in case ;; DEVICE-MOUNT-POINT is not "/", meaning that the store is on a ;; separate partition. - (let ((kernel (strip-mount-point device-mount-point kernel)) - (initrd (strip-mount-point device-mount-point initrd))) + (let ((kernel kernel) + (initrd initrd)) #~(format port "menuentry ~s { ~a linux ~a ~a -- 2.19.2 --=-=-= Content-Type: text/plain Unfortunately, it's not a proper solution, as it obviously breaks when you actually want to strip the mount point off so that grub can find the right files. I'm creating a bug for this, as I think it would be good to track the issue. I've also written a system test that I believe reproduced the issue. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-WIP-Btrfs-store-subvolume-test.patch Content-Transfer-Encoding: quoted-printable From=207eee5685f95d0b6baeb97f5fdd947fe5223a61c9 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Fri, 26 Oct 2018 18:48:32 +0100 Subject: [PATCH] WIP Btrfs store subvolume test =2D-- gnu/tests/install.scm | 91 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 90 insertions(+), 1 deletion(-) diff --git a/gnu/tests/install.scm b/gnu/tests/install.scm index 4764ffffde..cfa071187c 100644 =2D-- a/gnu/tests/install.scm +++ b/gnu/tests/install.scm @@ -43,7 +43,8 @@ %test-separate-home-os %test-raid-root-os %test-encrypted-os =2D %test-btrfs-root-os)) + %test-btrfs-root-os + %test-btrfs-root-with-store-subvolume-os)) =20 ;;; Commentary: ;;; @@ -826,4 +827,92 @@ build (current-guix) and then store a couple of full s= ystem images.") (command (qemu-command/writable-image image))) (run-basic-test %btrfs-root-os command "btrfs-root-os"))))) =20 + +;;; +;;; Btrfs root file system with store subvolume. +;;; + +(define-os-with-source (%btrfs-root-with-store-subvolume-os + %btrfs-root-with-store-subvolume-os-source) + ;; The OS we want to install. + (use-modules (gnu) (gnu tests) (srfi srfi-1)) + + (operating-system + (host-name "liberigilo") + (timezone "Europe/Paris") + (locale "en_US.UTF-8") + + (bootloader (bootloader-configuration + (bootloader grub-bootloader) + (target "/dev/vdb"))) + (kernel-arguments '("console=3DttyS0")) + (file-systems (cons* (file-system + (device (file-system-label "my-root")) + (mount-point "/") + (type "btrfs")) + (file-system + (device (file-system-label "my-root")) + (mount-point "/gnu/store") + (type "btrfs") + (options "subvol=3D/gnu/store")) + %base-file-systems)) + (users (cons (user-account + (name "charlie") + (group "users") + (home-directory "/home/charlie") + (supplementary-groups '("wheel" "audio" "video"))) + %base-user-accounts)) + (services (cons (service marionette-service-type + (marionette-configuration + (imported-modules '((gnu services herd) + (guix combinators))))) + %base-services)))) + +(define %btrfs-root-with-store-subvolume-installation-script + ;; Shell script of a simple installation. + "\ +. /etc/profile +set -e -x +guix --version + +export GUIX_BUILD_OPTIONS=3D--no-grafts +ls -l /run/current-system/gc-roots +parted --script /dev/vdb mklabel gpt \\ + mkpart primary ext2 1M 3M \\ + mkpart primary ext2 3M 2G \\ + set 1 boot on \\ + set 1 bios_grub on +mkfs.btrfs -L my-root /dev/vdb2 +mount /dev/vdb2 /mnt +btrfs subvolume create /mnt/home +mkdir /mnt/gnu +btrfs subvolume create /mnt/gnu/store +herd start cow-store /mnt +mkdir /mnt/etc +cp /etc/target-config.scm /mnt/etc/config.scm +guix system build /mnt/etc/config.scm +guix system init /mnt/etc/config.scm /mnt --no-substitutes +sync +reboot\n") + +(define %test-btrfs-root-with-store-subvolume-os + (system-test + (name "btrfs-root-with-store-subvolume-os") + (description + "Test basic functionality of an OS installed like one would do by hand. +This test is expensive in terms of CPU and storage usage since we need to +build (current-guix) and then store a couple of full system images.") + (value + (mlet* %store-monad + ((image (run-install + %btrfs-root-with-store-subvolume-os + %btrfs-root-with-store-subvolume-os-source + #:script + %btrfs-root-with-store-subvolume-installation-script)) + + (command (qemu-command/writable-image image))) + (run-basic-test %btrfs-root-with-store-subvolume-os + command + "btrfs-root-with-store-subvolume-os"))))) + ;;; install.scm ends here =2D-=20 2.19.2 --=-=-= Content-Type: text/plain It would be good if a way could be found to make this "just work". I just don't know whether the best way to do that is tweaking the way Guix generates the grub configuration to be aware of the odd mounting, or somehow making grub find things in the subvolume, or something else. Thanks, Chris --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAlv8V05fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9Xdlog//WFBd/LdzhI11lOnfHmS4uVxoAGC5MzZJ6nvThjzrZLxmPVbezYTOnU27 1ye73COsNLFD9I+YO30PcTxXz5fJbe0oOELrHIbb/dfk4tJ3vpR6M3kiWu6DRs2e Nr4+g6KS65oPAgyTp2O3t3NPAWC0pLlSx644ABu1IoGr7/EgsPuZ4F536nNw51zO WXvgGFgRtKsYjTR6AWS3AJF1zxcVW2H6Kr5U6cSSUXjZ5CspgKi9QbAH5ftew/Rc 15wxdrrO8z5F+wR5LVnoTDL5r/0LmHHlNoqvIz4cA/R33SpJkSWiscXGg9gwzfQJ FDMGv/szhIYBXgknAvZSvJJl1NtA+UrmjG4dYXmPPabljyR1giJJhmh4VD6uuspA LXpzTQi9jH6+Mc2FGxFcQ+WdRFuAq9tc9awv2NJKXIufQnOLTLgNbJspP1/jcGEU PfCjC4iCQcYvAJha1jkxfV9U4uVO7wNLZtM1UtXV4Gy47uFH+R2BruTTFqsNB5Tm q6aUkCRtF/hYZiL/bs5IvK9V43vodpKM8Hf7jxyMmipb+dXaNsCAZgxKzBFmVb8b U7oYe40Md0cd3SrlZVju0B61KZPe3i0DW9qh0TVODscKUVd3GCGAOOyNXk3rlyZb KqNX05l3HFAR1QsSZkLYdkz5vrCuLkqjKKjxVB7ZwI7Xz4Wdt7g= =wgZK -----END PGP SIGNATURE----- --==-=-=-- ------------=_1589981582-4092-1-- From unknown Fri Sep 05 10:04:47 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33517: Problem booting when using btrfs subvolume for /gnu/store Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 20 May 2020 19:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33517 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Maxim Cournoyer Cc: 33517-done@debbugs.gnu.org Received: via spool by 33517-done@debbugs.gnu.org id=D33517.15900040162996 (code D ref 33517); Wed, 20 May 2020 19:47:01 +0000 Received: (at 33517-done) by debbugs.gnu.org; 20 May 2020 19:46:56 +0000 Received: from localhost ([127.0.0.1]:54342 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jbUg4-0000mF-81 for submit@debbugs.gnu.org; Wed, 20 May 2020 15:46:56 -0400 Received: from mira.cbaines.net ([212.71.252.8]:35140) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jbUg2-0000m6-IP for 33517-done@debbugs.gnu.org; Wed, 20 May 2020 15:46:55 -0400 Received: from localhost (unknown [46.237.173.189]) by mira.cbaines.net (Postfix) with ESMTPSA id 7291E27BBE1; Wed, 20 May 2020 20:46:53 +0100 (BST) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 8bf1edc1; Wed, 20 May 2020 19:46:50 +0000 (UTC) References: <87mupva8j5.fsf@cbaines.net> <87h7wapwaq.fsf@gmail.com> User-agent: mu4e 1.2.0; emacs 26.3 From: Christopher Baines In-reply-to: <87h7wapwaq.fsf@gmail.com> Date: Wed, 20 May 2020 20:46:44 +0100 Message-ID: <87d06yjsnv.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Maxim Cournoyer writes: > Hello, > > Christopher Baines writes: > >> I'm loosing track of this issue a bit, as I've been dealing with it for >> a while. I have a machine that I've setup where /gnu/store is a btrfs >> subvolume. I do this so that I can make flexible use of the space on >> that btrfs filesystem. >> >> Unfortunately, the grub configuration generated for this doesn't seem to >> account for this, and so it requires some tweaking to get it to boot. > > [...] > > This issue is now resolved as of commit > 12df6684b983507b2a73e14f45d28a71cddfb3b1 on master. Thanks Maxim, I'm guessing the commit that fixes this is b460ba7992a0b4af2ddb5927dcf062784539ef7b. Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl7FiSRfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9XeK7w/+L3Jzqs7WUpQdBJ4sNdPWKQlInAR/1djvGjLLaNTgjF7lNVYsKoZLtfPL 8qgWrgUCAHY9W1J63B9f+ngpfoXKkp15qqQpbzbrE4fReZrx9503/d2+LlKdwKR7 BkaPAOv6LOmZ+G8a/10R9KACpC725+d2hCuY4f7RgzCll58f3TcSB7WbXLwCog1p 455+xMbvJKqL/wYYV8k0tER3abwp2k2YxRe5iSUg68CZGNbZ1XzcE+YiXYOTBhIw bXaTXJmitCU8m86dYe1a7vwuwzipc5a0kDsMkgmsRkI40lnh/rZ2q5lkq6S+VwrC jHwxYxWsEWS1eXNLDJfhaHyTznnI5f3C50uGI5fRQdzyCkptE/PQmekvN2tjrmpE rU8oSnJBT5LWaMWopX4gtlVtj+0lRw9yN4HI0kRBq1L7tvXqUASa6Y4glgXQbVPG y9TUFwrNlj9QiKOMOmRyWheM6FAlVAGAcUFMTTELk03ml8i11fDuQMZQFe7QoOS1 HnlLjV0I8tp4r0YFL+CTdI2cNV1EPrC61TB0n6rqlCyalVcxth8ytlnWMBsNiBDr SIw42+HdETBY9giTWXrrdEO8ln05411EhQb1tmjDajGXsmUXqrEPEHfWdyVzFnyd W/viIlY/YM0JUPwuc/kbhmlcr2/xTsE3tvMt8wbYNS/Z9VKVDR4= =swZi -----END PGP SIGNATURE----- --=-=-=-- From unknown Fri Sep 05 10:04:47 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33517: Problem booting when using btrfs subvolume for /gnu/store Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 21 May 2020 01:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33517 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Christopher Baines Cc: 33517-done@debbugs.gnu.org Received: via spool by 33517-done@debbugs.gnu.org id=D33517.159002485921706 (code D ref 33517); Thu, 21 May 2020 01:35:01 +0000 Received: (at 33517-done) by debbugs.gnu.org; 21 May 2020 01:34:19 +0000 Received: from localhost ([127.0.0.1]:54833 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jba6F-0005e1-H1 for submit@debbugs.gnu.org; Wed, 20 May 2020 21:34:19 -0400 Received: from mail-qk1-f181.google.com ([209.85.222.181]:36418) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jba6D-0005do-Mp for 33517-done@debbugs.gnu.org; Wed, 20 May 2020 21:34:18 -0400 Received: by mail-qk1-f181.google.com with SMTP id y22so5782632qki.3 for <33517-done@debbugs.gnu.org>; Wed, 20 May 2020 18:34:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=AtxhRVAxuCA2fewCqEF4kVpFTM3ZEO9bIWW53hm9pjY=; b=FEVv4jQMFCmWO7DIxxHrt3yqP2iIlcDOZjCWIvivUfsV+uVFKjiDkv1SjU6ttTt6SD QYM0aMN+q0KJWu61yaVlZdodtQgmwQcVyNdbEcKBSy/az0qphZp2Y5c7q2jPXnSsClmu 2JueS9WKiEqOFtGWjiKzVI+QFKEDz/6z1+Tgslsk74E/b2tTsIbAQYN1Adk+bazB7MSW hPfn2w5Pv8iO/cUF/Pfc6/o2tytKy/Q8wdAIEl2U8bIx8ZVT/rlAphUfaC8k+22UMACA alA4jPwK4c1+xtK3XBAlFfd2KjUJd7R8fKenlbhc0rqC1XWrkvN4GG/LD/fEmcahBxGp XZbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=AtxhRVAxuCA2fewCqEF4kVpFTM3ZEO9bIWW53hm9pjY=; b=jxCsk7IGNb1EqOH3hutKO9AOfykJWXgvqi9k61Wrsf3fAvejKNS/lE9VccaIjlnf0L l5nMncGQWu0P8tnslXPsPetzh0zGVA5AbGOAiOUvnEFm5ffvmJmoxxpckREkbkjUweGq 0L0qUYaeQmH6Qj1KaoN23OqSnUWoLLGJVgmW/s3wD4refPK7Oa2J3s25Q2lX8ez+JktA Sp9tJ09ITBI15EBqp1kn3CCakBntb5h+uqiJXty3lN82ZcDQtZqRgz43rBCqz6Wk1hnG p7lBTex27s5Kj9hLjfoC/J91cy0m1pxmxhiIFsQ7zAu3x6ov/IDEvEMtSAMmxq8WfFp7 aPxw== X-Gm-Message-State: AOAM530pASAvLPN1B9DEzlQ/YsT/OOTItoIJwiFPJU9bfqIbwH0MWnCc pNun+6S8V+8G+UgovsLuDGPvS1Keqxo= X-Google-Smtp-Source: ABdhPJywBl9a78PYpiz4EIURN0yIZVxThdjClBFQRtdN07thRQHcFlsXj9Gxksfwv6VDbIOfy1HkmQ== X-Received: by 2002:a37:a412:: with SMTP id n18mr7635870qke.134.1590024851845; Wed, 20 May 2020 18:34:11 -0700 (PDT) Received: from hurd (dsl-10-130-184.b2b2c.ca. [72.10.130.184]) by smtp.gmail.com with ESMTPSA id n123sm3914524qkf.23.2020.05.20.18.34.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 May 2020 18:34:11 -0700 (PDT) From: Maxim Cournoyer References: <87mupva8j5.fsf@cbaines.net> <87h7wapwaq.fsf@gmail.com> <87d06yjsnv.fsf@cbaines.net> Date: Wed, 20 May 2020 21:34:10 -0400 In-Reply-To: <87d06yjsnv.fsf@cbaines.net> (Christopher Baines's message of "Wed, 20 May 2020 20:46:44 +0100") Message-ID: <87d06yoyul.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Christopher, Christopher Baines writes: > Maxim Cournoyer writes: > >> Hello, >> >> Christopher Baines writes: >> >>> I'm loosing track of this issue a bit, as I've been dealing with it for >>> a while. I have a machine that I've setup where /gnu/store is a btrfs >>> subvolume. I do this so that I can make flexible use of the space on >>> that btrfs filesystem. >>> >>> Unfortunately, the grub configuration generated for this doesn't seem to >>> account for this, and so it requires some tweaking to get it to boot. >> >> [...] >> >> This issue is now resolved as of commit >> 12df6684b983507b2a73e14f45d28a71cddfb3b1 on master. > > Thanks Maxim, I'm guessing the commit that fixes this is > b460ba7992a0b4af2ddb5927dcf062784539ef7b. > > Chris Yes (and the two supporting commits right before this one). The one I pointed to includes a news entry. Maxim