Opened 6 years ago

Last modified 5 weeks ago

#14453 assigned bug

Cannot boot UEFI images on a Mac

Reported by: warpdesign2 Owned by: jessicah
Priority: normal Milestone: Unscheduled
Component: System/Boot Loader/EFI Version: R1/Development
Keywords: boot-failure Cc:
Blocked By: Blocking: #9365
Platform: All

Description

Attempting to boot the UEFI image using USB on a Mac doesn't work.

After pressing "alt" to bring the boot menu, and selecting the USB UEFI boot, nothing happens and the Mac seem to have frozen.

Attachments (2)

efi.jpg (26.4 KB ) - added by diver 6 years ago.
PXL_20241025_074451215.jpg (4.5 MB ) - added by warpdesign2 2 months ago.
Graphics is trashed on Intel HD Graphics 615 on rev 58285

Change History (34)

comment:1 by warpdesign2, 6 years ago

Note: since no official images are available yet, I tried this one I found: https://keybase.pub/kallisti5/haiku-nightly-anyboot-efi.iso

comment:2 by diver, 6 years ago

Component: - GeneralSystem/Boot Loader
Owner: changed from nobody to jessicah
Status: newassigned

comment:3 by KapiX, 6 years ago

Which Mac? (model and year; specs would be nice)

comment:4 by warpdesign2, 6 years ago

Mac mini late 2012:

  • 2.3 GHz Core i7 (I7-3615QM)
  • intel HD4000
  • 16GB RAM
  • 2xHDD SATA (nous SSD)

comment:5 by warpdesign2, 6 years ago

No SSD...

comment:6 by diver, 6 years ago

Same issue here on MacBook Pro (Retina, 15-inch, Early 2013).
Selecting the UEFI boot freezes Mac. This is how it looks like:

by diver, 6 years ago

Attachment: efi.jpg added

comment:7 by pulkomandy, 5 years ago

Component: System/Boot LoaderSystem/Boot Loader/EFI

comment:8 by pulkomandy, 5 years ago

Any progress in the last two years?

comment:9 by diver, 5 years ago

Nope, still hangs as of beta2.

comment:10 by tqh, 5 years ago

It is really hard to track down without hw or more info. To me it looks like it is not even starting..

comment:11 by diver, 5 years ago

haiku_loader.efi starts fine if chainloaded via rEFInd. So it does something different here.

comment:12 by alpopa, 4 years ago

Is the EFI boot any better from Haiku DVD rather than from USB?

comment:13 by tqh, 4 years ago

Refind uses Mac specific UEFI API to trick Mac that the OS booting is MacOS I think. That enables more hw.

Last edited 4 years ago by tqh (previous) (diff)

comment:14 by tqh, 4 years ago

Sorry it wasn't refind. I was thinking of https://github.com/0xbb/apple_set_os.efi

comment:15 by diver, 4 years ago

According to https://wiki.archlinux.org/index.php/Unified_Extensible_Firmware_Interface

Apple's EFI implementation is neither a EFI 1.x version nor UEFI 2.x version but mixes up both. This kind of firmware does not fall under any one (U)EFI specification and therefore is not a standard UEFI firmware. Unless stated explicitly, these instructions are general and some of them may not work or may be different in Apple Macs.

Also https://sourceforge.net/p/refind/discussion/general/thread/549be07acc/#4bd5

I've had problems getting gdisk to run on Macs, I suspect because of incompatibities between the way it's built and the Mac's EFI. (Apple uses a heavily-patched EFI 1.x that's incompatible with some binaries built for EFI 2.x.)

comment:16 by diver, 4 years ago

I wonder if it could be related to framebuffer base address. Linux used to freeze in a similar way https://bugzilla.redhat.com/show_bug.cgi?id=528232

comment:17 by tqh, 4 years ago

I would expect them to have moved on and get FB address from UEFI as we do by now.

However as https://lists.gnu.org/archive/html/grub-devel/2013-12/msg00442.html writes, Mac disables internal GPU's on certain models when booting non Mac OS. So framebuffer mem might not be mapped and GPU might not be enabled.

comment:18 by pulkomandy, 4 years ago

Various questions:

  • Is there a machine where this happens that also has an ExpressCard port? We could then use that to get serial debug output
  • Is there a way to access the boot menu or does it not even get this far?
  • Is there any way to "hot reset" the machine (without power down), and then start the bootloader from EFI after that? With some luck, it would allow us to get the bootloader log from the previous attempt
  • Any change after hrev54760?

comment:19 by kallisti5, 4 years ago

I should mention here that https://github.com/0xbb/apple_set_os.efi should not be needed... haiku's bootloader actually already does this as of hrev53869

https://git.haiku-os.org/haiku/tree/src/system/boot/platform/efi/quirks.cpp

comment:20 by kallisti5, 4 years ago

"Any change after hrev54760?"

Y'all reverted that one.. so not really testable now :P

comment:21 by kallisti5, 4 years ago

also, I can confirm the black screen on a 2019 Mac Book Pro (A1990) as of hrev54950

I just noticed that the efi_quirks happen *WAY* too late. Going to see if moving them sooner helps.

comment:22 by kallisti5, 4 years ago

@diver you might want to see if https://review.haiku-os.org/c/haiku/+/3741 improves the issue for you.

It doesn't fix the black screen issue on my 2019 Mac Book Pro, but may help the older (non-T2) devices.

comment:23 by diver, 4 years ago

I tried hrev54952 with and without your patch and they both behave the same way: boot logo appears but no icons are lit. So there were some progress since my comment:6.

comment:24 by kallisti5, 4 years ago

@diver Thanks for confirming! By "boot logo" do you mean the logo for the "usb drive with the leaf" or do you see the Haiku bootsplash with the icons?

If the latter, could you try tapping space after selecting Haiku to get into the haiku bootloader menu? a picture of the haiku bootloader logs would be greatly helpful

comment:25 by diver, 4 years ago

I meant Haiku bootsplash with the icons.

Tapping space (or Esc) after selecting Haiku locks up screen at the initial volume selection with usb drive with the leaf.

comment:26 by kallisti5, 4 years ago

interesting. Did you try entering the Haiku boot menu with and without the patch above?

comment:27 by waddlesplash, 2 months ago

Blocking: 9365 added

comment:28 by waddlesplash, 2 months ago

Keywords: uefi mac removed

Please retest with a recent nightly.

comment:29 by nephele, 2 months ago

Tested hrev 58265
mac mini 2012: no change
mac mini 2014: didn't see the bootloader (why? did my usb stick break between tests?)
mac mini 2012 (2): no change (but sees the bootloader)

To me the 2014 one not seeing the bootloader is suprising to me. I'll try and check if this is a regression.

Also note that I have two mac mini 2012 that I have gotten for haiku porting so i could ship one out to a fellow develop for testing. No expresscard port in there though

Last edited 2 months ago by nephele (previous) (diff)

comment:30 by warpdesign2, 2 months ago

I tested rev 58285 on another Mac and it boots to the desktop but the display is trashed, see included photo.

This is a Macbook from 2017 which has Intel HD Graphics 615.

Full specs can be found here: https://support.apple.com/en-us/111986

by warpdesign2, 2 months ago

Attachment: PXL_20241025_074451215.jpg added

Graphics is trashed on Intel HD Graphics 615 on rev 58285

comment:31 by waddlesplash, 2 months ago

Try blocklisting the intel_extreme driver.

comment:32 by waddlesplash, 5 weeks ago

Keywords: boot-failure added

Please retest after hrev58344; we may get an onscreen panic at least.

Note: See TracTickets for help on using tickets.