bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#28445: match-error in 'device-sexp->device' while building system


From: Marius Bakke
Subject: bug#28445: match-error in 'device-sexp->device' while building system
Date: Wed, 13 Sep 2017 17:37:50 +0200
User-agent: Notmuch/0.25 (https://notmuchmail.org) Emacs/25.2.1 (x86_64-unknown-linux-gnu)

Mark H Weaver <address@hidden> writes:

> I just started getting this error while trying to build my x86_64 GuixSD
> system:
>
> --8<---------------cut here---------------start------------->8---
> address@hidden ~$ guix system build -K /etc/config-new.scm
> Backtrace:
>           14 (primitive-load "/home/mhw/guix/scripts/guix")
> In guix/ui.scm:
>   1331:12 13 (run-guix-command _ . _)
> In ice-9/boot-9.scm:
>     837:9 12 (catch _ _ #<procedure 7f67b07988c0 at guix/ui.scm:448…> …)
>     837:9 11 (catch _ _ #<procedure 7f67b07988d8 at guix/ui.scm:536…> …)
> In guix/scripts/system.scm:
>    1025:8 10 (_)
>     908:6  9 (process-action _ _ _)
> In guix/store.scm:
>   1443:24  8 (run-with-store _ _ #:guile-for-build _ #:system _ # _)
> In guix/scripts/system.scm:
>    661:31  7 (_ _)
> In srfi/srfi-1.scm:
>    705:23  6 (filter-map #<procedure system->boot-parameters (sys…> . #)
> In ice-9/boot-9.scm:
>     837:9  5 (catch system-error #<procedure 640e660 at guix/script…> …)
> In guix/scripts/system.scm:
>    385:30  4 (_)
> In gnu/system.scm:
>    307:17  3 (read-boot-parameters-file "/var/guix/profiles/system-9…")
> In ice-9/ports.scm:
>    444:17  2 (call-with-input-file _ _ #:binary _ #:encoding _ # _)
> In gnu/system.scm:
>    282:10  1 (read-boot-parameters _)
>     238:4  0 (device-sexp->device _)
>
> gnu/system.scm:238:4: In procedure device-sexp->device:
> gnu/system.scm:238:4: Throw to key `match-error' with args `("match" "no 
> matching pattern" #f)'.
> --8<---------------cut here---------------end--------------->8---

[...]

>   ;; Specify a mapped device for the encrypted root partition.
>   ;; The UUID is that returned by 'cryptsetup luksUUID'.
>   (mapped-devices
>    (list (mapped-device
>           (source (uuid "a56c53e7-b345-4e24-a17b-6cf158dbc7d3"))
>           (target "jojen-root")
>           (type luks-device-mapping))))
>
>   (file-systems (cons* (file-system
>                          ;; XXX This doesn't seem to work
>                          ;; (device "jojen-root")
>                          ;; (title 'label)
>                          (device "/dev/mapper/jojen-root")
>                          (title 'device)
>                          (mount-point "/")
>                          (type "btrfs")
>                          (dependencies mapped-devices))
>                        %base-file-systems))

I have an identical setup, and the problem is that the parameters file
contains "(store (device #f))".  You can confirm this by `cat
/var/guix/profiles/system-9-link/parameters`.

This patch fixes the parameters generation, but you have to move away
the profile symlinks that contains the broken parameters file before you
can use `guix system` again).

From 5ca849b84c02f5d213b40c654f1449e19adb5471 Mon Sep 17 00:00:00 2001
From: Marius Bakke <address@hidden>
Date: Tue, 12 Sep 2017 21:03:36 +0200
Subject: [PATCH] system: Recognize device titles when creating boot
 parameters.

This solves a problem where the store device would be #f in profile
parameters when not using uuid or labels.

* gnu/system.scm (fs->boot-device): Add case for when FILE-SYSTEM-TITLE is
a "device".
---
 gnu/system.scm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gnu/system.scm b/gnu/system.scm
index c4404f593..767fc0784 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -902,6 +902,7 @@ device in a <menu-entry>."
   (case (file-system-title fs)
     ((uuid) (file-system-device fs))
     ((label) (file-system-device fs))
+    ((device) (file-system-device fs))
     (else #f)))
 
 (define (operating-system-boot-parameters os system.drv root-device)
-- 
2.14.1

I wasn't sure if this solution is correct in the general case, as I also
get a warning from GRUB "/dev/mapper/foo-root is not a valid boot
device", but that is probably another issue.

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]