From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark H Weaver Subject: bug#18082: 'guix system reconfigure' fails to install grub from standalone guix Date: Tue, 22 Jul 2014 22:41:26 -0400 Message-ID: <87sils4x0p.fsf@yeeloong.lan> References: <87oawh5nvh.fsf@yeeloong.lan> <878unlthg7.fsf@gnu.org> <878unl5i07.fsf@yeeloong.lan> <8738dttag2.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54097) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9mVM-00040A-ML for bug-guix@gnu.org; Tue, 22 Jul 2014 22:42:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X9mVH-0000EN-AI for bug-guix@gnu.org; Tue, 22 Jul 2014 22:42:08 -0400 Received: from debbugs.gnu.org ([140.186.70.43]:39905) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9mVH-0000EI-7P for bug-guix@gnu.org; Tue, 22 Jul 2014 22:42:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1X9mVG-0002NK-P0 for bug-guix@gnu.org; Tue, 22 Jul 2014 22:42:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <8738dttag2.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Tue, 22 Jul 2014 22:17:33 +0200") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 18082@debbugs.gnu.org ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Mark H Weaver 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): # /gnu/store/6qwr8shknwlb1f1l0a7j6n3= h8sg36bv7-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.cf= g) > + 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@jojen# echo $PATH /run/setuid-programs:/run/current-system/profile/sbin:/root/.guix-profile/b= in:/run/current-system/profile/bin root@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 sys= tem... ;;; (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 # ...] In unknown file: ?: 13 [apply-smob/1 #] 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 #] 4050: 9 [#] 1724: 8 [%start-stack load-stack ...] 1729: 7 [#] 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 # ...] 157: 3 [catch system-error ...] In guix/monads.scm: 430: 2 [run-with-store # ...] In guix/scripts/system.scm: 301: 1 [# #] 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@jojen#=20 --8<---------------cut here---------------end--------------->8--- Thanks, Mark