[Resolved] How to boot into UEFI shell on VirtualBox with a macOS guest?

Discussions about using Mac OS X guests (on Apple hardware) in VirtualBox.

[Resolved] How to boot into UEFI shell on VirtualBox with a macOS guest?

Postby RDNZL » 20. Aug 2019, 07:12

I am running VirtualBox 6.0.10 on an iMac (Mojave) and I prepared a macOS High Sierra VM from the ground up with VirtualBox. The VM runs fine, but I am not able to update the guest OS from 10.13.4 to 10.13.6.

The reason for that, as far as I understood, is that the macOS update is installed onto the recovery partition of the VM hard drive and the VM should boot from this partition to finish the update. Unfortunately, the UEFI boot settings of VirtualBox seem to overrun the macOS settings and the system always boots the regular macOS partition. So each time I start the update from macOS, the reboot gives me an unaltered system.

While preparing the High Sierra VM, I had a hard time getting out of the UEFI shell and selecting the correct boot.efi in order to boot the system.

But now I want to get into the UEFI shell, then to the boot options. I found hints to press F12 or fn-F12 "during boot" for getting into the shell, but I tried it several times to no avail. Also hitting "AnyKey" during boot, as suggested elsewhere (very funny), did not help.

At what time during boot exactly should I press what key?

Are there other options to accomplish that?
Last edited by socratis on 21. Aug 2019, 07:07, edited 1 time in total.
Reason: Marked as [Resolved].
RDNZL
 
Posts: 4
Joined: 20. Aug 2019, 07:07

Re: How to boot into UEFI shell on VirtualBox with a macOS guest?

Postby socratis » 20. Aug 2019, 09:00

RDNZL wrote:Also hitting "AnyKey" during boot, as suggested elsewhere (very funny), did not help.

I believe I was the one that first mentioned the AnyKey. ;)
Try it again, it does work, but you got to be smashing that AnyKey. If you miss it, I find it rather convenient to Reset the VM by pressing HostKey+R, and try again. At that early stage of the boot, there not much to be lost/corrupted.

But I wouldn't keep my hopes too high for 10.13.6 update going well. Last time I tried it, I never got it to work, I'll try again today, see if things have changed...
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
socratis
Site Moderator
 
Posts: 25323
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

Re: How to boot into UEFI shell on VirtualBox with a macOS guest?

Postby RDNZL » 20. Aug 2019, 09:53

socratis wrote:
RDNZL wrote:Also hitting "AnyKey" during boot, as suggested elsewhere (very funny), did not help.

I believe I was the one that first mentioned the AnyKey. ;)

Ah, you were the one! ;)
socratis wrote:Try it again, it does work, but you got to be smashing that AnyKey. If you miss it, I find it rather convenient to Reset the VM by pressing HostKey+R, and try again. At that early stage of the boot, there not much to be lost/corrupted.

Okay, I'll keep trying. By smashing it you mean hitting it again and again or keeping it pressed?
RDNZL
 
Posts: 4
Joined: 20. Aug 2019, 07:07

Re: How to boot into UEFI shell on VirtualBox with a macOS guest?

Postby socratis » 20. Aug 2019, 10:28

Actually I was the one that pretty much got the hint from the developer and kind of made it a public secret :P

Smashing as in "playing the bongo", keep on tapping it.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
socratis
Site Moderator
 
Posts: 25323
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

Re: How to boot into UEFI shell on VirtualBox with a macOS guest?

Postby fth0 » 20. Aug 2019, 11:11

There could be a 2nd problem (firmware update):

I also had problems with the 10.13.6 update inside a macOS VM several months ago (host 10.13.6, VB 5.2.x). But for me it even didn't work after selecting the correct boot.efi. I read/guessed/learned that at that time, the 10.13.6 update insisted on upgrading the firmware (UEFI BIOS) inside the guest, which cannot work in a VM. Weeks later, some versions of the 10.13.6 update files (separate downloads, but from Apple) than worked, even without having to select the bios.efi file.

