GNU bug report logs -
#27705
[PATCH 0/4] Make both EFI and non-EFI systems boot our disk images.
Previous Next
Full log
View this message in rfc822 format
Hi Marius,
On Mon, 17 Jul 2017 23:26:06 +0200
Marius Bakke <mbakke <at> fastmail.com> wrote:
>However... The 'grub-hybrid' approach seems okay to me (although
>building grub-efi again is unnecessary :)).
No, it's not unnecessary. When you do not use this approach (for example when you create a new package which has "grub" and "grub-efi" as input) then the resulting executables (for example grub-efi's grub-mkrescue) will not find the platform support files - because the search path for multiple platforms is being hardcoded at build time.
Doesn't work:
+(define-public grub-hybrid
+ (package
+ (name "grub-hybrid")
+ (version (package-version grub-efi))
+ (inputs
+ `(("grub-efi" ,grub-efi) ; keep as first (preferred) entry
+ ("grub" ,grub)))
+ (build-system trivial-build-system)
+ (arguments
+ '(#:modules ((guix build union))
+ #:builder (begin
+ (use-modules (ice-9 match)
+ (guix build union))
+ (match %build-inputs
+ (((names . directories) ...)
+ ;; Take "lib/grub/i386-pc" from grub, the remainder
+ ;; from grub-efi.
+ (union-build (assoc-ref %outputs "out")
+ directories))))))
+ (home-page "https://www.gnu.org/software/grub/")
+ (synopsis "GRand Unified Boot loader (Hybrid version)")
+ (description "This version of GRUB tries the @code{grub-efi} and
+then the traditional @code{grub}.")))
+
> 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.
I'm using it for grub-mkrescue and, there, it's definitely supported in the sense of there's explicit case analysis in the source code for it and also big structures to enable this kind of using multiple platforms.
For other uses I don't know.
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.