dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone

Blame SOURCES/0016-add-part_apple-to-EFI-rescue-image-to-fix-missing-pr.patch

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