Since I made several attempts without (snapshot) rollback and used several different 10.13.6 update files, I cannot tell you which one worked for me. :(

My tip for the keys is to press Host+R and fn-F12 immediately one after the other. With prepared finger placement, you can try several times in a row and on my iMac with Bluetooth keyboard, I need to press the keys in less than 200 ms apart from each other, so the 'key' is to be fast here.
fth0
 
Posts: 152
Joined: 14. Feb 2019, 03:06
Location: Germany
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, macOS, ...

Re: How to boot into UEFI shell on VirtualBox with a macOS guest?

Postby socratis » 20. Aug 2019, 11:26

fth0 wrote:Since I made several attempts without (snapshot) rollback and used several different 10.13.6 update files, I cannot tell you which one worked for me
That's why I have snapshots ;)
Do you have the links and/or filenames for the Apple updates? The only one I've tried was the 10.13.6 combo update.

fth0 wrote:My tip for the keys is to press Host+R and fn-F12 immediately one after the other
Try the AnyKey instead of Fn+F12, you'd be pleasantly surprised. No prepared finger placement, no finger strain... ;)
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
socratis
Site Moderator
 
Posts: 25323
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

Re: How to boot into UEFI shell on VirtualBox with a macOS guest?

Postby fth0 » 20. Aug 2019, 21:37

socratis wrote:That's why I have snapshots ;)

I usually also work with snapshots. Each of my main VMs has an (at one point in time) up-to-date OS and one snapshot, to which I return regularly. The exception (in the past) was when I updated the guest OS. My iMac host has a fusion drive with limited, automatically managed storage on its SSD part, and after merging snapshots, starting the VMs regularly had gotten significantly slower. Therefore I changed my strategy and deleted the snapshot before updating the guest OS. Meanwhile I got a little bit smarter and know more details of snapshots and the fusion drive, and went back to the strategy of merging the snapshot after the guest OS update.
When fighting with the different 10.13.6 updates, at one day I learned that they consist of multiple parts (at least one firmware and one macOS update), and after some failing attempts I stopped using a snapshot in the hope that multiple runs would each accomplish some part of the update.

socratis wrote:Do you have the links and/or filenames for the Apple updates?

Back then, I collected (sometimes deep) links to Apple websites from multiple different major Mac websites, where the update problems (on real hardware) were discussed in lengths. There were combo updates and single updates, and it was the newest I could find that finally worked. But I have no more detailed info on that any more, I'm sorry.

socratis wrote:Try the AnyKey

I cannot find the AnyKey. ;)
Seriously, I tried several keys on my Magic Keyboard (Bluetooth, no keypad, iMac 15,1): 'r', ' ', 'Enter', but none of them works, only fn+F12 does.
fth0
 
Posts: 152
Joined: 14. Feb 2019, 03:06
Location: Germany
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, macOS, ...

Re: How to boot into UEFI shell on VirtualBox with a macOS guest?

Postby RDNZL » 21. Aug 2019, 06:56

socratis wrote:Actually I was the one that pretty much got the hint from the developer and kind of made it a public secret :P

Smashing as in "playing the bongo", keep on tapping it.

Okay, the space bar served me well as AnyKey. I clicked the green arrow in the VirtualBox Manager to start my VM and immediately started hitting the space bar. This got me into the EFI menu on the first try.

Thanks for your help!
Last edited by RDNZL on 21. Aug 2019, 07:03, edited 1 time in total.
RDNZL
 
Posts: 4
Joined: 20. Aug 2019, 07:07

Re: How to boot into UEFI shell on VirtualBox with a macOS guest?

Postby socratis » 21. Aug 2019, 06:59

Glad that the AnyKey got into the EFI. Marking as [Resolved].
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
socratis
Site Moderator
 
Posts: 25323
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

Re: How to boot into UEFI shell on VirtualBox with a macOS guest?

Postby RDNZL » 21. Aug 2019, 07:01

fth0 wrote:There could be a 2nd problem (firmware update):

Yes, I have this problem too now. I tried to update via the App Store, but going into UEFI only let me reinstall 10.13.4. It would be very interesting to know which updater worked.
RDNZL
 
Posts: 4
Joined: 20. Aug 2019, 07:07

Re: [Resolved] How to boot into UEFI shell on VirtualBox with a macOS guest?

Postby fth0 » 23. Aug 2019, 19:47

fth0 wrote:
socratis wrote:Try the AnyKey ;)

I cannot find the AnyKey. ;)
Seriously, I tried several keys on my Magic Keyboard (Bluetooth, no keypad, iMac 15,1): 'r', ' ', 'Enter', but none of them works, only fn+F12 does.

@socratis
Using fn+F12, I get into the regular BIOS and into the UEFI with at least 8 of 10 attempts, so I get the timing right for that. But it doesn't work with my selection of AnyKeys so far. And I couldn't find my AnyKey key cap from the past, in case it would be necessary. ;)

Do you know if the AnyKey needs a different timing or depends on the keyboard hardware or interface (or do you know its source code location)?
fth0
 
Posts: 152
Joined: 14. Feb 2019, 03:06
Location: Germany
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, macOS, ...

Re: [Resolved] How to boot into UEFI shell on VirtualBox with a macOS guest?

Postby socratis » 23. Aug 2019, 23:28

Just to clear something; BIOS requires F12, EFI doesn't. I tried with a couple (random) keys and I always got it to get me into the EFI options menu. Keys like <Space>, R, D, K, F5, you name it. That's on a 2011 MBP running 10.9.5, a 2015 MBP running 10.11.6 and a Linux Mint 19 on an old PC.

As for the source code reference, I have an idea or two, but I'll ask around and see if I can get the definitive answer.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
socratis
Site Moderator
 
Posts: 25323
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

Re: [Resolved] How to boot into UEFI shell on VirtualBox with a macOS guest?

Postby fth0 » 24. Aug 2019, 01:29

socratis wrote:Just to clear something; BIOS requires F12, EFI doesn't.

Thanks for clarifying. That's the key (pun intended) I've been missing. :)

socratis wrote:As for the source code reference, I have an idea or two, but I'll ask around and see if I can get the definitive answer.

No longer necessary, I found the BIOS routine myself: ./src/VBox/Devices/PC/BIOS/logo.c:show_logo. And I didn't find the EFI routine looking for "[Ff]12" for (now) obvious reasons. Thanks again.
fth0
 
Posts: 152
Joined: 14. Feb 2019, 03:06
Location: Germany
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, macOS, ...


Return to Mac OS X Guests

Who is online

Users browsing this forum: No registered users and 4 guests