all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Danny Milosavljevic <dannym@scratchpost.org>
To: Mark H Weaver <mhw@netris.org>
Cc: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>, 30311@debbugs.gnu.org
Subject: bug#30311: efi-less grub install fails
Date: Sun, 18 Feb 2018 17:49:22 +0100	[thread overview]
Message-ID: <20180218174922.47f656a7@scratchpost.org> (raw)
In-Reply-To: <87tvuel15z.fsf@netris.org>

[-- Attachment #1: Type: text/plain, Size: 897 bytes --]

Hi Mark,

> This change breaks my mips64el-linux GuixSD system, which is supported
> by GRUB, but where "--target=i386-pc" is obviously not appropriate.  On
> my system I need a different 'target' setting.

A pretty safe workaround is to substitute /sys/firmware/efi by /sys/firmware/non-efi
in ./grub-core/osdep/linux/platform.c for non-efi grub.

See attachment...

> In the rare cases where GRUB fails to detect the target, perhaps we
> could provide a way to specify an explicit GRUB 'target' in the grub
> configuration?

I still think that upstream should fix this bug.  It's silly that we have to
massage grub to not select a target which grub wasn't compiled for - we
patch/configure one part of grub so another part of grub isn't confused.

It's the same package :P

Bootloader configuration is complicated enough already.  In this case I'd rather
grub did the right thing automatically.

[-- Attachment #2: 0001-gnu-grub-Make-sure-that-non-EFI-grub-doesn-t-try-to-.patch --]
[-- Type: text/x-patch, Size: 1813 bytes --]

From 263b1dc0de9643094bc41f4be47b4b2317e95d7c Mon Sep 17 00:00:00 2001
From: Danny Milosavljevic <dannym@scratchpost.org>
Date: Sun, 18 Feb 2018 17:30:48 +0100
Subject: [FIXME] gnu: grub: Make sure that non-EFI grub doesn't try to use
 EFI.
Tags: patch

* gnu/packages/bootloader.scm (grub)[arguments]<:phases>
[patch-/sys/firmware/efi-out]: New phase.
(grub-efi)[arguments]<:phases>[patch-/sys/firmware/efi-out]: Delete phase.

Fixes <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=30311>.
---
 gnu/packages/bootloaders.scm | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index 59eb22f24..c09829e17 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -103,6 +103,11 @@
                      (copy-file (assoc-ref inputs "unifont") "unifont.bdf.gz")
                      (system* "gunzip" "unifont.bdf.gz")
                      #t))
+                  (add-after 'unpack 'patch-/sys/firmware/efi-out
+                   (lambda _
+                     (substitute* "grub-core/osdep/linux/platform.c"
+                      (("/sys/firmware/efi") "/sys/firmware/non-efi"))
+                     #t))
                   (add-before 'check 'disable-flaky-test
                     (lambda _
                       ;; This test is unreliable. For more information, see:
@@ -177,6 +182,7 @@ menu to select one of the installed operating systems.")
             `(cons "--with-platform=efi" ,flags))
            ((#:phases phases)
             `(modify-phases ,phases
+               (delete 'patch-/sys/firmware/efi-out)
                (add-after 'patch-stuff 'use-absolute-efibootmgr-path
                  (lambda* (#:key inputs #:allow-other-keys)
                    (substitute* "grub-core/osdep/unix/platform.c"

  reply	other threads:[~2018-02-18 16:50 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-31 18:55 bug#30311: efi-less grub install fails Ricardo Wurmus
2018-01-31 23:34 ` Danny Milosavljevic
2018-02-01 12:40   ` Marius Bakke
2018-02-18 11:28     ` Ricardo Wurmus
2018-01-31 23:55 ` Ludovic Courtès
2018-02-18 16:20 ` Mark H Weaver
2018-02-18 16:49   ` Danny Milosavljevic [this message]
2018-02-20 21:40     ` Ricardo Wurmus
2018-02-20 21:43       ` Danny Milosavljevic
2018-02-20 21:49         ` Ricardo Wurmus
2018-02-20 22:00           ` Danny Milosavljevic
2018-03-26 21:15             ` Danny Milosavljevic
2018-02-20  3:21   ` Marius Bakke
2018-02-20  3:46     ` Marius Bakke
2018-02-20 20:54       ` Danny Milosavljevic
2018-02-20 21:00       ` Danny Milosavljevic
2018-02-22 15:06         ` Marius Bakke
2018-02-22 15:47           ` Ricardo Wurmus
2018-02-23 11:30             ` Marius Bakke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180218174922.47f656a7@scratchpost.org \
    --to=dannym@scratchpost.org \
    --cc=30311@debbugs.gnu.org \
    --cc=mhw@netris.org \
    --cc=ricardo.wurmus@mdc-berlin.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.