Bug 1128374

Summary: chainloading OS X bootloader fails
Product: [Fedora] Fedora Reporter: Chris Murphy <bugzilla>
Component: grub2Assignee: Peter Jones <pjones>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: bcl, lkundrak, mads, pjones
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-27 04:13:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
photo of grub messages none

Description Chris Murphy 2014-08-09 17:09:30 UTC
Description of problem: Using GRUB to chainload the OS X bootloader doesn't work.


Version-Release number of selected component (if applicable):
grub2-2.02-0.6.fc21

How reproducible:
Always

Steps to Reproduce:
1. GRUB command line
2. chainloader <pathtoboot.efi>
3. boot

Actual results:

I briefly see the display change to the graphical boot screen with an Apple logo in it; drops back to the grub text screen with various messages (see photo).

Mach-O file has bad magic number
Error loading kernel 'mach_kernel'

Expected results:

It should boot OS X.

Additional info:

This used to work so I'm not sure what's changed. The OS X boot.efi file is dated 9/23/13 so it's not recently modified, and its md5sum matches that on two other systems. This is the OS X 10.8.5 12F45 bootloader. I'm going to guess something in GRUB has changed since I last tried this, so I'll do some regression testing.

Comment 1 Chris Murphy 2014-08-09 17:10:24 UTC
Created attachment 925383 [details]
photo of grub messages

Comment 2 Chris Murphy 2014-08-09 17:19:19 UTC
See also:
https://savannah.gnu.org/bugs/index.php?42954

Comment 3 Chris Murphy 2014-10-27 04:12:26 UTC
This was user error. It's necessary to explicitly set root to the Recovery HD partition being pointed to subsequently with chainloader command. See the upstream bug.

So now what's needed are some fixes for grub-mkconfig scripts and os-prober to properly identify Recovery HD, which always uses the newish Apple Boot partitiontype GUID, as the volume containing the bootloader we want to chainload to boot OS X. And get them to stop thinking the conventional HFS+ partitiontype GUID is OS X, since that's not used anymore by Apple, but is used by mactel boot.

Crazy enough we have a way to differentiate between OS X and mactel boot by partitiontype GUID now.