* bug#70051: guix system hangs on boot with LUKS /home partition
@ 2024-03-28 11:24 Fulbert
2024-03-28 11:49 ` bug#70051: Fulbert
` (5 more replies)
0 siblings, 6 replies; 8+ messages in thread
From: Fulbert @ 2024-03-28 11:24 UTC (permalink / raw)
To: 70051
Hello,
Up to guix 9b84b36, my system was properly booting with a LUKS2 partition
mounted on /home. Starting with guix d5f857a (22 mar 2024), the boot hangs on
the same system using the same configuration.scm file. The only way out I found
when it hangs is hardware shutdown. There are no avaible console nor ssh server
started to help troubleshoot and there is nothing written to /var/log/messages
when it hangs.
I have tried to transfer my /home data to a brand new LUKS1 partition, (as well
as removing pointers to the old LUKS2 partition in my config.scm, of course) and
the problem remains exactly the same, including those error messages (obtained with
a video capture of the screen at boot, after removing 'quiet' from the kernel
command line in grub) :
#+begin_src boot
shepherd[1]: Starting service device-mapping-luks-homes...
shepherd[1]: Service device-mapping-luks-homes failed to start.
shepherd[1]: Exception caught while while starting device-mapping-luks-homes: (unbound-variable #f "Unbound variable: "S" (bytevector?) #f)
#+end_src
Maybe it's worth mentionning that I have then tried one configuration of the
'mapped-device' with 'luks-device-mapping' and another one with
'luks-device-mapping-with-options #:keyfile "/…"'. I also tried one
configuration with the 'source' declared in plain "/dev/..." and another one
declared with the luks '(uuid "…")', but this didnt change anything to the
"symptoms".
So, although I have learned in the process that LUKS2 is not yet fully
supported in guix, this problem also prevents booting using a LUKS1 /home
partition in my case.
Transfering the /home data to a clear (unencrypted) partition is my current
workaround to this problem.
Below is the configuration that has worked for several weeks, if not months, using my LUKS2 /home :
(mapped-devices
(list
(mapped-device
(source (uuid "<the uuid>"))
(target "luks-homes")
(type luks-device-mapping))))
(file-systems
(append
(list
[…]
(file-system (mount-point "/home")
(device (file-system-label "luks-homes"))
(type "ext4")
(dependencies mapped-devices))
[…]
Best regards and thanks for guix !
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#70051:
2024-03-28 11:24 bug#70051: guix system hangs on boot with LUKS /home partition Fulbert
@ 2024-03-28 11:49 ` Fulbert
2024-03-28 11:57 ` bug#70051: Fulbert
` (4 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Fulbert @ 2024-03-28 11:49 UTC (permalink / raw)
To: 70051
… And I forgot to mention that, when the boot hangs, shepherd still responds to ctrl-alt-del by closing some services and then the system hangs with hardware button shutdown as last resort.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#70051:
2024-03-28 11:24 bug#70051: guix system hangs on boot with LUKS /home partition Fulbert
2024-03-28 11:49 ` bug#70051: Fulbert
@ 2024-03-28 11:57 ` Fulbert
2024-03-31 0:56 ` bug#70051: same Lilah Tascheter
` (3 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Fulbert @ 2024-03-28 11:57 UTC (permalink / raw)
To: 70051
And I also forgot to mention *sigh* that I am not the only one affected
by this problem. See : https://lists.gnu.org/archive/html/help-guix/2024-03/msg00152.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#70051: same
2024-03-28 11:24 bug#70051: guix system hangs on boot with LUKS /home partition Fulbert
2024-03-28 11:49 ` bug#70051: Fulbert
2024-03-28 11:57 ` bug#70051: Fulbert
@ 2024-03-31 0:56 ` Lilah Tascheter
2024-04-02 6:23 ` bug#70051: [PATCH] gnu: open-luks-device: Fix unbound variables aurtzy
` (2 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Lilah Tascheter @ 2024-03-31 0:56 UTC (permalink / raw)
To: 70051; +Cc: Fulbert, Remco van 't Veer
yep I got the same issue too. but, in my case, I have an encrypted root
with three other encrypted partitions, none of them my home. initrd
decryption succeeds, but shepherd device-mapper services fail as usual
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#70051: [PATCH] gnu: open-luks-device: Fix unbound variables.
2024-03-28 11:24 bug#70051: guix system hangs on boot with LUKS /home partition Fulbert
` (2 preceding siblings ...)
2024-03-31 0:56 ` bug#70051: same Lilah Tascheter
@ 2024-04-02 6:23 ` aurtzy
2024-04-02 12:14 ` Remco van 't Veer
2024-04-03 18:01 ` bug#70051: guix system hangs on boot with LUKS /home partition Adrien 'neox' Bourmault
2024-04-08 13:20 ` bug#70051: (no subject) Fulbert
5 siblings, 1 reply; 8+ messages in thread
From: aurtzy @ 2024-04-02 6:23 UTC (permalink / raw)
To: 70051; +Cc: aurtzy
It seems like `use-modules' never actually worked due to the way it is eval'd
by the Shepherd, and was only apparent after a change that prevented other
module imports from leaking into the namespace. This is fixed by using direct
references instead.
* gnu/system/mapped-devices.scm (open-luks-device): Use direct references for
variables from other modules.
Fixes: https://issues.guix.gnu.org/70051
Change-Id: I993798e161c4b4fca6e8a4f14eea5042b184ebc9
---
Hi!
I encountered this issue as well, and think I've figured out what was
happening: `use-modules' appears to not work due to the way g-expressions are
evaluated by Shepherd, so after services became properly isolated in their own
modules, the variable references became no longer available. There's a
comment further down in the file that seems to confirm this ("XXX: We're not
at the top level here...").
Can anyone confirm this patch works for them too?
Cheers,
aurtzy
gnu/system/mapped-devices.scm | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/gnu/system/mapped-devices.scm b/gnu/system/mapped-devices.scm
index c19a818453..e46e2c7954 100644
--- a/gnu/system/mapped-devices.scm
+++ b/gnu/system/mapped-devices.scm
@@ -201,14 +201,12 @@ (define* (open-luks-device source targets #:key key-file)
#~(let ((source #$(if (uuid? source)
(uuid-bytevector source)
source))
- (keyfile #$key-file))
- ;; XXX: 'use-modules' should be at the top level.
- (use-modules (rnrs bytevectors) ;bytevector?
- ((gnu build file-systems)
- #:select (find-partition-by-luks-uuid
- system*/tty))
- ((guix build utils) #:select (mkdir-p)))
-
+ (keyfile #$key-file)
+ (bytevector? (@ (rnrs bytevectors) bytevector?))
+ (find-partition-by-luks-uuid (@ (gnu build file-systems)
+ find-partition-by-luks-uuid))
+ (system*/tty (@ (gnu build file-systems) system*/tty))
+ (mkdir-p (@ (guix build utils) mkdir-p)))
;; Create '/run/cryptsetup/' if it does not exist, as device locking
;; is mandatory for LUKS2.
(mkdir-p "/run/cryptsetup/")
base-commit: 6e2db85ca83528199a46b002d2592bd4bef017c8
--
2.41.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* bug#70051: [PATCH] gnu: open-luks-device: Fix unbound variables.
2024-04-02 6:23 ` bug#70051: [PATCH] gnu: open-luks-device: Fix unbound variables aurtzy
@ 2024-04-02 12:14 ` Remco van 't Veer
0 siblings, 0 replies; 8+ messages in thread
From: Remco van 't Veer @ 2024-04-02 12:14 UTC (permalink / raw)
To: aurtzy, 70051
2024/04/02, aurtzy:
> Can anyone confirm this patch works for them too?
Yes, it does.
Cheers,
Remco
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#70051: guix system hangs on boot with LUKS /home partition
2024-03-28 11:24 bug#70051: guix system hangs on boot with LUKS /home partition Fulbert
` (3 preceding siblings ...)
2024-04-02 6:23 ` bug#70051: [PATCH] gnu: open-luks-device: Fix unbound variables aurtzy
@ 2024-04-03 18:01 ` Adrien 'neox' Bourmault
2024-04-08 13:20 ` bug#70051: (no subject) Fulbert
5 siblings, 0 replies; 8+ messages in thread
From: Adrien 'neox' Bourmault @ 2024-04-03 18:01 UTC (permalink / raw)
To: 70051
I can confirm aurtzy's patch works (just tested on top of
7af70efd7633b0d70091762cf43ce01a86176e8e)
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#70051: (no subject)
2024-03-28 11:24 bug#70051: guix system hangs on boot with LUKS /home partition Fulbert
` (4 preceding siblings ...)
2024-04-03 18:01 ` bug#70051: guix system hangs on boot with LUKS /home partition Adrien 'neox' Bourmault
@ 2024-04-08 13:20 ` Fulbert
5 siblings, 0 replies; 8+ messages in thread
From: Fulbert @ 2024-04-08 13:20 UTC (permalink / raw)
To: 70051
guix pull + reconfigure worked for me as well.
Thank you verry much.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-04-08 13:21 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-28 11:24 bug#70051: guix system hangs on boot with LUKS /home partition Fulbert
2024-03-28 11:49 ` bug#70051: Fulbert
2024-03-28 11:57 ` bug#70051: Fulbert
2024-03-31 0:56 ` bug#70051: same Lilah Tascheter
2024-04-02 6:23 ` bug#70051: [PATCH] gnu: open-luks-device: Fix unbound variables aurtzy
2024-04-02 12:14 ` Remco van 't Veer
2024-04-03 18:01 ` bug#70051: guix system hangs on boot with LUKS /home partition Adrien 'neox' Bourmault
2024-04-08 13:20 ` bug#70051: (no subject) Fulbert
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).