From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id z1wyBxf7nV+QNwAA0tVLHw (envelope-from ) for ; Sun, 01 Nov 2020 00:02:31 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id iAF0Ahf7nV9KaQAA1q6Kng (envelope-from ) for ; Sun, 01 Nov 2020 00:02:31 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 7AA789403CC for ; Sun, 1 Nov 2020 00:02:30 +0000 (UTC) Received: from localhost ([::1]:42438 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kZ0pH-00051A-NA for larch@yhetil.org; Sat, 31 Oct 2020 20:02:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34076) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kZ0ot-000513-2L for bug-guix@gnu.org; Sat, 31 Oct 2020 20:02:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51602) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kZ0os-00072X-MU for bug-guix@gnu.org; Sat, 31 Oct 2020 20:02:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kZ0os-0004r9-J7 for bug-guix@gnu.org; Sat, 31 Oct 2020 20:02:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#44196: [PATCH 2/3] system: Add store-directory-prefix to boot-parameters. Resent-From: Miguel =?UTF-8?Q?=C3=81ngel?= Arruga Vivas Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 01 Nov 2020 00:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44196 X-GNU-PR-Package: guix X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 44196-submit@debbugs.gnu.org id=B44196.160418889918637 (code B ref 44196); Sun, 01 Nov 2020 00:02:02 +0000 Received: (at 44196) by debbugs.gnu.org; 1 Nov 2020 00:01:39 +0000 Received: from localhost ([127.0.0.1]:34915 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZ0oU-0004qX-Tq for submit@debbugs.gnu.org; Sat, 31 Oct 2020 20:01:39 -0400 Received: from mail-wr1-f51.google.com ([209.85.221.51]:38873) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZ0oQ-0004qD-Er for 44196@debbugs.gnu.org; Sat, 31 Oct 2020 20:01:36 -0400 Received: by mail-wr1-f51.google.com with SMTP id n18so10414426wrs.5 for <44196@debbugs.gnu.org>; Sat, 31 Oct 2020 17:01:34 -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=HdEN/GS+mMyzY3qGbeBfHG9IcIazmEyHpdwQUyZmHZI=; b=TXYItQoN++beOMP4fKwrzXVKoJRYxzQPlpSESJq5lEDQwko2pM1ljznwqBItRsZ19e xOTMHWlN3pUj26qx0swXHdsoanCAxq3VIu5uPcUqCd1j53j9mhSuS4351m0BwXPAw2x7 C19kpDLw9Vguo4rLVxmvINaxunoVhoAcQz0kEqRoW5q4ktDn0iw2mszsVIK5xnkjKqlO AissGKyRDEnZ8YgGka/ZhSNEWRtrOBbXqgvTTvCF8T84LEZHeP2TQRlcDofLZz0BO2Cs UZM6tK1PusU1EfPJv4WefR0PAJwayK0U5ffZamO3upr8mijoO2NdqsWwp4QY4JLEN72g 81ew== 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=HdEN/GS+mMyzY3qGbeBfHG9IcIazmEyHpdwQUyZmHZI=; b=hzNlvXqrOQO8iq57NZx0aj9YZmzA35PlnGHI4HoNz9yxVQ0PzMEo60+EzAIAArYCgz PR3jui4C2obj/6EGnA8xPxqbHAfCaOQzRpthrrYZOVonFfxTPOZ9WpHcStd815orzcuG hahyY7md0JBs4OxGFgQVCIBN3pKreasbX66WiNQ501EYi+xonM7OeH/0XcJCe31cGIap LUyJMkxl7ealomSG7szmy+SU4PimKL+9zHPQaOd0v12HLqFuoSSU3pKVfxRXO9yMB+yH ZaGhbfynz8ymHp2ESfpVlZLmFeWUyMX8Gk7OwbsWt23XhySjhVoT9OTlyiRG4Zs4g6nT meEg== X-Gm-Message-State: AOAM531m/Fu7JVlbuJKV7U/tlVFYqle+vH8D6hcpwkiNxsRMtxuIYYlf BprEzCyY1LtcsrM63yiU3xNBXC8gjAri9w== X-Google-Smtp-Source: ABdhPJyeh2oMC2ddw2a24zVUDpDuNbV4I2yMXUPLkDg5rLr/KO5tHxEDyHPmbKUByp9fTrJ5LcDL6A== X-Received: by 2002:adf:9502:: with SMTP id 2mr9725613wrs.5.1604188888128; Sat, 31 Oct 2020 17:01:28 -0700 (PDT) Received: from unfall (218.139.134.37.dynamic.jazztel.es. [37.134.139.218]) by smtp.gmail.com with ESMTPSA id h8sm14149490wro.14.2020.10.31.17.01.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 31 Oct 2020 17:01:26 -0700 (PDT) From: Miguel =?UTF-8?Q?=C3=81ngel?= Arruga Vivas References: <878sbvh5j4.fsf@gmail.com> <87y2jvfqon.fsf@gmail.com> <87blgit6qr.fsf@gnu.org> <87361u3sp5.fsf@gmail.com> Date: Sun, 01 Nov 2020 01:01:25 +0100 In-Reply-To: <87361u3sp5.fsf@gmail.com> ("Miguel =?UTF-8?Q?=C3=81ngel?= Arruga Vivas"'s message of "Sun, 01 Nov 2020 00:02:14 +0100") Message-ID: <87y2jm2be2.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.2 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -0.8 (/) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 44196@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=gmail.com header.s=20161025 header.b=TXYItQoN; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Spam-Score: 0.09 X-TUID: X9PPreJL2Ox9 Writing the last email I though about adding this: ---------------------------------------------------------------------------= --- ;; OS's root file system, so it might be a device path like "/dev/sda3". + ;; The 'store-directory-prefix' field contains #f or the actual path of + ;; the store inside the 'store-device' as seen by GRUB, e.g. it would + ;; contain "/storefs" if the store is located in that subvolume of a btr= fs + ;; partition. (root-device boot-parameters-root-device) (bootloader-name boot-parameters-bootloader-name) (bootloader-menu-entries ;list of boot-parameters-bootloader-menu-entries) (store-device boot-parameters-store-device) (store-mount-point boot-parameters-store-mount-point) + (store-directory-prefix boot-parameters-store-directory-prefix) ---------------------------------------------------------------------------= --- WDYT? Happy hacking! Miguel Miguel =C3=81ngel Arruga Vivas writes: > Hi Ludo! > > First of all, thanks for the review. > > Ludovic Court=C3=A8s writes: >> Could you explain why we need =E2=80=98store-directory-prefix=E2=80=99 i= n addition to >> =E2=80=98store-mount-point=E2=80=99? At first sight, looking at the fie= lds in there, >> these two can seem to be synonymous. > > The difference is subtle unless you use btrfs subvolumes... or bind > mounts, which currently probably would fail as the check is only > performed for btrfs partitions---note to self, think about this and > probably prepare a patch. This check was already implemented, but the > parameter was only provided to grub-configuration-file during > init/reconfigure. > > Should I add an explanation of/link the bug on the commit message? Or > maybe is something like this better? > ---- > ;; Mount point of the store device (as in /etc/fstab's second field) > (store-mount-point boot-parameters-store-mount-point) > ;; Actual path of the store inside of the device at boot time. > (store-directory-prefix boot-parameters-store-directory-prefix) > ---- > > In any case, if that doesn't clarify enough, it can be better understood > with an example: > ----- > Disk configuration: > /dev/xda1: btrfs file system > - /rootfs: subvolume mounted on / > - /gnufs: subvolume mounted on /gnu. > > Therefore the serialized boot-parameters should be: > (boot-parameters > ... > (store > (device "/dev/xda1") > (mount-point "/gnu") > (directory-prefix "/gnufs")) > ...) > ----- > This way grub.cfg generation is able to `normalize-file' store paths and > transform the user visible file /gnu/store/xxxxx-kernel to the grub > visible path /gnufs/store/xxxx-kernel in the final file. This is > already provided by the operating-system definition, but the other calls > to the boot configuration generator only rely on the information > provided by boot-parameters. > > A simple test case that I haven't implemented yet as a marionette---but > I should anyway---only needs this steps: > > 1. Create initial os with that kind of disk configuration. > 2. Boot on it. > 3. Create a second generation. > 4. Call guix system delete-generations. > 5. Reboot---it doesn't as grub.cfg is wrong. > 6. Usual tests. > > Tomorrow I won't be able to do much, but this Monday I could try to > implement something like this too if you think it's worth. > >> Also patch #3 doesn=E2=80=99t depend on it, does it? > > All the patches are independent, as they fix separate issues, but all > are related with bugs detected with my tests with btrfs subvolumes. I > should have specified that they were a patch set, even though that one > was getting close to become a series... hopefully convergent. :) > > Thanks again, > Miguel