GNU bug report logs - #27231
regression?: grub-configuration for grub-efi does not return a bootloader-configuration

Previous Next

Package: guix;

Reported by: "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de>

Date: Sun, 4 Jun 2017 10:47:02 UTC

Severity: normal

Tags: notabug

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 27231 in the body.
You can then email your comments to 27231 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#27231; Package guix. (Sun, 04 Jun 2017 10:47:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Sun, 04 Jun 2017 10:47:02 GMT) Full text and rfc822 format available.

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

From: "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de>
To: bug-guix <at> gnu.org
Subject: regression?: grub-configuration for grub-efi does not return a
 bootloader-configuration
Date: Sun, 4 Jun 2017 12:47:02 +0200
[Message part 1 (text/plain, inline)]
Hello,

My GuixSD configuration (see attachment) for UEFI got broken some
three weeks ago but I’ve only now caught up with my e-mail and “fixed”
it.

root <at> floriannotebook ~# guix system reconfigure /home/florian/keep/guixsd-asus.scm
Backtrace:
           9 (apply-smob/1 #<catch-closure 22dba40>)
In ice-9/boot-9.scm:
    713:2  8 (call-with-prompt _ _ #<procedure default-prompt-handle…>)
In ice-9/eval.scm:
    619:8  7 (_ #(#(#<directory (guile-user) 235e140>)))
In ice-9/boot-9.scm:
   2316:4  6 (save-module-excursion _)
  3823:12  5 (_)
In guix/ui.scm:
   1311:8  4 (run-guix-command _ . _)
In ice-9/boot-9.scm:
    837:9  3 (catch _ _ #<procedure 7f55cc0669a8 at guix/ui.scm:450…> …)
    837:9  2 (catch _ _ #<procedure 7f55cc0669c0 at guix/ui.scm:511…> …)
In guix/scripts/system.scm:
   1006:8  1 (_)
   885:27  0 (process-action _ _ _)

guix/scripts/system.scm:885:27: In procedure process-action:
guix/scripts/system.scm:885:27: In procedure bootloader-configuration-device: Wrong type argument: #<<grub-configuration> grub: #<package grub-efi <at> 2.02 gnu/packages/bootloaders.scm:142 314cb40> device: "/dev/sda" menu-entries: () default-entry: 0 timeout: 5 theme: #<<grub-theme> images: (#<<grub-image> aspect-ratio: 4/3 file: #<<file-append> base: #<origin #<<git-reference> url: "git://git.savannah.gnu.org/guix/guix-artwork.git" commit: "6998d30" recursive?: #f> gjomvsacge5nz76kqiyzbpiin32l7nn672voskuo7ahz3za56jga () 3a4d300> suffix: ("/grub/GuixSD-fully-black-4-3.svg")>>) color-normal: ((fg . light-gray) (bg . black)) color-highlight: ((fg . yellow) (bg . black))>>



I ‘guix pull’ed before reconfiguring.

I used this:

  (bootloader (grub-configuration (device "/dev/sda")
                                  (grub grub-efi)))

Then ‘guix system reconfigure /home/florian/keep/guixsd-asus.scm’ kept
failing. Debugging by (load)ing .guix-real in the Guile REPL and using
breakpoints showed me that this was not a valid
(bootloader-configuration?).

Replacing the above by

  (bootloader (bootloader-configuration (bootloader grub-efi-bootloader)
                                        (device "/dev/sda")))

fixed it today and I can ‘guix system reconfigure’ again.

I don’t know why this broke and if it breaks for others too
(apparently noone has filed a bug yet), which is why I’m filing a bug
here. Using a syntax rule for grub-configuration seems complicated to
me anyway, but I’m still a Guile newbie.

Regards,
Florian
[broken-guixsd-asus.scm (text/plain, attachment)]

Information forwarded to bug-guix <at> gnu.org:
bug#27231; Package guix. (Sun, 04 Jun 2017 13:39:02 GMT) Full text and rfc822 format available.

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

From: Alex Kost <alezost <at> gmail.com>
To: "pelzflorian \(Florian Pelz\)" <pelzflorian <at> pelzflorian.de>
Cc: 27231 <at> debbugs.gnu.org
Subject: Re: bug#27231: regression?: grub-configuration for grub-efi does not
 return a bootloader-configuration
Date: Sun, 04 Jun 2017 16:38:11 +0300
pelzflorian (Florian Pelz) (2017-06-04 12:47 +0200) wrote:

> Hello,
>
> My GuixSD configuration (see attachment) for UEFI got broken some
> three weeks ago but I’ve only now caught up with my e-mail and “fixed”
> it.
>
> root <at> floriannotebook ~# guix system reconfigure /home/florian/keep/guixsd-asus.scm
> Backtrace:
>            9 (apply-smob/1 #<catch-closure 22dba40>)
> In ice-9/boot-9.scm:
>     713:2  8 (call-with-prompt _ _ #<procedure default-prompt-handle…>)
> In ice-9/eval.scm:
>     619:8  7 (_ #(#(#<directory (guile-user) 235e140>)))
> In ice-9/boot-9.scm:
>    2316:4  6 (save-module-excursion _)
>   3823:12  5 (_)
> In guix/ui.scm:
>    1311:8  4 (run-guix-command _ . _)
> In ice-9/boot-9.scm:
>     837:9  3 (catch _ _ #<procedure 7f55cc0669a8 at guix/ui.scm:450…> …)
>     837:9  2 (catch _ _ #<procedure 7f55cc0669c0 at guix/ui.scm:511…> …)
> In guix/scripts/system.scm:
>    1006:8  1 (_)
>    885:27  0 (process-action _ _ _)
>
> guix/scripts/system.scm:885:27: In procedure process-action:
> guix/scripts/system.scm:885:27: In procedure bootloader-configuration-device: Wrong type argument: #<<grub-configuration> grub: #<package grub-efi <at> 2.02 gnu/packages/bootloaders.scm:142 314cb40> device: "/dev/sda" menu-entries: () default-entry: 0 timeout: 5 theme: #<<grub-theme> images: (#<<grub-image> aspect-ratio: 4/3 file: #<<file-append> base: #<origin #<<git-reference> url: "git://git.savannah.gnu.org/guix/guix-artwork.git" commit: "6998d30" recursive?: #f> gjomvsacge5nz76kqiyzbpiin32l7nn672voskuo7ahz3za56jga () 3a4d300> suffix: ("/grub/GuixSD-fully-black-4-3.svg")>>) color-normal: ((fg . light-gray) (bg . black)) color-highlight: ((fg . yellow) (bg . black))>>

Oops, Guix breaks backward compatibility sometimes :-)

This is a limitation of 'grub-configuration' macro: that backtrace
happened because you have 'grub' field *not* in the first place of your
'grub-configuration'.

> I ‘guix pull’ed before reconfiguring.
>
> I used this:
>
>   (bootloader (grub-configuration (device "/dev/sda")
>                                   (grub grub-efi)))

Note that this will work if you put (grub grub-efi) in the first place:

  (grub-configuration (grub grub-efi)
                      (device "/dev/sda"))

> Then ‘guix system reconfigure /home/florian/keep/guixsd-asus.scm’ kept
> failing. Debugging by (load)ing .guix-real in the Guile REPL and using
> breakpoints showed me that this was not a valid
> (bootloader-configuration?).
>
> Replacing the above by
>
>   (bootloader (bootloader-configuration (bootloader grub-efi-bootloader)
>                                         (device "/dev/sda")))
>
> fixed it today and I can ‘guix system reconfigure’ again.

You figured it out!  I would stick to this variant instead of using
'grub-configuration' wrapper, but that's me :-)

> I don’t know why this broke and if it breaks for others too
> (apparently noone has filed a bug yet), which is why I’m filing a bug
> here.

I was affected as well, but I didn't consider it a bug, just a change in
the API.  In the past, I had:

   (grub-configuration (grub my-grub)
                       (device "/dev/sda")
                       (theme (grub-theme))))

And I replaced it with:

   (bootloader-configuration
    (bootloader (bootloader
                 (inherit grub-bootloader)
                 (name 'fake-grub)
                 (package my-grub)))
    (device "/dev/sda")
    (theme (grub-theme)))

-- 
Alex




Information forwarded to bug-guix <at> gnu.org:
bug#27231; Package guix. (Sun, 04 Jun 2017 14:25:01 GMT) Full text and rfc822 format available.

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

From: "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de>
To: Alex Kost <alezost <at> gmail.com>
Cc: 27231 <at> debbugs.gnu.org
Subject: Re: bug#27231: regression?: grub-configuration for grub-efi does not
 return a bootloader-configuration
Date: Sun, 4 Jun 2017 16:25:13 +0200
On Sun, Jun 04, 2017 at 04:38:11PM +0300, Alex Kost wrote:
> This is a limitation of 'grub-configuration' macro: that backtrace
> happened because you have 'grub' field *not* in the first place of your
> 'grub-configuration'.
>
> […]
>
> Note that this will work if you put (grub grub-efi) in the first place:
> 
>   (grub-configuration (grub grub-efi)
>                       (device "/dev/sda"))
>

Ah… Thank you for clarifying.

  (bootloader (grub-configuration (grub grub-efi)
                                  (device "/dev/sda")))

I just tried and this fails too with the same error. I’m not sure why
it does not match the syntax rule for grub-configuration.

This macro seems complicated and unintuitive. I don’t like how a
syntax rule feigns being a record definition but isn’t and therefore
breaks things… Why not just inherit bootloader-configuration?

Regards,
Florian




Information forwarded to bug-guix <at> gnu.org:
bug#27231; Package guix. (Sun, 04 Jun 2017 19:51:02 GMT) Full text and rfc822 format available.

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

From: Alex Kost <alezost <at> gmail.com>
To: "pelzflorian \(Florian Pelz\)" <pelzflorian <at> pelzflorian.de>
Cc: Mathieu Othacehe <m.othacehe <at> gmail.com>, 27231 <at> debbugs.gnu.org
Subject: Re: bug#27231: regression?: grub-configuration for grub-efi does not
 return a bootloader-configuration
Date: Sun, 04 Jun 2017 22:49:55 +0300
pelzflorian (Florian Pelz) (2017-06-04 16:25 +0200) wrote:

> On Sun, Jun 04, 2017 at 04:38:11PM +0300, Alex Kost wrote:
>> This is a limitation of 'grub-configuration' macro: that backtrace
>> happened because you have 'grub' field *not* in the first place of your
>> 'grub-configuration'.
>>
>> […]
>>
>> Note that this will work if you put (grub grub-efi) in the first place:
>> 
>>   (grub-configuration (grub grub-efi)
>>                       (device "/dev/sda"))
>>
>
> Ah… Thank you for clarifying.
>
>   (bootloader (grub-configuration (grub grub-efi)
>                                   (device "/dev/sda")))
>
> I just tried and this fails too with the same error. I’m not sure why
> it does not match the syntax rule for grub-configuration.

Hm, strange, it doesn't give me that error when 'grub' is in the first
place.  Anyway, I would use 'bootloader-configuration' instead as you do
it now.

> This macro seems complicated and unintuitive. I don’t like how a
> syntax rule feigns being a record definition but isn’t and therefore
> breaks things… Why not just inherit bootloader-configuration?

I don't know, it's better to ask Mathieu (Cc-ed) who made these changes
in the bootloader code.

-- 
Alex




Information forwarded to bug-guix <at> gnu.org:
bug#27231; Package guix. (Sat, 10 Jun 2017 06:58:01 GMT) Full text and rfc822 format available.

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

From: "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de>
To: Alex Kost <alezost <at> gmail.com>
Cc: 27231 <at> debbugs.gnu.org
Subject: Re: bug#27231: regression?: grub-configuration for grub-efi does not
 return a bootloader-configuration
Date: Sat, 10 Jun 2017 08:59:05 +0200
On Sun, Jun 04, 2017 at 04:25:13PM +0200, pelzflorian (Florian Pelz) wrote:
> On Sun, Jun 04, 2017 at 04:38:11PM +0300, Alex Kost wrote:
> > This is a limitation of 'grub-configuration' macro: that backtrace
> > happened because you have 'grub' field *not* in the first place of your
> > 'grub-configuration'.
> >
> > […]
> >
> > Note that this will work if you put (grub grub-efi) in the first place:
> > 
> >   (grub-configuration (grub grub-efi)
> >                       (device "/dev/sda"))
> >
> 
> Ah… Thank you for clarifying.
> 
>   (bootloader (grub-configuration (grub grub-efi)
>                                   (device "/dev/sda")))
> 
> I just tried and this fails too with the same error. I’m not sure why
> it does not match the syntax rule for grub-configuration.
> 

No, it worked. I must have done something wrong before.

Regards,
Florian




Added tag(s) notabug. Request was from ludo <at> gnu.org (Ludovic Courtès) to control <at> debbugs.gnu.org. (Fri, 16 Jun 2017 08:50:01 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 27231 <at> debbugs.gnu.org and "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de> Request was from ludo <at> gnu.org (Ludovic Courtès) to control <at> debbugs.gnu.org. (Fri, 16 Jun 2017 08:50:01 GMT) Full text and rfc822 format available.

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

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

Previous Next


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