011fe81
From 3aea6cc46177a90056ba60381e6387377fe40c99 Mon Sep 17 00:00:00 2001
78a3d7d
From: Andrey Borzenkov <arvidjaar@gmail.com>
78a3d7d
Date: Sun, 12 Jan 2014 15:29:21 +0400
58fe9aa
Subject: [PATCH 016/152] add part_apple to EFI rescue image to fix missing
78a3d7d
 prefix
78a3d7d
78a3d7d
On Mac rescue image is booted from HFS+ partition, so bootpath looks like
78a3d7d
/ACPI(a0341d0,0)/PCI(1,1f)/ATAPI(0,0,0)/HD(3,5d1,ca3,0000000000000000,20,0)/EndEntire
78a3d7d
78a3d7d
grub fails to find device for this path because it cannot scan partition
78a3d7d
table. The simplest fix is to add part_apple by default.
78a3d7d
---
78a3d7d
 util/grub-mkrescue.c | 6 ++++++
78a3d7d
 1 file changed, 6 insertions(+)
78a3d7d
78a3d7d
diff --git a/util/grub-mkrescue.c b/util/grub-mkrescue.c
78a3d7d
index 0d03e55..34e0b7a 100644
78a3d7d
--- a/util/grub-mkrescue.c
78a3d7d
+++ b/util/grub-mkrescue.c
78a3d7d
@@ -653,11 +653,15 @@ main (int argc, char *argv[])
78a3d7d
       make_image_fwdisk_abs (GRUB_INSTALL_PLATFORM_IA64_EFI, "ia64-efi", imgname);
78a3d7d
       free (imgname);
78a3d7d
 
78a3d7d
+      grub_install_push_module ("part_apple");
78a3d7d
       img64 = grub_util_path_concat (2, efidir_efi_boot, "bootx64.efi");
78a3d7d
       make_image_fwdisk_abs (GRUB_INSTALL_PLATFORM_X86_64_EFI, "x86_64-efi", img64);
78a3d7d
+      grub_install_pop_module ();
78a3d7d
 
78a3d7d
+      grub_install_push_module ("part_apple");
78a3d7d
       img32 = grub_util_path_concat (2, efidir_efi_boot, "bootia32.efi");
78a3d7d
       make_image_fwdisk_abs (GRUB_INSTALL_PLATFORM_I386_EFI, "i386-efi", img32);
78a3d7d
+      grub_install_pop_module ();
78a3d7d
 
78a3d7d
       imgname = grub_util_path_concat (2, efidir_efi_boot, "bootarm.efi");
78a3d7d
       make_image_fwdisk_abs (GRUB_INSTALL_PLATFORM_ARM_EFI, "arm-efi", imgname);
78a3d7d
@@ -707,7 +711,9 @@ main (int argc, char *argv[])
78a3d7d
       free (efidir);
78a3d7d
     }
78a3d7d
 
78a3d7d
+  grub_install_push_module ("part_apple");
78a3d7d
   make_image_fwdisk (GRUB_INSTALL_PLATFORM_POWERPC_IEEE1275, "powerpc-ieee1275", "powerpc-ieee1275/core.elf");
78a3d7d
+  grub_install_pop_module ();
78a3d7d
 
78a3d7d
   if (source_dirs[GRUB_INSTALL_PLATFORM_POWERPC_IEEE1275])
78a3d7d
     {
78a3d7d
-- 
37b39b7
1.9.3
78a3d7d