GNU bug report logs - #27695
[PATCH 0/2] Introduce grub hybrid bootloader and use it.

Previous Next

Package: guix-patches;

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

Date: Fri, 14 Jul 2017 19:01:01 UTC

Severity: normal

Tags: patch

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

Bug is archived. No further changes may be made.

Full log


Message #20 received at 27695 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: 27695 <at> debbugs.gnu.org
Subject: Re: [bug#27695] [PATCH 1/2] bootloader: Add grub-hybrid-bootloader.
Date: Thu, 20 Jul 2017 13:47:32 +0200
Hi Ludo,

On Thu, 20 Jul 2017 10:39:14 +0200
ludo <at> gnu.org (Ludovic Courtès) wrote:

> Is it really all it takes to make a GRUB that can do both BIOS and UEFI?
> I wonder why GRUB upstream doesn’t do it by default.

I think they do, in a sense.  In many other distributions the directory is common - so if you install both grub-pc and grub-efi on your disk then grub will indeed use both (for grub-mkrescue).

>  Do you think we should discuss it with them?
> 
> If that works, we might just as well make it the new “grub” package and
> remove “grub-efi”.  Or is there any downside?

I only use this feature for grub-mkrescue right now.  I know that it is supported *there* in the sense that there's explicit "if" blocks checking for both platforms (by literals) in the same function, but not exclusively (i.e. "if (efi) A; if (non efi) B;" without "else").  See main() in util/grub-mkrescue.c in grub 2.02 (lines 667ff for EFI, lines 571ff for "PC"). The EFI stuff has "_EFI" in the preprocessor definitions, so search for that.

Note that main() supports a command line option for getting the source files for ONE SINGLE platform, but when you don't specify that option then it uses multiple platforms (the ones it can find).

For using multiple platforms as a regular bootloader I do NOT know whether that works or makes sense at all.  Maybe it does, I just didn't test it (and can't usefully).

That's why there's the alternative implementation that wouldn't add a Guix bootloader for it.

I hope someone else knows.  I don't have EFI hardware so I'm really the wrong person to find out that stuff.  Well I could try reading the documentation / asking and hoping that it's all correct, but ... you know... paper is patient :)

util/grub-install.c seems to use a case anaylsis with exclusive cases for finding out EFI or not *shrugs*.




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

Previous Next


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