On Sat, Apr 20, 2019 at 06:32:07PM +0200, Thomas Schmitt wrote:
> We still need to find out whether the partition entry is the culprit.
> So please do the experiment with the Guix EFI partition image in
> partition 2 of the USB stick and
> 
>    dd if=/dev/zero bs=1 count=16 seek=446 of=/dev/sdc2
> 

Yes, this fixes the issue.


I tried current Git guix master with ludo's reproducibility patches.
Of course with the reproducibility patches the Macbook still gets
stuck before booting.

> Yes.
>   http://git.savannah.gnu.org/cgit/grub.git/tree/util/grub-mkrescue.c#n812
> has:
>       rv = grub_util_exec ((const char * []) { "mformat", "-C", "-f", "2880", 
> "-L", "16", "-i",
>             efiimgfat, "::", NULL });
> 

I added "-k" to it (see attached ugly Guix patch).  This fixes the
issue for me.  (I do not know if this has other unintended side
effects and I can only try on other Macbooks next week.)

Regards,
Florian
>From 0d266ebe33d03816d200e285d172e76ff641dca6 Mon Sep 17 00:00:00 2001
From: Florian Pelz <pelzflor...@pelzflorian.de>
Date: Sun, 21 Apr 2019 08:34:17 +0200
Subject: [PATCH] use
 gnu/packages/patches/grub-make-mkrescue-use-k-option.patch

---
 gnu/packages/bootloaders.scm                          |  3 ++-
 .../patches/grub-make-mkrescue-use-k-option.patch     | 11 +++++++++++
 2 files changed, 13 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/grub-make-mkrescue-use-k-option.patch

diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index b4eabaea48..013b112592 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -91,7 +91,8 @@
                "03vvdfhdmf16121v7xs8is2krwnv15wpkhkf16a4yf8nsfc3f2w1"))
              (patches (search-patches "grub-check-error-efibootmgr.patch"
                                       "grub-binutils-compat.patch"
-                                      "grub-efi-fat-serial-number.patch"))))
+                                      "grub-efi-fat-serial-number.patch"
+                                      
"grub-make-mkrescue-use-k-option.patch"))))
     (build-system gnu-build-system)
     (arguments
      `(#:phases (modify-phases %standard-phases
diff --git a/gnu/packages/patches/grub-make-mkrescue-use-k-option.patch 
b/gnu/packages/patches/grub-make-mkrescue-use-k-option.patch
new file mode 100644
index 0000000000..fbb4c5f596
--- /dev/null
+++ b/gnu/packages/patches/grub-make-mkrescue-use-k-option.patch
@@ -0,0 +1,11 @@
+--- grub-2.02/util/grub-mkrescue.c     2019-04-21 08:17:18.880000000 +0200
++++ grub-2.02/util/grub-mkrescue.c     2019-04-21 08:17:52.588000000 +0200
+@@ -791,7 +791,7 @@
+ 
+       const char *fat_serial_number = getenv ("GRUB_FAT_SERIAL_NUMBER");
+       const char *mformat_args[] =
+-      { "mformat", "-C", "-f", "2880", "-L", "16",
++      { "mformat", "-k", "-C", "-f", "2880", "-L", "16",
+         fat_serial_number != NULL ? "-N" : "-C",
+         fat_serial_number != NULL ? fat_serial_number : "-C",
+         "-i", efiimgfat, "::", NULL };
-- 
2.21.0

Reply via email to