88

I got a Mac OS X virtual machine on VirtualBox and when I started it, I got into this UEFI shell:

UEFI shell

What should I do?

5
  • 1
    Unless you're running this on Apple hardware, this qualifies as a "Hackintosh" configuration, which is of questionable legality in many areas and so is off-topic here. That said, this Intel PDF describes the basics of the EFI shell, which is what you're seeing.
    – Rod Smith
    Commented Aug 1, 2017 at 14:20
  • 2
    Possible duplicate of Getting UEFI shell when trying to boot OS X in VirtualBox Commented Aug 23, 2017 at 5:25
  • 8
    @RodSmith The most recent discussion on this in Meta seems to reach the consensus that the legality is a non-issue, while the practicality may remain so: meta.superuser.com/questions/12050/… Commented Aug 25, 2017 at 23:12
  • 1
    I experienced this while installing Mojave VM under Mojave on a MacBook Pro.
    – adib
    Commented Aug 13, 2019 at 14:33
  • I had this same issue because I was trying to launch the VM using a .dmg file. First convert the Mojave .dmg file to an .iso file. You can find a guide on how to do this here superuser.com/a/1511382/1088993 (make sure you adjust the step 1 using my commented code instead of the code provided). Commented Apr 22 at 22:22

2 Answers 2

61

UEFI requires intervention, because the EFI firmware on the Mac's motherboard can’t find valid OS-specific EFI boot firmware in the standard location on disk. However, assuming you have a macOS recovery partition on that disk, it should contain a copy of boot.efi (macOS-specific boot firmware) that you can boot into the OS with.

Your immediate objective is to help EFI locate and execute OS-specific boot firmware. Ultimately, the objective is provide a boot partition that contains a macOS boot.efi. By now you may have surmised boot.efi is an EFI standard filename that lives at an EFI standard path in a disk partition, and it contains OS-specific boot firmware (e.g., Windows, Linux, etc... have their own flavors of boot.efi).

In my case, after installing macOS into a virtual machine according to these instructions (running the macOS installer from an ISO image downloaded from Apple), on first boot, the boot partition was present, but unconfigured (probably no boot image installed). After manually directing EFI to boot into macOS for the first time, macOS automatically fixed up the boot partition, and subsequent boots worked properly.

I was able to fix the UEFI problems as follows (credit to the VirtualBox forum):

  1. At the UEFI prompt: Type exit

  2. You'll be brought into an EFI text-mode GUI.

  3. Select Boot Maintenance Manager and click.

  4. Select Boot From File and click

You should see two entries in a list (they are cryptic-looking PCI bus paths).

The first PCI path in the list is probably the boot partition that doesn't contain bootable firmware. The second PCI path is probably to the recovery partition, the one you need to boot from. If the second partition isn't the recovery partition, look under the paths in the list to see if one of them is it. If the recovery partition isn't present and valid, these instructions won't work.

Click the second entry. You should see (and then click):

macOS Install Data

Then click:

Locked Files

Then (if present), click

Boot Files

And finally click:

boot.efi

Installation will continue, or you will boot into the OS or get the Recovery Utilities menu (where macOS can be reinstalled from or Disk Utilities run). The ambiguity of that last statement is I did that awhile before writing this comment, and I don't recall what I booted into first, only that it worked and was not hard to figure out what to do at that point.

If you have a recovery partition, to boot directly into the Recovery Mode, turn on the Mac and immediately press and hold + R.

Enter image description here

7
  • 1
    This worked for me. Only slight difference was that under Locked Files there was another level called Boot Files, once navigating into that directory, boot.efi was within it. Thanks!
    – user653110
    Commented Oct 25, 2018 at 15:24
  • 7
    I have nothing in "Boot Files" also I have nothing in "Add Boot Option". Any solutions?
    – GrinderZ
    Commented Jan 14, 2019 at 17:55
  • 1
    @GrinderZ follow the guide here -> forums.virtualbox.org/viewtopic.php?t=85631 , I had the USB connected with the ISO also loaded, not sure which one actually worked.
    – eri0o
    Commented Mar 7, 2019 at 2:50
  • 2
    i have found a boot.efi in deep in a system/libary folder
    – muescha
    Commented Dec 16, 2020 at 14:09
  • 8
    I found it in System\Library\Coreservices\boot.efi for 11.4 Big Sur Commented Jun 21, 2021 at 12:41
16

In VM settings General > Basic > Version set "macOS 10.13 High Sierra (64-bit)", because likely now you have setting 32-bit version.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .