Subject: bug#28768: closed (Re: bug#28768: guix system vm Failed to install GRUB (EFI))

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 19 Oct 2017 21:26:02 +0000

Your bug report

#28768: guix system vm Failed to install GRUB (EFI)

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
28768: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=28768
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#28768: guix system vm Failed to install GRUB (EFI)
From: [email-masked] (Ludovic Courtès)
To: Marius Bakke <[email-masked]>
Cc: Oleg Pykhalov <[email-masked]>, [email-masked]
Date: Thu, 19 Oct 2017 23:25:01 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello!

Marius Bakke <[email-masked]> skribis:

> Ludovic Courtès <[email-masked]> writes:

[...]

>> 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.  MAPPINGS is a list of
>>                    user-file-systems)))
>>  
>>    (operating-system (inherit os)
>> +
>> +    ;; XXX: Until we run QEMU with UEFI support (with the OVMF firmware),
>> +    ;; force the traditional i386/BIOS method.
>> +    ;; See <https://bugs.gnu.org/28768>.
>> +    (bootloader (bootloader-configuration
>> +                  (bootloader grub-bootloader)
>> +                  (target "/dev/vda")))
>> +
>>      (initrd (lambda (file-systems . rest)
>>                (apply base-initrd file-systems
>>                       #:volatile-root? #t
>>
>> That’s what I do manually anyway.
>>
>> WDYT?  If that’s fine with you, I can commit it.
>
> LGTM!

Pushed as 9b396c0cabb086746cbe4ec20d4ae0d79962d758 (along with the
missing #:use-module clause that Oleg reported.)

I’m closing this bug.  We can create a new issue when we add support for
UEFI in VMs.

Oleg Pykhalov <[email-masked]> skribis:

> But I got another issue, not related to Grub.
>
> Loops in QEMU:
>
>     …
>     waiting for partition 'magnolia-data' to appear
>     …
>     failed to start service 'file-systems'
>     …

This is expected: there’s no partition with that label in the VM.

You have to comment out the ‘file-system’ declaration because it doesn’t
make sense inside the VM.  Perhaps ‘virtualized-operating-system’ could
do it automatically as well, not sure.

HTH,
Ludo’.

Subject: guix system vm Failed to install GRUB (EFI)
From: Oleg Pykhalov <[email-masked]>
To: [email-masked]
Date: Mon, 09 Oct 2017 22:50:32 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello Guix,

EFI bootloader configuration causes problems to test with 'system vm'
before 'reconfigure'.

To reproduce it replace default bootloader expression with following
snippet in gnu/system/examples/vm-image.tmpl

  (bootloader (bootloader-configuration
               (bootloader grub-efi-bootloader)
               (target "/boot/efi")))

--8<---------------cut here---------------start------------->8---
[    0.909226] EXT4-fs (vda1): mounted filesystem with ordered data mode. Opts: (null)
installing bootloader...
/gnu/store/b1kdjsmwkphwh06gcm2ym0d0zh5wf4gc-grub-efi-2.02/sbin/grub-install: error: /gnu/store/b1kdjsmwkphwh06gcm2ym0d0zh5wf4gc-grub-efi-2.02/lib/grub/i386-pc/modinfo.sh doesn't exist. Please specify --target or --directory.
ERROR: In procedure scm-error:
ERROR: failed to install GRUB (EFI)

Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
GNU Guile 2.2.2
Copyright (C) 1995-2017 Free Software Foundation, Inc.

Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.

Enter `,help' for help.
scheme@(guile-user)> [    1.344109] tsc: Refined TSC clocksource calibration: 3392.250 MHz
[    1.344677] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x30e5b54dbe0, max_idle_ns: 440795272496 ns
  C-c C-c
--8<---------------cut here---------------end--------------->8---