regression?: grub-configuration for grub-efi does not return a bootloader-configuration

  • Done
  • quality assurance status badge
Details
3 participants
  • Alex Kost
  • Ludovic Courtès
  • pelzflorian (Florian Pelz)
Owner
unassigned
Submitted by
pelzflorian (Florian Pelz)
Severity
normal
P
P
pelzflorian (Florian Pelz) wrote on 4 Jun 2017 12:47
(address . bug-guix@gnu.org)
20170604104701.GA4279@floriannotebook
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@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@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
A
A
Alex Kost wrote on 4 Jun 2017 15:38
(name . pelzflorian (Florian Pelz))(address . pelzflorian@pelzflorian.de)(address . 27231@debbugs.gnu.org)
87shjfq3ek.fsf@gmail.com
pelzflorian (Florian Pelz) (2017-06-04 12:47 +0200) wrote:

Toggle quote (28 lines)
> 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@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@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'.

Toggle quote (7 lines)
> 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"))

Toggle quote (12 lines)
> 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 :-)

Toggle quote (4 lines)
> 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
P
P
pelzflorian (Florian Pelz) wrote on 4 Jun 2017 16:25
(name . Alex Kost)(address . alezost@gmail.com)(address . 27231@debbugs.gnu.org)
20170604142513.GA18416@floriannotebook
On Sun, Jun 04, 2017 at 04:38:11PM +0300, Alex Kost wrote:
Toggle quote (12 lines)
> 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
A
A
Alex Kost wrote on 4 Jun 2017 21:49
(name . pelzflorian (Florian Pelz))(address . pelzflorian@pelzflorian.de)
87o9u35y8s.fsf@gmail.com
pelzflorian (Florian Pelz) (2017-06-04 16:25 +0200) wrote:

Toggle quote (21 lines)
> 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.

Toggle quote (4 lines)
> 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
P
P
pelzflorian (Florian Pelz) wrote on 10 Jun 2017 08:59
(name . Alex Kost)(address . alezost@gmail.com)(address . 27231@debbugs.gnu.org)
20170610065905.GA13677@floriannotebook
On Sun, Jun 04, 2017 at 04:25:13PM +0200, pelzflorian (Florian Pelz) wrote:
Toggle quote (22 lines)
> 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
L
L
Ludovic Courtès wrote on 16 Jun 2017 10:49
control message for bug #27231
(address . control@debbugs.gnu.org)
87shj0gvvh.fsf@gnu.org
tags 27231 notabug
close 27231
?
Your comment

This issue is archived.

To comment on this conversation send an email to 27231@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 27231
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch