GNU bug report logs - #27705
[PATCH 0/4] Make both EFI and non-EFI systems boot our disk images.

Previous Next

Package: guix-patches;

Reported by: Danny Milosavljevic <dannym <at> scratchpost.org>

Date: Sat, 15 Jul 2017 13:36:03 UTC

Severity: normal

Tags: patch

Done: Danny Milosavljevic <dannym <at> scratchpost.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Marius Bakke <mbakke <at> fastmail.com>
To: Danny Milosavljevic <dannym <at> scratchpost.org>, 27705 <at> debbugs.gnu.org
Subject: [bug#27705] [PATCH 3/4] gnu: grub-efi: Add grub.
Date: Mon, 17 Jul 2017 23:26:06 +0200
[Message part 1 (text/plain, inline)]
Danny Milosavljevic <dannym <at> scratchpost.org> writes:

> * gnu/packages/bootloaders.scm (grub-efi)[native-inputs]: Add grub.
> [arguments]: Add phase "install-non-efi".

[...]

> +    (native-inputs
> +     `(("grub" ,grub)
> +       ,@(package-native-inputs grub)))

Since we take machine-specific code from it, I think it must be a
regular input.

However...

>      (arguments
>       `(;; TODO: Tests need a UEFI firmware for qemu. There is one at
>         ;; https://github.com/tianocore/edk2/tree/master/OvmfPkg .
> @@ -180,7 +183,15 @@ menu to select one of the installed operating systems.")
>                         (("\"mcopy\"")
>                          (string-append "\"" mtools
>                                         "/bin/mcopy\"")))
> -                     #t))))))))))
> +                     #t)))
> +               (add-after 'install 'install-non-efi
> +                 (lambda* (#:key inputs outputs #:allow-other-keys)
> +                   ;; grub-mkresuce can use it for making a hybrid image.
> +                   (copy-recursively (string-append (assoc-ref inputs "grub")
> +                                                    "/lib/grub/i386-pc")
> +                                     (string-append (assoc-ref outputs "out")
> +                                                    "/lib/grub/i386-pc"))
> +                   #t)))))))))

I don't think we should do this in 'grub-efi'. Now users can not be
certain whether they have EFI boot or not, since grub will happily "fall
back" to i386-pc if it does not detect a UEFI system. It's a regression
of sorts.

However... The 'grub-hybrid' approach seems okay to me (although
building grub-efi again is unnecessary :)). If it works well, maybe we
could deprecate the other two GRUB packages.

FWIW Gentoo has taken the 'hybrid' approach for many years (building
once for each target platform and consolidating out/lib/grub). But it
would be good to know whether this configuration is supported upstream.
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 7 years and 346 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.