all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Miguel Ángel Arruga Vivas" <rosen644835@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 44196@debbugs.gnu.org
Subject: bug#44196: [PATCH 2/3] system: Add store-directory-prefix to boot-parameters.
Date: Sun, 01 Nov 2020 01:01:25 +0100	[thread overview]
Message-ID: <87y2jm2be2.fsf@gmail.com> (raw)
In-Reply-To: <87361u3sp5.fsf@gmail.com> ("Miguel Ángel Arruga Vivas"'s message of "Sun, 01 Nov 2020 00:02:14 +0100")

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 btrfs
+  ;; partition.
   (root-device      boot-parameters-root-device)
   (bootloader-name  boot-parameters-bootloader-name)
   (bootloader-menu-entries                        ;list of <menu-entry>
    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 Ángel Arruga Vivas <rosen644835@gmail.com> writes:

> Hi Ludo!
>
> First of all, thanks for the review.
>
> Ludovic Courtès <ludo@gnu.org> writes:
>> Could you explain why we need ‘store-directory-prefix’ in addition to
>> ‘store-mount-point’?  At first sight, looking at the fields 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’t 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




  reply	other threads:[~2020-11-01  0:02 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-24 17:56 bug#44196: Problems with /gnu/store in a different btrfs subvolume Miguel Ángel Arruga Vivas
2020-10-24 18:01 ` bug#44196: [PATCH 1/3] system: Fix grub keymap with store in " Miguel Ángel Arruga Vivas
2020-10-30 19:36   ` Danny Milosavljevic
2020-10-30 21:38     ` Miguel Ángel Arruga Vivas
2020-10-24 18:02 ` bug#44196: [PATCH 2/3] system: Add store-directory-prefix to boot-parameters Miguel Ángel Arruga Vivas
2020-10-31 21:39   ` Ludovic Courtès
2020-10-31 23:02     ` Miguel Ángel Arruga Vivas
2020-11-01  0:01       ` Miguel Ángel Arruga Vivas [this message]
2020-11-01  1:44         ` Miguel Ángel Arruga Vivas
2020-11-02 16:06       ` Ludovic Courtès
2020-11-02 18:52         ` Miguel Ángel Arruga Vivas
2020-11-03  9:26           ` Ludovic Courtès
2020-10-24 21:13 ` bug#44196: [PATCH 3/3] gnu: grub: Add output locale Miguel Ángel Arruga Vivas
2020-10-25 10:04   ` bug#44196: [PATCH 3/3 v2] gnu: grub: Add locale output Miguel Ángel Arruga Vivas
2020-10-26 22:04     ` bug#44196: [PATCH 3/3 v3] system: Do not depend on locale folder generated by grub-install Miguel Ángel Arruga Vivas
2020-10-28 21:34       ` bug#44196: [PATCH v4 3/4] system: Do not depend on locale folder generated by Miguel Ángel Arruga Vivas
2020-10-30 18:13         ` bug#44196: [PATCH v5 " Miguel Ángel Arruga Vivas
2020-10-30 21:45           ` bug#44196: [PATCH v6 " Miguel Ángel Arruga Vivas
2020-10-31 21:44             ` Ludovic Courtès
2020-11-01  0:36               ` Miguel Ángel Arruga Vivas
2020-10-26 22:29 ` bug#44196: [PATCH 4/3] system: Fix dependency for grub.cfg generation Miguel Ángel Arruga Vivas
2020-10-30 19:35   ` Danny Milosavljevic
2020-10-30 21:38     ` Miguel Ángel Arruga Vivas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y2jm2be2.fsf@gmail.com \
    --to=rosen644835@gmail.com \
    --cc=44196@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.