From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oleg Pykhalov Subject: bug#28768: guix system vm Failed to install GRUB (EFI) Date: Thu, 19 Oct 2017 23:32:56 +0300 Message-ID: <87y3o6yj2f.fsf@gmail.com> References: <87info3xtj.fsf@gmail.com> <87efqa95x4.fsf@fastmail.com> <877ew0rbxc.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]:40611) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5HW5-0002s7-Ce for bug-guix@gnu.org; Thu, 19 Oct 2017 16:34:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e5HW0-000134-BE for bug-guix@gnu.org; Thu, 19 Oct 2017 16:34:09 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:42083) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e5HW0-00012t-5x for bug-guix@gnu.org; Thu, 19 Oct 2017 16:34:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e5HVy-0007aI-8d for bug-guix@gnu.org; Thu, 19 Oct 2017 16:34:03 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <877ew0rbxc.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Thu, 12 Oct 2017 10:46:23 +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" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 28768@debbugs.gnu.org Hello Ludovic, Apologies for the late reply. ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Marius Bakke skribis: > >> Oleg Pykhalov writes: >> >>> EFI bootloader configuration causes problems to test with 'system vm' >>> before 'reconfigure'. >> >> This is because `guix system vm` is not currently UEFI enabled, so GRUB >> tries to install for a normal PC BIOS. >> >> The fix would be to make the various QEMU invocations in (gnu system vm) >> take a #:firmware parameter that passes something along the lines of >> '-bios #$(file-append ovmf "/share/ovmf/firmware/ovmf_x64.bin")' to the >> QEMU command-line, and update other scripts to take advantage. > > Perhaps by adding it to records we=E2=80=99d make it le= ss > annoying to pass around? Or are there other places that would still > need extra care? > > Another option, in the meantime is this: > > diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm > index 273a895be..f763b430b 100644 > --- a/gnu/system/vm.scm > +++ b/gnu/system/vm.scm > @@ -565,6 +565,14 @@ environment with the store shared with the host. MA= PPINGS is a list of > user-file-systems))) >=20=20 > (operating-system (inherit os) > + > + ;; XXX: Until we run QEMU with UEFI support (with the OVMF firmware), > + ;; force the traditional i386/BIOS method. > + ;; See . > + (bootloader (bootloader-configuration > + (bootloader grub-bootloader) > + (target "/dev/vda"))) > + > (initrd (lambda (file-systems . rest) > (apply base-initrd file-systems > #:volatile-root? #t > > > That=E2=80=99s what I do manually anyway. > > WDYT? If that=E2=80=99s fine with you, I can commit it. > > Thanks, > Ludo=E2=80=99. Tiny improvement: --8<---------------cut here---------------start------------->8--- natsu@magnolia ~/src/guix$ pre-guix system vm ~/dotfiles/guix/system-magnol= ia.scm Backtrace: 10 (primitive-load "/home/natsu/src/guix/scripts/guix") In guix/ui.scm: 1384:12 9 (run-guix-command _ . _) In ice-9/boot-9.scm: 837:9 8 (catch _ _ # _) 837:9 7 (catch _ _ # =E2=80=A6) In guix/scripts/system.scm: 1099:8 6 (_) 974:6 5 (process-action _ _ _) In guix/store.scm: 1444:24 4 (run-with-store _ _ #:guile-for-build _ #:system _ #:target _) In guix/scripts/system.scm: 987:13 3 (_ _) 706:18 2 (perform-action vm #< kernel: # =E2=80=A6) In gnu/system/vm.scm: 671:31 1 (system-qemu-image/shared-store-script #< ke= rnel=E2=80=A6> =E2=80=A6) 559:4 0 (virtualized-operating-system #< kernel: # =E2=80=A6) gnu/system/vm.scm:559:4: In procedure virtualized-operating-system: gnu/system/vm.scm:559:4: In procedure module-lookup: Unbound variable: grub= -bootloader --8<---------------cut here---------------end--------------->8--- diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index f763b430b..7feb242d5 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -49,7 +49,8 @@ #:use-module (gnu packages admin) =20 #:use-module (gnu bootloader) - #:use-module ((gnu bootloader grub) #:select (grub-mkrescue-bootloader)) + #:use-module ((gnu bootloader grub) #:select (grub-mkrescue-bootloader + grub-bootloader)) #:use-module (gnu system shadow) #:use-module (gnu system pam) #:use-module (gnu system linux-initrd) But I got another issue, not related to Grub. Loops in QEMU: =E2=80=A6 waiting for partition 'magnolia-data' to appear =E2=80=A6 failed to start service 'file-systems' =E2=80=A6