Opened 6 years ago

Last modified 11 months 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: uefi, mac Cc:
Blocked By: Blocking:
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 (1)

efi.jpg (26.4 KB ) - added by diver 5 years ago.

Download all attachments as: .zip

Change History (27)

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, 5 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, 5 years ago

Attachment: efi.jpg added

comment:7 by pulkomandy, 4 years ago

Component: System/Boot LoaderSystem/Boot Loader/EFI

comment:8 by pulkomandy, 4 years ago

Any progress in the last two years?

comment:9 by diver, 4 years ago

Nope, still hangs as of beta2.

comment:10 by tqh, 4 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, 4 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 the OS booting is a Mac I think. That enables more hw.

Version 0, edited 4 years ago by tqh (next)

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, 3 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, 3 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, 3 years ago

"Any change after hrev54760?"

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

comment:21 by kallisti5, 3 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, 3 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, 3 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, 3 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, 3 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, 3 years ago

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

Note: See TracTickets for help on using tickets.