48

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?

  • 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 Aug 1 '17 at 14:20
  • Possible duplicate of Getting UEFI shell when trying to boot OS X in VirtualBox – Scott Aug 23 '17 at 5:25
  • 4
    @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/… – music2myear Aug 25 '17 at 23:12
  • I experienced this while installing Mojave VM under Mojave on a MacBook Pro. – adib Aug 13 '19 at 14:33
31

UEFI requires intervention because EFI firmware on the Mac's motherboard cant 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 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 macOS installer from an ISO 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 VirtualBox forum):

  1. At 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 2nd 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 2nd 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

| improve this answer | |
  • 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! – rastating Oct 25 '18 at 15:24
  • Thanks @rastating. I added it in italics to the steps, as a potential extra layer in some configurations. – clearlight Oct 28 '18 at 23:18
  • 6
    I have nothing in "Boot Files" also I have nothing in "Add Boot Option". Any solutions? – GrinderZ Jan 14 '19 at 17:55
  • That's why it says then (if present). If you look at the previous comments, it was added because apparently some people do have that. If you don't, I guess you don't need to worry about it. – clearlight Jan 14 '19 at 22:14
  • @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 Mar 7 '19 at 2:50
15

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

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.