Subject: bug#37851: Grub installation only checks for encrypted /boot folder

From: Miguel Arruga Vivas <[email-masked]>
Date: Mon, 21 Oct 2019 14:47:58 +0200

Hi again,

Attached can be found a workaround to mount all encrypted partitions.
There is no way to tell the devices to mount without changing
boot-parameters, where I'd add another field with the needed mapped
devices (a traversal onto the mapped-device dependency tree
of /gnu/store).  Do you think this is a good idea?  At least I think
it's the best way to encode the dependencies into the grub.cfg file,
even though the typical graph will contain 0 or 1 nodes.

Ideas?

Best regards,
Miguel
>From 9b50e2d8eb8b744595a54a9543993eb4e3813742 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miguel=20=C3=81ngel=20Arruga=20Vivas?=
 <[email-masked]>
Date: Mon, 21 Oct 2019 14:35:02 +0200
Subject: [PATCH] system: Mount luks devices on boot.

* gnu/bootloader/grub.scm (grub-configuration-file)[builder]: Mount all
encrypted partitions.
---
 gnu/bootloader/grub.scm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm
index d984d5f5e3..b29477ec71 100644
--- a/gnu/bootloader/grub.scm
+++ b/gnu/bootloader/grub.scm
@@ -369,6 +369,7 @@ keymap ~a~%" keymap)))))
           (format port
                   "# This file was generated from your Guix configuration.  Any changes
 # will be lost upon reconfiguration.
+cryptomount -a
 ")
           #$sugar
           #$keyboard-layout-config
-- 
2.23.0