GNU bug report logs -
#18082
'guix system reconfigure' fails to install grub from standalone guix
Previous Next
Reported by: Mark H Weaver <mhw <at> netris.org>
Date: Tue, 22 Jul 2014 17:03:01 UTC
Severity: normal
Done: Mark H Weaver <mhw <at> netris.org>
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 18082 in the body.
You can then email your comments to 18082 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guix <at> gnu.org
:
bug#18082
; Package
guix
.
(Tue, 22 Jul 2014 17:03:01 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
.
(Tue, 22 Jul 2014 17:03:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
I built guix from git master from within a standalone guix install. I
then tried to run 'pre-inst-env guix system reconfigure' using the same
OS configuration, and it failed to install grub.
The error message said "failed to install GRUB on device '/dev/sda'",
which indicates that 'install-grub' raised an exception.
Mark
Information forwarded
to
bug-guix <at> gnu.org
:
bug#18082
; Package
guix
.
(Tue, 22 Jul 2014 17:47:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 18082 <at> debbugs.gnu.org (full text, mbox):
In guix/scripts/system.scm, could you remove ‘false-if-exception’ around
‘install-grub’, and report the backtrace?
Thanks,
Ludo’.
Information forwarded
to
bug-guix <at> gnu.org
:
bug#18082
; Package
guix
.
(Tue, 22 Jul 2014 19:09:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 18082 <at> debbugs.gnu.org (full text, mbox):
ludo <at> gnu.org (Ludovic Courtès) writes:
> In guix/scripts/system.scm, could you remove ‘false-if-exception’ around
> ‘install-grub’, and report the backtrace?
Here it is:
--8<---------------cut here---------------start------------->8---
root <at> jojen# ~mhw/guix/pre-inst-env guix system reconfigure ~mhw/os-install.scm
The following derivation will be built:
/gnu/store/ynkp0ijahvg4x1q6bfdw34d28hhqmgb4-grub.cfg.drv
killing process 1117
/gnu/store/ay6f47hv2gy4hny4ycnbyn0jnyd60n4v-system
/gnu/store/2yrylvn5c9apgfpppc5kfb24fi7mrnpl-grub-2.00
/gnu/store/6qwr8shknwlb1f1l0a7j6n3h8sg36bv7-grub.cfg
activating system...
populating /etc from /gnu/store/p4gvgs07g7gmsygjb3767r5k32v3l1y5-etc...
setting up setuid programs in '/run/setuid-programs'...
making '/gnu/store/ay6f47hv2gy4hny4ycnbyn0jnyd60n4v-system' the current system...
Backtrace:
In ice-9/boot-9.scm:
157: 15 [catch #t #<catch-closure 9037cb0> ...]
In unknown file:
?: 14 [apply-smob/1 #<catch-closure 9037cb0>]
In ice-9/boot-9.scm:
63: 13 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
432: 12 [eval # #]
In ice-9/boot-9.scm:
2401: 11 [save-module-excursion #<procedure 9047ca0 at ice-9/boot-9.scm:4045:3 ()>]
4050: 10 [#<procedure 9047ca0 at ice-9/boot-9.scm:4045:3 ()>]
1724: 9 [%start-stack load-stack ...]
1729: 8 [#<procedure 904c708 ()>]
In unknown file:
?: 7 [primitive-load "/home/mhw/guix/scripts/guix"]
In guix/ui.scm:
656: 6 [run-guix-command system "reconfigure" "/home/mhw/os-install.scm"]
In ice-9/boot-9.scm:
157: 5 [catch srfi-34 #<procedure 96c5ae0 at guix/ui.scm:205:2 ()> ...]
157: 4 [catch system-error ...]
In guix/monads.scm:
430: 3 [run-with-store # ...]
In guix/scripts/system.scm:
301: 2 [#<procedure a95b120 at guix/scripts/system.scm:299:13 (store)> #]
In guix/build/install.scm:
47: 1 [install-grub # "/dev/sda" "/"]
In unknown file:
?: 0 [copy-file # "//boot/grub/grub.cfg.new"]
ERROR: In procedure copy-file:
ERROR: Wrong type (expecting string): #<derivation /gnu/store/ynkp0ijahvg4x1q6bfdw34d28hhqmgb4-grub.cfg.drv => /gnu/store/6qwr8shknwlb1f1l0a7j6n3h8sg36bv7-grub.cfg b7ecf78>
root <at> jojen#
--8<---------------cut here---------------end--------------->8---
and here's my os-install.scm:
--8<---------------cut here---------------start------------->8---
(use-modules (gnu)
(gnu packages emacs)
(gnu packages admin)
(gnu packages linux)
(gnu services base)
(gnu services networking)
(guix monads)
(srfi srfi-26))
(operating-system
(host-name "jojen")
(timezone "US/Eastern")
(bootloader (grub-configuration
(device "/dev/sda")))
(file-systems (list (file-system
(device "librintel-guix")
(mount-point "/")
(type "ext4"))))
(users (list (user-account
(name "mhw")
(group "mhw")
(password "")
(uid 1000)
(home-directory "/home/mhw"))))
(groups (cons (user-group
(name "mhw")
(id 1000))
%base-groups))
(packages (cons* emacs
wpa-supplicant
wireless-tools
module-init-tools
isc-dhcp
%base-packages))
(services
(let ((motd (text-file "motd" "
This is the GNU operating system, welcome!\n\n")))
(list (console-font-service "tty1")
(console-font-service "tty2")
(console-font-service "tty3")
(console-font-service "tty4")
(console-font-service "tty5")
(console-font-service "tty6")
(mingetty-service "tty1" #:motd motd)
(mingetty-service "tty2" #:motd motd)
(mingetty-service "tty3" #:motd motd)
(mingetty-service "tty4" #:motd motd)
(mingetty-service "tty5" #:motd motd)
(mingetty-service "tty6" #:motd motd)
(static-networking-service "lo" "127.0.0.1"
#:provision '(loopback))
(syslog-service)
(guix-service #:authorize-hydra-key? #t)
(nscd-service)
(udev-service)))))
--8<---------------cut here---------------end--------------->8---
Thanks!
Mark
Information forwarded
to
bug-guix <at> gnu.org
:
bug#18082
; Package
guix
.
(Tue, 22 Jul 2014 20:18:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 18082 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Mark H Weaver <mhw <at> netris.org> skribis:
> In guix/build/install.scm:
> 47: 1 [install-grub # "/dev/sda" "/"]
> In unknown file:
> ?: 0 [copy-file # "//boot/grub/grub.cfg.new"]
>
> ERROR: In procedure copy-file:
> ERROR: Wrong type (expecting string): #<derivation /gnu/store/ynkp0ijahvg4x1q6bfdw34d28hhqmgb4-grub.cfg.drv => /gnu/store/6qwr8shknwlb1f1l0a7j6n3h8sg36bv7-grub.cfg b7ecf78>
Oops, should be much better with this:
[Message part 2 (text/x-patch, inline)]
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index 57f4221..5737807 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -299,7 +299,8 @@ actions."
(mlet %store-monad ((% (switch-to-system os)))
(when grub?
(unless (false-if-exception
- (install-grub grub.cfg device "/"))
+ (install-grub (derivation->output-path grub.cfg)
+ device "/"))
(leave (_ "failed to install GRUB on device '~a'~%")
device)))
(return #t)))
[Message part 3 (text/plain, inline)]
Can you confirm?
> (services
> (let ((motd (text-file "motd" "
> This is the GNU operating system, welcome!\n\n")))
> (list (console-font-service "tty1")
> (console-font-service "tty2")
> (console-font-service "tty3")
> (console-font-service "tty4")
> (console-font-service "tty5")
> (console-font-service "tty6")
>
> (mingetty-service "tty1" #:motd motd)
> (mingetty-service "tty2" #:motd motd)
> (mingetty-service "tty3" #:motd motd)
> (mingetty-service "tty4" #:motd motd)
> (mingetty-service "tty5" #:motd motd)
> (mingetty-service "tty6" #:motd motd)
> (static-networking-service "lo" "127.0.0.1"
> #:provision '(loopback))
> (syslog-service)
> (guix-service #:authorize-hydra-key? #t)
> (nscd-service)
> (udev-service)))))
Perhaps we should make #:authorize-hydra-key? #t the default?
Thanks!
Ludo’.
Information forwarded
to
bug-guix <at> gnu.org
:
bug#18082
; Package
guix
.
(Wed, 23 Jul 2014 02:42:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 18082 <at> debbugs.gnu.org (full text, mbox):
ludo <at> gnu.org (Ludovic Courtès) writes:
> Mark H Weaver <mhw <at> netris.org> skribis:
>
>> In guix/build/install.scm:
>> 47: 1 [install-grub # "/dev/sda" "/"]
>> In unknown file:
>> ?: 0 [copy-file # "//boot/grub/grub.cfg.new"]
>>
>> ERROR: In procedure copy-file:
>> ERROR: Wrong type (expecting string): #<derivation /gnu/store/ynkp0ijahvg4x1q6bfdw34d28hhqmgb4-grub.cfg.drv => /gnu/store/6qwr8shknwlb1f1l0a7j6n3h8sg36bv7-grub.cfg b7ecf78>
>
> Oops, should be much better with this:
>
> diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
> index 57f4221..5737807 100644
> --- a/guix/scripts/system.scm
> +++ b/guix/scripts/system.scm
> @@ -299,7 +299,8 @@ actions."
> (mlet %store-monad ((% (switch-to-system os)))
> (when grub?
> (unless (false-if-exception
> - (install-grub grub.cfg device "/"))
> + (install-grub (derivation->output-path grub.cfg)
> + device "/"))
> (leave (_ "failed to install GRUB on device '~a'~%")
> device)))
> (return #t)))
>
> Can you confirm?
That helped, and now it successfully updates the grub.cfg file, but now
there's another problem. When it tries to execvp 'grub-install', it
can't find it because PATH is set to:
"/gnu/store/l5815c2iars8scdy82grfjjmxv9ahgv2-shadow-4.1.5.1/sbin"
Here's a transcript of the attempt, with (pk 'path (getenv "PATH"))
inserted just before the (system* "grub-install" ...) call in
guix/build/install.scm:
--8<---------------cut here---------------start------------->8---
root <at> jojen# echo $PATH
/run/setuid-programs:/run/current-system/profile/sbin:/root/.guix-profile/bin:/run/current-system/profile/bin
root <at> jojen# ~mhw/guix/pre-inst-env guix system reconfigure ~mhw/os-install.scm
The following derivation will be built:
/gnu/store/1rj11nb1sv3jx2aalnqa7xl09nw6vfnr-grub.cfg.drv
killing process 1587
/gnu/store/qfacd34rj6v8b9mi21qx9mj3lkq3c2pg-system
/gnu/store/2yrylvn5c9apgfpppc5kfb24fi7mrnpl-grub-2.00
/gnu/store/ymxq6025wb6h3vp0glryykarz8r7hqhs-grub.cfg
activating system...
populating /etc from /gnu/store/89dn636ibbc2dy8wqaz30ck3dcli44jk-etc...
setting up setuid programs in '/run/setuid-programs'...
making '/gnu/store/qfacd34rj6v8b9mi21qx9mj3lkq3c2pg-system' the current system...
;;; (path "/gnu/store/l5815c2iars8scdy82grfjjmxv9ahgv2-shadow-4.1.5.1/sbin")
In execvp of grub-install: No such file or directory
Backtrace:
In ice-9/boot-9.scm:
157: 14 [catch #t #<catch-closure 94cfcb0> ...]
In unknown file:
?: 13 [apply-smob/1 #<catch-closure 94cfcb0>]
In ice-9/boot-9.scm:
63: 12 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
432: 11 [eval # #]
In ice-9/boot-9.scm:
2401: 10 [save-module-excursion #<procedure 94dfca0 at ice-9/boot-9.scm:4045:3 ()>]
4050: 9 [#<procedure 94dfca0 at ice-9/boot-9.scm:4045:3 ()>]
1724: 8 [%start-stack load-stack ...]
1729: 7 [#<procedure 94e4708 ()>]
In unknown file:
?: 6 [primitive-load "/home/mhw/guix/scripts/guix"]
In guix/ui.scm:
656: 5 [run-guix-command system "reconfigure" "/home/mhw/os-install.scm"]
In ice-9/boot-9.scm:
157: 4 [catch srfi-34 #<procedure 98f6110 at guix/ui.scm:205:2 ()> ...]
157: 3 [catch system-error ...]
In guix/monads.scm:
430: 2 [run-with-store # ...]
In guix/scripts/system.scm:
301: 1 [#<procedure afe7c40 at guix/scripts/system.scm:299:13 (store)> #]
In unknown file:
?: 0 [scm-error misc-error #f "~A" ("failed to install GRUB") #f]
ERROR: In procedure scm-error:
ERROR: failed to install GRUB
root <at> jojen#
--8<---------------cut here---------------end--------------->8---
Thanks,
Mark
Information forwarded
to
bug-guix <at> gnu.org
:
bug#18082
; Package
guix
.
(Wed, 23 Jul 2014 16:23:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 18082 <at> debbugs.gnu.org (full text, mbox):
Mark H Weaver <mhw <at> netris.org> skribis:
> populating /etc from /gnu/store/89dn636ibbc2dy8wqaz30ck3dcli44jk-etc...
> setting up setuid programs in '/run/setuid-programs'...
> making '/gnu/store/qfacd34rj6v8b9mi21qx9mj3lkq3c2pg-system' the current system...
>
> ;;; (path "/gnu/store/l5815c2iars8scdy82grfjjmxv9ahgv2-shadow-4.1.5.1/sbin")
> In execvp of grub-install: No such file or directory
OK, commit 720ee24 should bring us one step closer. Could you check?
Thanks a lot!
Ludo’.
Reply sent
to
Mark H Weaver <mhw <at> netris.org>
:
You have taken responsibility.
(Wed, 23 Jul 2014 22:53:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Mark H Weaver <mhw <at> netris.org>
:
bug acknowledged by developer.
(Wed, 23 Jul 2014 22:53:04 GMT)
Full text and
rfc822 format available.
Message #25 received at 18082-done <at> debbugs.gnu.org (full text, mbox):
ludo <at> gnu.org (Ludovic Courtès) writes:
> Mark H Weaver <mhw <at> netris.org> skribis:
>
>> populating /etc from /gnu/store/89dn636ibbc2dy8wqaz30ck3dcli44jk-etc...
>> setting up setuid programs in '/run/setuid-programs'...
>> making '/gnu/store/qfacd34rj6v8b9mi21qx9mj3lkq3c2pg-system' the current system...
>>
>> ;;; (path "/gnu/store/l5815c2iars8scdy82grfjjmxv9ahgv2-shadow-4.1.5.1/sbin")
>> In execvp of grub-install: No such file or directory
>
> OK, commit 720ee24 should bring us one step closer. Could you check?
'guix system reconfigure' now works.
I'm closing this bug.
Thanks! :)
Mark
Information forwarded
to
bug-guix <at> gnu.org
:
bug#18082
; Package
guix
.
(Thu, 24 Jul 2014 08:26:01 GMT)
Full text and
rfc822 format available.
Message #28 received at 18082-done <at> debbugs.gnu.org (full text, mbox):
Thanks for testing!
Ludo’.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 21 Aug 2014 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 9 years and 249 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.