* bug#27231: regression?: grub-configuration for grub-efi does not return a bootloader-configuration
@ 2017-06-04 10:47 pelzflorian (Florian Pelz)
2017-06-04 13:38 ` Alex Kost
0 siblings, 1 reply; 5+ messages in thread
From: pelzflorian (Florian Pelz) @ 2017-06-04 10:47 UTC (permalink / raw)
To: 27231
[-- Attachment #1: Type: text/plain, Size: 2533 bytes --]
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
[-- Attachment #2: broken-guixsd-asus.scm --]
[-- Type: text/plain, Size: 6531 bytes --]
;; Custom config adapted from GNOME/Xfce example in Guix manual.
;; Meant to use GNU Hurd once it is ready.
(use-modules (gnu)
(gnu packages admin)
(gnu packages shells)
(gnu system grub)
(gnu system locale)
(gnu system nss)
(guix gexp))
(use-service-modules avahi
base
dbus
desktop
networking
xorg)
(use-package-modules bootloaders
certs
cryptsetup
emacs
fonts
freedesktop
gnome
guile
libusb
linux ; for lvm2, util-linux
rsync
ssh
suckless
version-control
wget)
(operating-system
(host-name "floriannotebook")
(timezone "Europe/Berlin")
(locale "en_US.UTF-8")
(locale-definitions
(cons (locale-definition
(name "de_DE.utf8") (source "de_DE"))
%default-locale-definitions))
;; Assuming /dev/sda is the target hard disk, and "GuixSD"
;; is the label of the target root file system.
(bootloader (grub-configuration (device "/dev/sda")
(grub grub-efi)))
;; (bootloader (bootloader-configuration (bootloader grub-efi-bootloader)
;; (device "/dev/sda")))
;; (menu-entries
;; (list
;; (menu-entry
;; (label "Parabola GNU/Linux-libre")
;; ;; see Arch Wiki / GRUB / Encrypted GNU/Linux menuentry to see what is missing here
;; (linux "/boot/vmlinuz-linux-libre")
;; (linux-arguments '("cryptdevice=UUID=e269b169-073a-49f4-a03f-1a34d88384f8:Main" "root=/dev/mapper/Main-rootvol resume=/dev/mapper/Main-swapvol" "rw" "add_efi_memmap" "initrd=/initramfs-linux-libre.img" "init=/lib/systemd/systemd"))
;; (initrd "/boot/initramfs-linux-libre.img"))
;; (menu-entry
;; (label "Parabola GNU/Linux-libre LTS")
;; (linux "/boot/vmlinuz-linux-libre-lts")
;; (linux-arguments '("cryptdevice=UUID=e269b169-073a-49f4-a03f-1a34d88384f8:Main" "root=/dev/mapper/Main-rootvol" "resume=/dev/mapper/Main-swapvol" "rw" "add_efi_memmap" "initrd=/initramfs-linux-libre-lts.img" "init=/lib/systemd/systemd"))
;; (initrd "/boot/initramfs-linux-libre-lts.img"))))))
;; Specify a mapped device for the encrypted root partition.
;; The UUID is that returned by 'cryptsetup luksUUID'.
(mapped-devices
(list (mapped-device
(source (uuid "de52112d-aa7c-4e03-a52b-80deb59d9353"))
(target "GuixSD")
(type luks-device-mapping))))
(file-systems (cons*(file-system
(device "my-root")
(title 'label)
(mount-point "/")
(type "ext4")
(dependencies mapped-devices))
(file-system
(device "/dev/sda1")
(mount-point "/boot/efi")
(type "msdos"))
%base-file-systems
;; %fuse-control-file-system
))
(users (cons* (user-account
(name "florian")
(comment "Florian Pelz")
(group "users")
(supplementary-groups '("wheel" "netdev"
"audio" "video"))
(home-directory "/home/florian")
(shell #~(string-append #$zsh "/bin/zsh")))
(user-account
(name "guest")
(comment "Guest user")
(group "users")
(home-directory "/home/guest")
(shell #~(string-append #$zsh "/bin/zsh")))
%base-user-accounts))
;; This is where we specify system-wide packages.
(packages (cons* cryptsetup
emacs
font-dejavu
font-google-noto
geiser
git
gnome-calculator
gnome-screenshot
gnome-system-monitor
gnome-tweak-tool
guile-2.2
gvfs ;for user mounts
;; lsh ;probably insecure because no release activity
lvm2
nss-certs ;for HTTPS access
openssh
paredit
rsync
util-linux
wget
xdg-utils
zsh
%base-packages))
;; Add GNOME and/or Xfce---we can choose at the log-in
;; screen with F1. Use the "desktop" services, which
;; include the X11 log-in service, networking with Wicd,
;; and more.
(services (cons* (gnome-desktop-service)
(avahi-service)
(colord-service)
(dbus-service)
(elogind-service)
(geoclue-service)
(service
network-manager-service-type
(network-manager-configuration
(dns "dnsmasq")))
(polkit-service)
(screen-locker-service slock)
(slim-service)
(udisks-service)
(upower-service)
(simple-service 'mtp udev-service-type (list libmtp))
(service wpa-supplicant-service-type wpa-supplicant)
(modify-services %base-services
(guix-service-type config =>
(guix-configuration
(inherit config)
(tmpdir "/tmpdir"))))))
;; Allow resolution of '.local' host names with mDNS.
(name-service-switch %mdns-host-lookup-nss))
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#27231: regression?: grub-configuration for grub-efi does not return a bootloader-configuration
2017-06-04 10:47 bug#27231: regression?: grub-configuration for grub-efi does not return a bootloader-configuration pelzflorian (Florian Pelz)
@ 2017-06-04 13:38 ` Alex Kost
2017-06-04 14:25 ` pelzflorian (Florian Pelz)
0 siblings, 1 reply; 5+ messages in thread
From: Alex Kost @ 2017-06-04 13:38 UTC (permalink / raw)
To: pelzflorian (Florian Pelz); +Cc: 27231
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@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'.
> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#27231: regression?: grub-configuration for grub-efi does not return a bootloader-configuration
2017-06-04 13:38 ` Alex Kost
@ 2017-06-04 14:25 ` pelzflorian (Florian Pelz)
2017-06-04 19:49 ` Alex Kost
2017-06-10 6:59 ` pelzflorian (Florian Pelz)
0 siblings, 2 replies; 5+ messages in thread
From: pelzflorian (Florian Pelz) @ 2017-06-04 14:25 UTC (permalink / raw)
To: Alex Kost; +Cc: 27231
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#27231: regression?: grub-configuration for grub-efi does not return a bootloader-configuration
2017-06-04 14:25 ` pelzflorian (Florian Pelz)
@ 2017-06-04 19:49 ` Alex Kost
2017-06-10 6:59 ` pelzflorian (Florian Pelz)
1 sibling, 0 replies; 5+ messages in thread
From: Alex Kost @ 2017-06-04 19:49 UTC (permalink / raw)
To: pelzflorian (Florian Pelz); +Cc: 27231
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#27231: regression?: grub-configuration for grub-efi does not return a bootloader-configuration
2017-06-04 14:25 ` pelzflorian (Florian Pelz)
2017-06-04 19:49 ` Alex Kost
@ 2017-06-10 6:59 ` pelzflorian (Florian Pelz)
1 sibling, 0 replies; 5+ messages in thread
From: pelzflorian (Florian Pelz) @ 2017-06-10 6:59 UTC (permalink / raw)
To: Alex Kost; +Cc: 27231
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-06-10 6:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-04 10:47 bug#27231: regression?: grub-configuration for grub-efi does not return a bootloader-configuration pelzflorian (Florian Pelz)
2017-06-04 13:38 ` Alex Kost
2017-06-04 14:25 ` pelzflorian (Florian Pelz)
2017-06-04 19:49 ` Alex Kost
2017-06-10 6:59 ` pelzflorian (Florian Pelz)
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.