GNU bug report logs - #28445
match-error in 'device-sexp->device' while building system

Previous Next

Package: guix;

Reported by: Mark H Weaver <mhw <at> netris.org>

Date: Wed, 13 Sep 2017 14:43:02 UTC

Severity: important

Done: ludo <at> gnu.org (Ludovic Courtès)

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 28445 in the body.
You can then email your comments to 28445 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#28445; Package guix. (Wed, 13 Sep 2017 14:43:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mark H Weaver <mhw <at> netris.org>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Wed, 13 Sep 2017 14:43:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Mark H Weaver <mhw <at> netris.org>
To: bug-guix <at> gnu.org
Subject: match-error in 'device-sexp->device' while building system
Date: Wed, 13 Sep 2017 10:41:39 -0400
I just started getting this error while trying to build my x86_64 GuixSD
system:

--8<---------------cut here---------------start------------->8---
mhw <at> jojen ~$ 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---

I'm on commit 01ef804d69b2e57dd7b1d3d13e66e3f67e7c548a plus some local
patches that are likely not relevant to this issue.

Here's my config file /etc/config-new.scm:

--8<---------------cut here---------------start------------->8---
;; This is an operating system configuration template
;; for a "desktop" setup with GNOME and Xfce where the
;; root partition is encrypted with LUKS.

(use-modules (gnu) (gnu system nss) (srfi srfi-1) (guix packages))
(use-service-modules base desktop networking xorg dbus)
(use-package-modules certs gnome cryptsetup linux admin guile firmware xdisorg libusb)

(define keymap
  (plain-file
   "keymap"
   "keymaps 0-255
keycode 42 = Shift
keycode 54 = Shift
keycode 29 = Control
keycode 58 = Control
keycode 56 = Alt
keycode 100 = Alt
alt shift keycode 1 = Meta_Escape
alt shift keycode 2 = Meta_exclam
alt shift keycode 3 = Meta_at
alt shift keycode 4 = Meta_numbersign
alt shift keycode 5 = Meta_dollar
alt shift keycode 6 = Meta_percent
alt shift keycode 7 = Meta_asciicircum
shift control keycode 7 = Control_asciicircum
control alt keycode 7 = Meta_Control_asciicircum
shift control alt keycode 7 = Meta_Control_asciicircum
alt shift keycode 8 = Meta_ampersand
alt shift keycode 9 = Meta_asterisk
alt shift keycode 10 = Meta_parenleft
alt shift keycode 11 = Meta_parenright
alt shift keycode 12 = Meta_underscore
shift control keycode 12 = Control_underscore
control alt keycode 12 = Meta_Control_underscore
shift control alt keycode 12 = Meta_Control_underscore
alt shift keycode 13 = Meta_plus
alt shift keycode 14 = Meta_Delete
alt shift keycode 15 = Meta_Tab
alt shift keycode 16 = Meta_Q
alt shift keycode 17 = Meta_W
alt shift keycode 18 = Meta_E
alt shift keycode 19 = Meta_R
alt shift keycode 20 = Meta_T
alt shift keycode 21 = Meta_Y
alt shift keycode 22 = Meta_U
alt shift keycode 23 = Meta_I
alt shift keycode 24 = Meta_O
alt shift keycode 25 = Meta_P
alt shift keycode 26 = Meta_braceleft
control alt keycode 26 = Meta_Escape
alt shift keycode 27 = Meta_braceright
control alt keycode 27 = Meta_Control_bracketright
alt shift keycode 28 = Meta_Return
alt shift keycode 29 = Meta_Control
alt shift keycode 30 = Meta_A
alt shift keycode 31 = Meta_S
alt shift keycode 32 = Meta_D
alt shift keycode 33 = Meta_F
alt shift keycode 34 = Meta_G
alt shift keycode 35 = Meta_H
alt shift keycode 36 = Meta_J
alt shift keycode 37 = Meta_K
alt shift keycode 38 = Meta_L
alt shift keycode 39 = Meta_colon
alt shift keycode 40 = Meta_quotedbl
alt shift keycode 41 = Meta_asciitilde
alt shift keycode 43 = Meta_bar
control alt keycode 43 = Meta_Control_backslash
alt shift keycode 44 = Meta_Z
alt shift keycode 45 = Meta_X
alt shift keycode 46 = Meta_C
alt shift keycode 47 = Meta_V
alt shift keycode 48 = Meta_B
alt shift keycode 49 = Meta_N
alt shift keycode 50 = Meta_M
alt shift keycode 51 = Meta_less
alt shift keycode 52 = Meta_greater
alt shift keycode 53 = Meta_question
alt shift keycode 57 = Meta_space
"))

(operating-system
  (host-name "jojen")
  (timezone "US/Eastern")
  (locale "en_US.utf8")

  (bootloader (bootloader-configuration
	       (bootloader grub-bootloader)
	       (target "/dev/sda")))

  (kernel linux-libre)

  (firmware (list ath9k-htc-firmware))

  ;; 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))

  (users (cons* (user-account
                 (name "mhw")
                 (uid 1000)
                 (group "mhw")
                 (supplementary-groups '("wheel" "users" "netdev"
                                         "audio" "video" "dialout"))
                 (home-directory "/home/mhw"))
                %base-user-accounts))

  (groups (cons* (user-group
                  (name "mhw")
                  (id 1000))
                 %base-groups))

  (setuid-programs
   (list (file-append shadow "/bin/passwd")
         (file-append inetutils "/bin/ping")))

  ;; This is where we specify system-wide packages.
  (packages (cons* nss-certs         ;for HTTPS access
                   gvfs              ;for user mounts
                   cryptsetup
                   btrfs-progs
                   wpa-supplicant
                   network-manager
                   network-manager-applet
                   (delete sudo %base-packages)))

  (services (cons* (console-keymap-service keymap)
                   ;;(xfce-desktop-service)
                   (gnome-desktop-service)
                   (service network-manager-service-type
                            (network-manager-configuration))
                   (service wpa-supplicant-service-type wpa-supplicant)

                   ;; Desktop services follow
                   (slim-service)
                   ;;(screen-locker-service slock)
                   (screen-locker-service xlockmore "xlock")
                   (simple-service 'mtp udev-service-type (list libmtp))
                   ;;(avahi-service)    ; I don't trust this
                   ;;(wicd-service)     ; using NetworkManager instead
                   (udisks-service)
                   (upower-service)
                   (colord-service)
                   ;;(geoclue-service)  ; I don't want this
                   (polkit-service)
                   (elogind-service)
                   (dbus-service)
                   ;;(ntp-service)      ; I don't trust this

                   (modify-services (remove (lambda (svc)
                                              (eq? (service-kind svc)
                                                   wicd-service-type))
                                            %base-services)
                     ;; This is for debugging
                     #;
                     (nscd-service-type config =>
                                        (nscd-configuration
                                          (inherit config)
                                          (debug-level 3)
                                          (log-file "/var/log/nscd.log")))
                     ;; I don't trust the build farm
                     (guix-service-type config =>
                                        (guix-configuration
                                          (inherit config)
                                          (use-substitutes? #f)
                                          (authorized-keys '())
                                          (substitute-urls '())
                                          (extra-options '("--gc-keep-derivations=yes"
                                                           "--gc-keep-outputs=yes")))))))

  ;; Allow resolution of '.local' host names with mDNS.
  ;;(name-service-switch %mdns-host-lookup-nss)  ; disabled for now
  )
--8<---------------cut here---------------end--------------->8---




Information forwarded to bug-guix <at> gnu.org:
bug#28445; Package guix. (Wed, 13 Sep 2017 15:38:02 GMT) Full text and rfc822 format available.

Message #8 received at 28445 <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <mbakke <at> fastmail.com>
To: Mark H Weaver <mhw <at> netris.org>, 28445 <at> debbugs.gnu.org
Subject: Re: bug#28445: match-error in 'device-sexp->device' while building
 system
Date: Wed, 13 Sep 2017 17:37:50 +0200
[Message part 1 (text/plain, inline)]
Mark H Weaver <mhw <at> netris.org> writes:

> I just started getting this error while trying to build my x86_64 GuixSD
> system:
>
> --8<---------------cut here---------------start------------->8---
> mhw <at> jojen ~$ 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).

[0001-system-Recognize-device-titles-when-creating-boot-pa.patch (text/x-patch, inline)]
From 5ca849b84c02f5d213b40c654f1449e19adb5471 Mon Sep 17 00:00:00 2001
From: Marius Bakke <mbakke <at> fastmail.com>
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

[Message part 3 (text/plain, inline)]
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.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#28445; Package guix. (Wed, 13 Sep 2017 18:33:01 GMT) Full text and rfc822 format available.

Message #11 received at 28445 <at> debbugs.gnu.org (full text, mbox):

From: Mark H Weaver <mhw <at> netris.org>
To: 28445 <at> debbugs.gnu.org
Subject: Re: bug#28445: match-error in 'device-sexp->device' while building
 system
Date: Wed, 13 Sep 2017 14:32:26 -0400
Mark H Weaver <mhw <at> netris.org> writes:

> I just started getting this error while trying to build my x86_64 GuixSD
> system:
>
> mhw <at> jojen ~$ guix system build -K /etc/config-new.scm
[...]
> 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)'.

This is ultimately caused by the fact that
/var/guix/profiles/system-*-link/parameters, for every system I have,
includes:

  (store (device #f) (mount-point "/"))

It's worth noting that my root device is unusual: it is a btrfs
filesystem within a LUKS-encrypted partition.  See below for the
relevant excerpts of my OS configuration:

> (operating-system
[...]
>   ;; 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))

       Mark




Information forwarded to bug-guix <at> gnu.org:
bug#28445; Package guix. (Wed, 13 Sep 2017 21:25:02 GMT) Full text and rfc822 format available.

Message #14 received at 28445 <at> debbugs.gnu.org (full text, mbox):

From: Mark H Weaver <mhw <at> netris.org>
To: Marius Bakke <mbakke <at> fastmail.com>
Cc: 28445 <at> debbugs.gnu.org
Subject: Re: bug#28445: match-error in 'device-sexp->device' while building
 system
Date: Wed, 13 Sep 2017 17:24:25 -0400
Hi Marius,

Marius Bakke <mbakke <at> fastmail.com> writes:

> 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`.

Indeed, I discovered that as well.

> 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 <mbakke <at> fastmail.com>
> Date: Tue, 12 Sep 2017 21:03:36 +0200
> Subject: [PATCH] system: Recognize device titles when creating boot
>  parameters.

Thanks very much for this, but I think we should find a solution that
doesn't involve discarding all existing system generations.  The problem
is, we would have to take a leap of faith that the newly generated
system will work.  We should not ask users with similar setups to take
that leap of faith and possibly end up with an unbootable system in need
of rescue.  Guix is supposed to prevent this situation from happening.

At least for some transition period, it would be good to find a way to
cope with (store (device #f)) in some older system generations.

What do you think?

      Mark




Information forwarded to bug-guix <at> gnu.org:
bug#28445; Package guix. (Wed, 13 Sep 2017 23:54:02 GMT) Full text and rfc822 format available.

Message #17 received at 28445 <at> debbugs.gnu.org (full text, mbox):

From: Mark H Weaver <mhw <at> netris.org>
To: Marius Bakke <mbakke <at> fastmail.com>
Cc: 28445 <at> debbugs.gnu.org
Subject: Re: bug#28445: match-error in 'device-sexp->device' while building
 system
Date: Wed, 13 Sep 2017 19:53:06 -0400
For now, to allow me to apply security updates to my system, I reverted
the following commits:

  96da5d629 system: Add gexp compiler for <operating-system>.
  45bba4751 store: 'run-with-store' has a #:target parameter.
  fc2de6ce1 guix system: Pretty-print device UUIDs.
  7940188eb system: Fix typo in 'read-boot-parameters'.
  5f7fe1c57 vm: Generate a UUID to identify the root file system.
  fd3b4b985 vm: Allow users to specify a UUID for the root partition.
  ce094b466 uuid: 'uuid' macro supports more UUID types.
  075681d35 system: Serialize the UUID type in the "parameters" file.
  9b336338c system: Introduce a disjoint UUID type.
  d1ff5f9db services: file-system: Use 'file-system->spec'.
  47cef4eca file-systems: Introduce (gnu system uuid).
  943e1b975 services: base: Import the closure of (gnu build file-systems).

and this allows me to build a new system.

      Mark




Information forwarded to bug-guix <at> gnu.org:
bug#28445; Package guix. (Thu, 14 Sep 2017 06:04:02 GMT) Full text and rfc822 format available.

Message #20 received at 28445 <at> debbugs.gnu.org (full text, mbox):

From: Mark H Weaver <mhw <at> netris.org>
To: Marius Bakke <mbakke <at> fastmail.com>
Cc: 28445 <at> debbugs.gnu.org
Subject: Re: bug#28445: match-error in 'device-sexp->device' while building
 system
Date: Thu, 14 Sep 2017 02:03:27 -0400
I wrote:
> For now, to allow me to apply security updates to my system, I
> reverted the following commits:

To be clear, I reverted these commits only on a private branch in my
local git repo.

     Mark


>   96da5d629 system: Add gexp compiler for <operating-system>.
>   45bba4751 store: 'run-with-store' has a #:target parameter.
>   fc2de6ce1 guix system: Pretty-print device UUIDs.
>   7940188eb system: Fix typo in 'read-boot-parameters'.
>   5f7fe1c57 vm: Generate a UUID to identify the root file system.
>   fd3b4b985 vm: Allow users to specify a UUID for the root partition.
>   ce094b466 uuid: 'uuid' macro supports more UUID types.
>   075681d35 system: Serialize the UUID type in the "parameters" file.
>   9b336338c system: Introduce a disjoint UUID type.
>   d1ff5f9db services: file-system: Use 'file-system->spec'.
>   47cef4eca file-systems: Introduce (gnu system uuid).
>   943e1b975 services: base: Import the closure of (gnu build file-systems).
>
> and this allows me to build a new system.





Information forwarded to bug-guix <at> gnu.org:
bug#28445; Package guix. (Sun, 17 Sep 2017 19:52:02 GMT) Full text and rfc822 format available.

Message #23 received at 28445 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Mark H Weaver <mhw <at> netris.org>
Cc: 28445 <at> debbugs.gnu.org, Marius Bakke <mbakke <at> fastmail.com>
Subject: Re: bug#28445: match-error in 'device-sexp->device' while building
 system
Date: Sun, 17 Sep 2017 21:51:18 +0200
[Message part 1 (text/plain, inline)]
Hello,

Apologies for not chiming in earlier!

Mark H Weaver <mhw <at> netris.org> skribis:

> At least for some transition period, it would be good to find a way to
> cope with (store (device #f)) in some older system generations.
>
> What do you think?

I think the patch below, which is Marius’ patch + adjusts
‘read-boot-parameters’ to cope with #f store-device, should solve the
issue.

Could you check if it works for you?

Thanks, and sorry for the delay!

Ludo’.

[Message part 2 (text/x-patch, inline)]
diff --git a/gnu/system.scm b/gnu/system.scm
index c4404f593..528527ba9 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -278,6 +278,8 @@ directly by the user."
 
       (store-device
        (match (assq 'store rest)
+         (('store ('device #f) _ ...)
+          root-device)
          (('store ('device device) _ ...)
           (device-sexp->device device))
          (_                                       ;the old format
@@ -902,6 +904,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)

Information forwarded to bug-guix <at> gnu.org:
bug#28445; Package guix. (Mon, 18 Sep 2017 17:30:02 GMT) Full text and rfc822 format available.

Message #26 received at 28445 <at> debbugs.gnu.org (full text, mbox):

From: Mark H Weaver <mhw <at> netris.org>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: 28445 <at> debbugs.gnu.org, Marius Bakke <mbakke <at> fastmail.com>
Subject: Re: bug#28445: match-error in 'device-sexp->device' while building
 system
Date: Mon, 18 Sep 2017 13:29:14 -0400
Hi Ludovic,

ludo <at> gnu.org (Ludovic Courtès) writes:

> Mark H Weaver <mhw <at> netris.org> skribis:
>
>> At least for some transition period, it would be good to find a way to
>> cope with (store (device #f)) in some older system generations.
>>
>> What do you think?
>
> I think the patch below, which is Marius’ patch + adjusts
> ‘read-boot-parameters’ to cope with #f store-device, should solve the
> issue.
>
> Could you check if it works for you?

I applied this, and my system boots, but there are errors that occur
within GRUB that didn't happen before this batch of recent commits (the
ones I mentioned reverting earlier).

At two points during boot, GRUB prints an error (paraphrasing): no such
device: /dev/mapper/jojen-root.

* It happens once after entering my disk encryption password for GRUB,
  but before the menu is displayed.

* It happens again after selecting the desired menu item, but before
  loading the kernel.

The origin of these problems can be seen in the diff between my old
grub.cfg and the new one:

--8<---------------cut here---------------start------------->8---
--- /gnu/store/5vw8y4kyl0606wg0sgh8xsm2czshdprl-grub.cfg	1969-12-31 19:00:01.000000000 -0500
+++ /boot/grub/grub.cfg	2017-09-18 05:19:39.240461714 -0400
@@ -21,7 +21,7 @@
 }
 
 # Set 'root' to the partition that contains /gnu/store.
-search --file --set /gnu/store/21ngnlx9k0x9x2jj1px7mdlb4j6mzz6x-grub-2.02/share/grub/unicode.pf2
+search --label --set /dev/mapper/jojen-root
 
 if loadfont /gnu/store/21ngnlx9k0x9x2jj1px7mdlb4j6mzz6x-grub-2.02/share/grub/unicode.pf2; then
   setup_gfxterm
--8<---------------cut here---------------end--------------->8---

Above, it changed from a working method to a non-working method to find
the encrypted partition within GRUB.

--8<---------------cut here---------------start------------->8---
@@ -42,15 +42,20 @@
 set default=0
 set timeout=5
 menuentry "GNU with Linux-Libre 4.13.2 (beta)" {
-  search --file --set /gnu/store/r64778rd9s1hy1yjbvlr17yq16vhwblq-linux-libre-4.13.2/bzImage
-  linux /gnu/store/r64778rd9s1hy1yjbvlr17yq16vhwblq-linux-libre-4.13.2/bzImage --root=/dev/mapper/jojen-root --system=/gnu/store/3lprqk4zdwhz4lvryhalymf2xks8f6yr-system --load=/gnu/store/3lprqk4zdwhz4lvryhalymf2xks8f6yr-system/boot
-  initrd /gnu/store/rqn1zs2pjbk54b1mpsy98qwsbkxj94q5-raw-initrd/initrd
+  search --label --set /dev/mapper/jojen-root
+  linux /gnu/store/r64778rd9s1hy1yjbvlr17yq16vhwblq-linux-libre-4.13.2/bzImage --root=/dev/mapper/jojen-root --system=/gnu/store/7i0f249xi92fjf4r6990s2rmlhjhiq9w-system --load=/gnu/store/7i0f249xi92fjf4r6990s2rmlhjhiq9w-system/boot
+  initrd /gnu/store/0cpz988g0yvq4wimiqw2zd7cc18ak4p4-raw-initrd/initrd
 }
--8<---------------cut here---------------end--------------->8---

and here, the same issue with GRUB's "search" command previously
searching for a file, and now searching for a label that doesn't exist.

Here's what ends up in the 'parameters' file of my new system:
  (store (device "/dev/mapper/jojen-root") (mount-point "/"))

It manages to boot anyway, but it pauses and prompts me to press a key
(to make sure I saw this error) twice during early boot.  It would be
good to handle this root filesystem configuration more gracefully.

Or is my OS configuration to blame?

     Thanks!
       Mark




Information forwarded to bug-guix <at> gnu.org:
bug#28445; Package guix. (Mon, 18 Sep 2017 21:35:02 GMT) Full text and rfc822 format available.

Message #29 received at 28445 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Mark H Weaver <mhw <at> netris.org>
Cc: 28445 <at> debbugs.gnu.org, Marius Bakke <mbakke <at> fastmail.com>
Subject: Re: bug#28445: match-error in 'device-sexp->device' while building
 system
Date: Mon, 18 Sep 2017 23:34:26 +0200
[Message part 1 (text/plain, inline)]
Hi,

Mark H Weaver <mhw <at> netris.org> skribis:

>  # Set 'root' to the partition that contains /gnu/store.
> -search --file --set /gnu/store/21ngnlx9k0x9x2jj1px7mdlb4j6mzz6x-grub-2.02/share/grub/unicode.pf2
> +search --label --set /dev/mapper/jojen-root

Oops.  I believe the patch below does the trick (‘store-device’ must
never be a Linux device name, and that’s what the patch ensures.)

Thoughts?

(I didn’t notice these issues because I identify my root file system by
label or UUID rather than hard-coding its /dev/mapper name.)

Ludo’.

[Message part 2 (text/x-patch, inline)]
diff --git a/gnu/system.scm b/gnu/system.scm
index d337e5259..d71b9c15b 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -243,6 +243,11 @@ directly by the user."
       ((? string? device)
        device)))
 
+  (define (ensure-not-/dev device)
+    (if (and (string? device) (string-prefix? "/" device))
+        #f
+        device))
+
   (match (read port)
     (('boot-parameters ('version 0)
                        ('label label) ('root-device root)
@@ -277,15 +282,16 @@ directly by the user."
           file)))
 
       (store-device
-       (match (assq 'store rest)
-         (('store ('device device) _ ...)
-          (device-sexp->device device))
-         (_                                       ;the old format
-          ;; Root might be a device path like "/dev/sda1", which is not a
-          ;; suitable GRUB device identifier.
-          (if (string-prefix? "/" root)
-              #f
-              root))))
+       ;; ROOT might be a device path like "/dev/sda1", which is not a
+       ;; suitable GRUB device identifier.
+       (ensure-not-/dev
+        (match (assq 'store rest)
+          (('store ('device #f) _ ...)
+           root-device)
+          (('store ('device device) _ ...)
+           (device-sexp->device device))
+          (_                                      ;the old format
+           root-device))))
 
       (store-mount-point
        (match (assq 'store rest)
@@ -906,6 +912,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)


Information forwarded to bug-guix <at> gnu.org:
bug#28445; Package guix. (Wed, 20 Sep 2017 21:28:01 GMT) Full text and rfc822 format available.

Message #32 received at 28445 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Mark H Weaver <mhw <at> netris.org>
Cc: 28445 <at> debbugs.gnu.org, Marius Bakke <mbakke <at> fastmail.com>
Subject: Re: bug#28445: match-error in 'device-sexp->device' while building
 system
Date: Wed, 20 Sep 2017 23:27:17 +0200
Hello Mark,

Andy pushed the first half of the fix as
96bc6518002c3b2ad9f15cf36991b20bebcbbe8a.  Could you check whether the
‘ensure-not-/dev’ part below solves the rest?

Thanks,
Ludo’.

ludo <at> gnu.org (Ludovic Courtès) skribis:

> Mark H Weaver <mhw <at> netris.org> skribis:
>
>>  # Set 'root' to the partition that contains /gnu/store.
>> -search --file --set /gnu/store/21ngnlx9k0x9x2jj1px7mdlb4j6mzz6x-grub-2.02/share/grub/unicode.pf2
>> +search --label --set /dev/mapper/jojen-root
>
> Oops.  I believe the patch below does the trick (‘store-device’ must
> never be a Linux device name, and that’s what the patch ensures.)
>
> Thoughts?
>
> (I didn’t notice these issues because I identify my root file system by
> label or UUID rather than hard-coding its /dev/mapper name.)
>
> Ludo’.
>
> diff --git a/gnu/system.scm b/gnu/system.scm
> index d337e5259..d71b9c15b 100644
> --- a/gnu/system.scm
> +++ b/gnu/system.scm
> @@ -243,6 +243,11 @@ directly by the user."
>        ((? string? device)
>         device)))
>  
> +  (define (ensure-not-/dev device)
> +    (if (and (string? device) (string-prefix? "/" device))
> +        #f
> +        device))
> +
>    (match (read port)
>      (('boot-parameters ('version 0)
>                         ('label label) ('root-device root)
> @@ -277,15 +282,16 @@ directly by the user."
>            file)))
>  
>        (store-device
> -       (match (assq 'store rest)
> -         (('store ('device device) _ ...)
> -          (device-sexp->device device))
> -         (_                                       ;the old format
> -          ;; Root might be a device path like "/dev/sda1", which is not a
> -          ;; suitable GRUB device identifier.
> -          (if (string-prefix? "/" root)
> -              #f
> -              root))))
> +       ;; ROOT might be a device path like "/dev/sda1", which is not a
> +       ;; suitable GRUB device identifier.
> +       (ensure-not-/dev
> +        (match (assq 'store rest)
> +          (('store ('device #f) _ ...)
> +           root-device)
> +          (('store ('device device) _ ...)
> +           (device-sexp->device device))
> +          (_                                      ;the old format
> +           root-device))))
>  
>        (store-mount-point
>         (match (assq 'store rest)
> @@ -906,6 +912,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)




Information forwarded to bug-guix <at> gnu.org:
bug#28445; Package guix. (Thu, 21 Sep 2017 22:13:02 GMT) Full text and rfc822 format available.

Message #35 received at 28445 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Roel Janssen <roel <at> gnu.org>
Cc: 28445 <at> debbugs.gnu.org, help-guix <help-guix <at> gnu.org>
Subject: Re: Cannot boot GuixSD after system reconfigure
Date: Fri, 22 Sep 2017 00:12:12 +0200
Hi Roel,

Roel Janssen <roel <at> gnu.org> skribis:

> Roel Janssen writes:
>
>> Dear Guix,
>>
>> I 'guix pull'ed commit 228a398 and ran:
>>   guix system reconfigure /etc/config.scm
>>
>> It looks like GRUB cannot find my root partition (/dev/sda3).  So, I
>> suspect that something has changed regarding specifying the partitions (UUIDs?).

[...]

> So, I was able to fix GRUB by manually modifying /boot/grub/grub.cfg:
>
> -search --label --set /dev/sda3
> +search --no-floppy --fs-uuid --set <blkid uuid output>

I believe this is fixed with db4e8fd5d4a07d3be8ce68fb96722ef7077c0eee.

Could you please let me know if everything’s OK?

Thanks,
Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#28445; Package guix. (Thu, 21 Sep 2017 22:25:01 GMT) Full text and rfc822 format available.

Message #38 received at 28445 <at> debbugs.gnu.org (full text, mbox):

From: Roel Janssen <roel <at> gnu.org>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 28445 <at> debbugs.gnu.org, help-guix <help-guix <at> gnu.org>
Subject: Re: Cannot boot GuixSD after system reconfigure
Date: Fri, 22 Sep 2017 02:24:36 +0200
Ludovic Courtès writes:

> Hi Roel,
>
> Roel Janssen <roel <at> gnu.org> skribis:
>
>> Roel Janssen writes:
>>
>>> Dear Guix,
>>>
>>> I 'guix pull'ed commit 228a398 and ran:
>>>   guix system reconfigure /etc/config.scm
>>>
>>> It looks like GRUB cannot find my root partition (/dev/sda3).  So, I
>>> suspect that something has changed regarding specifying the partitions (UUIDs?).
>
> [...]
>
>> So, I was able to fix GRUB by manually modifying /boot/grub/grub.cfg:
>>
>> -search --label --set /dev/sda3
>> +search --no-floppy --fs-uuid --set <blkid uuid output>
>
> I believe this is fixed with db4e8fd5d4a07d3be8ce68fb96722ef7077c0eee.
>
> Could you please let me know if everything’s OK?

I changed the following pieces of my config:

  (bootloader (bootloader-configuration
               (bootloader grub-efi-bootloader)
               (target "/boot/efi")))

  (file-systems (cons*
                 (file-system
                  (title 'uuid)
                  (device (uuid "<uuid>"))
                  (mount-point "/boot")
                  (needed-for-boot? #t)
                  (type "ext4"))
		 (file-system
                  (title 'device)
                  (device "/dev/sda1")
                  (mount-point "/boot/efi")
                  (needed-for-boot? #t)
                  (type "vfat"))
                 (file-system
                  (mount-point "/")
                  (options "ssd")
                  (title 'uuid)
                  (device (uuid "<uuid>"))
                  (options "ssd")
                  (type "btrfs"))
                 (file-system
                  (title 'device)
                  (device "tmpfs")
                  (mount-point "/var/guix/temproots")
                  (type "tmpfs"))
                 (file-system
                  (title 'device)
                  (device "tmpfs")
                  (mount-point "/tmp")
                  (type "tmpfs"))
                 %base-file-systems))

And with these changes, I can boot GuixSD again.

The vfat partitions have a shorter UUID, which are not accepted by
Guix.  Is this on purpose?  As you can see in the snippet above, I use
'device for the vfat partition and 'uuid for the other disk-based
partitions.  It would be nice to use UUIDs for every partition.

Thanks for your time.

Kind regards,
Roel Janssen




Information forwarded to bug-guix <at> gnu.org:
bug#28445; Package guix. (Fri, 22 Sep 2017 14:05:02 GMT) Full text and rfc822 format available.

Message #41 received at 28445 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Roel Janssen <roel <at> gnu.org>
Cc: 28445 <at> debbugs.gnu.org, Danny Milosavljevic <dannym <at> scratchpost.org>,
 help-guix <help-guix <at> gnu.org>
Subject: Re: Cannot boot GuixSD after system reconfigure
Date: Fri, 22 Sep 2017 16:03:47 +0200
[Message part 1 (text/plain, inline)]
Roel Janssen <roel <at> gnu.org> skribis:

> Ludovic Courtès writes:

[...]

>>> So, I was able to fix GRUB by manually modifying /boot/grub/grub.cfg:
>>>
>>> -search --label --set /dev/sda3
>>> +search --no-floppy --fs-uuid --set <blkid uuid output>
>>
>> I believe this is fixed with db4e8fd5d4a07d3be8ce68fb96722ef7077c0eee.
>>
>> Could you please let me know if everything’s OK?
>
> I changed the following pieces of my config:
>
>   (bootloader (bootloader-configuration
>                (bootloader grub-efi-bootloader)
>                (target "/boot/efi")))
>
>   (file-systems (cons*
>                  (file-system
>                   (title 'uuid)
>                   (device (uuid "<uuid>"))
>                   (mount-point "/boot")
>                   (needed-for-boot? #t)
>                   (type "ext4"))
> 		 (file-system
>                   (title 'device)
>                   (device "/dev/sda1")
>                   (mount-point "/boot/efi")
>                   (needed-for-boot? #t)
>                   (type "vfat"))
>                  (file-system
>                   (mount-point "/")
>                   (options "ssd")
>                   (title 'uuid)
>                   (device (uuid "<uuid>"))
>                   (options "ssd")
>                   (type "btrfs"))
>                  (file-system
>                   (title 'device)
>                   (device "tmpfs")
>                   (mount-point "/var/guix/temproots")
>                   (type "tmpfs"))
>                  (file-system
>                   (title 'device)
>                   (device "tmpfs")
>                   (mount-point "/tmp")
>                   (type "tmpfs"))
>                  %base-file-systems))
>
> And with these changes, I can boot GuixSD again.

You mean the fix was insufficient?

> The vfat partitions have a shorter UUID, which are not accepted by
> Guix.  Is this on purpose?  As you can see in the snippet above, I use
> 'device for the vfat partition and 'uuid for the other disk-based
> partitions.  It would be nice to use UUIDs for every partition.

The attached patch almost gets us there: it would allow you to write

  (uuid "aaaa-bbbb" 'fat32)

in your config.

However, there’s one thing I’d like to double-check with Danny, which is
the word order.  With this patch, I have:

  (fat32-uuid->string (string->fat32-uuid "aabb-ccdd"))
  $7 = "CCDD-AABB"

Danny: are you sure the most-significant 16-bit word comes last?

Ludo’.

[Message part 2 (text/x-patch, inline)]
diff --git a/gnu/system/uuid.scm b/gnu/system/uuid.scm
index 1dd6a1133..dea2083c4 100644
--- a/gnu/system/uuid.scm
+++ b/gnu/system/uuid.scm
@@ -41,6 +41,7 @@
             string->ext3-uuid
             string->ext4-uuid
             string->btrfs-uuid
+            string->fat32-uuid
             iso9660-uuid->string
 
             ;; XXX: For lack of a better place.
@@ -175,6 +176,22 @@ ISO9660 UUID representation."
         (low (bytevector-uint-ref uuid 2 %fat32-endianness 2)))
     (format #f "~:@(~x-~x~)" low high)))
 
+(define %fat32-uuid-rx
+  (make-regexp "^([[:xdigit:]]{4})-([[:xdigit:]]{4})$"))
+
+(define (string->fat32-uuid str)
+  "Parse STR, which is in FAT32 format, and return a bytevector or #f."
+  (match (regexp-exec %fat32-uuid-rx str)
+    (#f
+     #f)
+    (rx-match
+     (uint-list->bytevector (list (string->number
+                                   (match:substring rx-match 1) 16)
+                                  (string->number
+                                   (match:substring rx-match 2) 16))
+                            %fat32-endianness
+                            2))))
+
 
 ;;;
 ;;; Generic interface.
@@ -198,6 +215,7 @@ ISO9660 UUID representation."
 (define %uuid-parsers
   (vhashq
    ('dce 'ext2 'ext3 'ext4 'btrfs 'luks => string->dce-uuid)
+   ('fat32 'fat => string->fat32-uuid)
    ('iso9660 => string->iso9660-uuid)))
 
 (define %uuid-printers

Information forwarded to bug-guix <at> gnu.org:
bug#28445; Package guix. (Fri, 22 Sep 2017 14:24:02 GMT) Full text and rfc822 format available.

Message #44 received at 28445 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: 28445 <at> debbugs.gnu.org, help-guix <help-guix <at> gnu.org>,
 Roel Janssen <roel <at> gnu.org>
Subject: Re: Cannot boot GuixSD after system reconfigure
Date: Fri, 22 Sep 2017 16:23:39 +0200
On Fri, 22 Sep 2017 16:03:47 +0200
ludo <at> gnu.org (Ludovic Courtès) wrote:

> However, there’s one thing I’d like to double-check with Danny, which is
> the word order.  With this patch, I have:
> 
>   (fat32-uuid->string (string->fat32-uuid "aabb-ccdd"))
>   $7 = "CCDD-AABB"
> 
> Danny: are you sure the most-significant 16-bit word comes last?

See https://github.com/karelzak/util-linux/blob/master/libblkid/src/superblocks/vfat.c#L48

blkid_probe_sprintf_uuid(pr, vol_serno, 4, "%02X%02X-%02X%02X",
vol_serno[3], vol_serno[2], vol_serno[1], vol_serno[0]);




Information forwarded to bug-guix <at> gnu.org:
bug#28445; Package guix. (Fri, 22 Sep 2017 16:43:02 GMT) Full text and rfc822 format available.

Message #47 received at 28445 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Danny Milosavljevic <dannym <at> scratchpost.org>
Cc: 28445 <at> debbugs.gnu.org, help-guix <help-guix <at> gnu.org>,
 Roel Janssen <roel <at> gnu.org>
Subject: Re: Cannot boot GuixSD after system reconfigure
Date: Fri, 22 Sep 2017 18:41:55 +0200
Danny Milosavljevic <dannym <at> scratchpost.org> skribis:

> On Fri, 22 Sep 2017 16:03:47 +0200
> ludo <at> gnu.org (Ludovic Courtès) wrote:
>
>> However, there’s one thing I’d like to double-check with Danny, which is
>> the word order.  With this patch, I have:
>> 
>>   (fat32-uuid->string (string->fat32-uuid "aabb-ccdd"))
>>   $7 = "CCDD-AABB"
>> 
>> Danny: are you sure the most-significant 16-bit word comes last?
>
> See https://github.com/karelzak/util-linux/blob/master/libblkid/src/superblocks/vfat.c#L48
>
> blkid_probe_sprintf_uuid(pr, vol_serno, 4, "%02X%02X-%02X%02X",
> vol_serno[3], vol_serno[2], vol_serno[1], vol_serno[0]);

I see, thanks!

Roel, with commit 8a7d81a5e23c4d59fbabf2550db32d4ba5572e4b, you should
be able to write:

  (uuid "abcd-1234" 'fat32)

in your config, and it should work.

Let me know if it doesn’t.  :-)

Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#28445; Package guix. (Fri, 22 Sep 2017 17:54:02 GMT) Full text and rfc822 format available.

Message #50 received at 28445 <at> debbugs.gnu.org (full text, mbox):

From: Roel Janssen <roel <at> gnu.org>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 28445 <at> debbugs.gnu.org, Danny Milosavljevic <dannym <at> scratchpost.org>,
 help-guix <help-guix <at> gnu.org>
Subject: Re: Cannot boot GuixSD after system reconfigure
Date: Fri, 22 Sep 2017 21:53:07 +0200
Ludovic Courtès writes:

> Danny Milosavljevic <dannym <at> scratchpost.org> skribis:
>
>> On Fri, 22 Sep 2017 16:03:47 +0200
>> ludo <at> gnu.org (Ludovic Courtès) wrote:
>>
>>> However, there’s one thing I’d like to double-check with Danny, which is
>>> the word order.  With this patch, I have:
>>> 
>>>   (fat32-uuid->string (string->fat32-uuid "aabb-ccdd"))
>>>   $7 = "CCDD-AABB"
>>> 
>>> Danny: are you sure the most-significant 16-bit word comes last?
>>
>> See https://github.com/karelzak/util-linux/blob/master/libblkid/src/superblocks/vfat.c#L48
>>
>> blkid_probe_sprintf_uuid(pr, vol_serno, 4, "%02X%02X-%02X%02X",
>> vol_serno[3], vol_serno[2], vol_serno[1], vol_serno[0]);
>
> I see, thanks!
>
> Roel, with commit 8a7d81a5e23c4d59fbabf2550db32d4ba5572e4b, you should
> be able to write:
>
>   (uuid "abcd-1234" 'fat32)
>
> in your config, and it should work.
>
> Let me know if it doesn’t.  :-)
>
> Ludo’.

I could generate a new system, but upon booting it, I was dropped to a
Guile REPL.

So it doesn't seem to work.  How can I troubleshoot from there?

I used the following configuration for the EFI partition:

  (file-system
    (title 'uuid)
    (device (uuid "72E5-26A0" 'fat32))
    (mount-point "/boot/efi")
    (needed-for-boot? #t)
    (type "vfat"))

Thanks for your work!

Kind regards,
Roel Janssen




Information forwarded to bug-guix <at> gnu.org:
bug#28445; Package guix. (Mon, 25 Sep 2017 07:34:01 GMT) Full text and rfc822 format available.

Message #53 received at 28445 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Roel Janssen <roel <at> gnu.org>
Cc: 28445 <at> debbugs.gnu.org, Danny Milosavljevic <dannym <at> scratchpost.org>,
 help-guix <help-guix <at> gnu.org>
Subject: Re: Cannot boot GuixSD after system reconfigure
Date: Mon, 25 Sep 2017 09:33:17 +0200
Hi Roel,

Roel Janssen <roel <at> gnu.org> skribis:

> I could generate a new system, but upon booting it, I was dropped to a
> Guile REPL.

Could you check what the error was?  (You can type “,error” at the REPL
if the message disappeared.)

> So it doesn't seem to work.  How can I troubleshoot from there?
>
> I used the following configuration for the EFI partition:
>
>   (file-system
>     (title 'uuid)
>     (device (uuid "72E5-26A0" 'fat32))
>     (mount-point "/boot/efi")
>     (needed-for-boot? #t)
>     (type "vfat"))

I don’t see yet what could possibly go wrong.  Note that
‘needed-for-boot?’ can be #f (it’s definitely not needed for boot), but
both should work.

Thanks,
Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#28445; Package guix. (Mon, 25 Sep 2017 19:40:02 GMT) Full text and rfc822 format available.

Message #56 received at 28445 <at> debbugs.gnu.org (full text, mbox):

From: Roel Janssen <roel <at> gnu.org>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 28445 <at> debbugs.gnu.org, Danny Milosavljevic <dannym <at> scratchpost.org>,
 help-guix <help-guix <at> gnu.org>
Subject: Re: Cannot boot GuixSD after system reconfigure
Date: Tue, 26 Sep 2017 21:24:55 +0200
[Message part 1 (text/plain, inline)]
Ludovic Courtès writes:

> Hi Roel,
>
> Roel Janssen <roel <at> gnu.org> skribis:
>
>> I could generate a new system, but upon booting it, I was dropped to a
>> Guile REPL.
>
> Could you check what the error was?  (You can type “,error” at the REPL
> if the message disappeared.)
>
>> So it doesn't seem to work.  How can I troubleshoot from there?
>>
>> I used the following configuration for the EFI partition:
>>
>>   (file-system
>>     (title 'uuid)
>>     (device (uuid "72E5-26A0" 'fat32))
>>     (mount-point "/boot/efi")
>>     (needed-for-boot? #t)
>>     (type "vfat"))
>
> I don’t see yet what could possibly go wrong.  Note that
> ‘needed-for-boot?’ can be #f (it’s definitely not needed for boot), but
> both should work.
>
> Thanks,
> Ludo’.

I attached a photograph of the boot.  Unfortunately, it doesn't seem
very informative to me.

My partition layout is like to:

Device       Start       End   Sectors   Size Type
/dev/sda1     2048   1026047   1024000   500M EFI System
/dev/sda2  1026048   2050047   1024000   500M Linux filesystem
/dev/sda3  2050048 976773134 974723087 464.8G Linux filesystem

/dev/sda2 -> /boot
/dev/sda2 -> /boot/efi
/dev/sda3 -> /

Thanks for your efforts!

Kind regards,
Roel Janssen

[guixsd-boot-problem.jpg (image/jpeg, attachment)]

Information forwarded to bug-guix <at> gnu.org:
bug#28445; Package guix. (Tue, 26 Sep 2017 02:28:01 GMT) Full text and rfc822 format available.

Message #59 received at 28445 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Roel Janssen <roel <at> gnu.org>
Cc: 28445 <at> debbugs.gnu.org, Ludovic Courtès <ludo <at> gnu.org>,
 help-guix <help-guix <at> gnu.org>
Subject: Re: Cannot boot GuixSD after system reconfigure
Date: Tue, 26 Sep 2017 04:27:32 +0200
What does it reply to

,bt

?




Information forwarded to bug-guix <at> gnu.org:
bug#28445; Package guix. (Wed, 04 Oct 2017 17:41:01 GMT) Full text and rfc822 format available.

Message #62 received at 28445 <at> debbugs.gnu.org (full text, mbox):

From: Mark H Weaver <mhw <at> netris.org>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: 28445 <at> debbugs.gnu.org, Marius Bakke <mbakke <at> fastmail.com>
Subject: Re: bug#28445: match-error in 'device-sexp->device' while building
 system
Date: Wed, 04 Oct 2017 13:39:39 -0400
Hi,

Sorry for the delayed response.

ludo <at> gnu.org (Ludovic Courtès) writes:
> Andy pushed the first half of the fix as
> 96bc6518002c3b2ad9f15cf36991b20bebcbbe8a.  Could you check whether the
> ‘ensure-not-/dev’ part below solves the rest?

I see that you've pushed the 'ensure-not-/dev' part, and I have that now
in my tree, but FYI it didn't solve the problem for me.  My system
'parameters' file contains:

  (store (device "/dev/mapper/jojen-root") (mount-point "/"))

and my grub.cfg still uses:

  search --label --set /dev/mapper/jojen-root

both in the top section (just before loading the font) and within the
default menu entry.  As before, an error is issued twice, each time this
command is run: just after entering my disk encryption password and
after selecting the default menu item.

Within the "old configurations" menu, all of the menu entries use:

  search --file --set /gnu/store/…-linux-libre-4.13.4/bzImage

I don't remember if this was the case before.

      Mark




Severity set to 'important' from 'normal' Request was from ludo <at> gnu.org (Ludovic Courtès) to control <at> debbugs.gnu.org. (Fri, 06 Oct 2017 06:51:03 GMT) Full text and rfc822 format available.

Reply sent to ludo <at> gnu.org (Ludovic Courtès):
You have taken responsibility. (Fri, 06 Oct 2017 22:24:02 GMT) Full text and rfc822 format available.

Notification sent to Mark H Weaver <mhw <at> netris.org>:
bug acknowledged by developer. (Fri, 06 Oct 2017 22:24:03 GMT) Full text and rfc822 format available.

Message #69 received at 28445-done <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Mark H Weaver <mhw <at> netris.org>
Cc: 28445-done <at> debbugs.gnu.org, Marius Bakke <mbakke <at> fastmail.com>
Subject: Re: bug#28445: match-error in 'device-sexp->device' while building
 system
Date: Sat, 07 Oct 2017 00:22:48 +0200
Hi Mark,

Mark H Weaver <mhw <at> netris.org> skribis:

> ludo <at> gnu.org (Ludovic Courtès) writes:
>> Andy pushed the first half of the fix as
>> 96bc6518002c3b2ad9f15cf36991b20bebcbbe8a.  Could you check whether the
>> ‘ensure-not-/dev’ part below solves the rest?
>
> I see that you've pushed the 'ensure-not-/dev' part, and I have that now
> in my tree, but FYI it didn't solve the problem for me.  My system
> 'parameters' file contains:
>
>   (store (device "/dev/mapper/jojen-root") (mount-point "/"))
>
> and my grub.cfg still uses:
>
>   search --label --set /dev/mapper/jojen-root

I tested with the config you had posted, and commit
90d23ed9df33e35e157fecd8ab60f55e716ca42f fixes the problem.

Let me know if anything else pops up in this area!

Thank you,
Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 04 Nov 2017 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 167 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.