Uefi shell when loading installed macos High Sierra as raw partition under Ubuntu on macbook pro

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

Uefi shell when loading installed macos High Sierra as raw partition under Ubuntu on macbook pro

Postby esmeralgan » 17. Apr 2018, 06:10

Hi,
Under Ubuntu 16.04 LTS when I load in EFI mode the raw High Sierra image created with
Code: Select all   Expand viewCollapse view
sudo VBoxManage internalcommands createrawvmdk -filename macOsXrawlinux28.vmdk -rawdisk /dev/sda -partitions 2

from VirtualBox 5.2.8 (+ext pack) I get the uefi interactive shell.
I have no idea how to access /System/Library/CoreServices/boot.efi from there.
Same result when using -partition 1,2 for vmdk file. Partition 1 contains /EFI/apple/ and no .efi file, so I cannot use uefi shell to boot some fs0:EFI/Apple/<file>.efi neither.
Using -partition 1,2,8 or -partition 2,8 I get the Refind (installed on hfs+ partition 8 ) menu with no option to boot to Mac Os. I don't understand why, because normally Refind gives two functional boot options to MacOS : preboot and APPLESSD.
Using full disk without -partition bypasses Refind menu even if it set as default boot and leads directly to grub menu in any cases. From there I should not continue to Ubuntu, trying macOS64bit it says mach_kernel prematurely ends, and that I should load kernel first. These errors occur in normal booting (not virtualized) anyway.

Does someone knows how I should proceed to successfuly load raw High Sierra if that's possible ?

Hardware is a macbook pro retina SSD mid 2014. With High Sierra, Windows 10 and Ubuntu 16.04 installed. No problem to run Windows 10 with Virtualbox.
Last edited by esmeralgan on 18. Apr 2018, 04:25, edited 1 time in total.
esmeralgan
 
Posts: 9
Joined: 15. Apr 2018, 22:30

Re: Uefi shell when loading installed macos High Sierra as raw partition under Ubuntu on macbook pro

Postby socratis » 17. Apr 2018, 09:07

Can you post a ZIPPED VBox.log for the affected VM?
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: 25934
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: Uefi shell when loading installed macos High Sierra as raw partition under Ubuntu on macbook pro

Postby esmeralgan » 17. Apr 2018, 16:07

In attachments the VBox.log files for mac virtual machine. Thank you.
Attachments
VBox.log.2.gz
partition 1,2 (EFI, mac OS)
(26.72 KiB) Downloaded 32 times
VBox.log.1.gz
partition 2 (mac OS)
(26.91 KiB) Downloaded 27 times
VBox.log.gz
partition 1,2,8 (EFI, mac OS, Refind)
(26.23 KiB) Downloaded 37 times
esmeralgan
 
Posts: 9
Joined: 15. Apr 2018, 22:30

Re: Uefi shell when loading installed macos High Sierra as raw partition under Ubuntu on macbook pro

Postby esmeralgan » 18. Apr 2018, 04:22

I think the main problem is that High Sierra is installed on an SSD in an AFPS partition which is not yet handled by Virtualbox.
So the solutions would be :
1) waiting Virtualbox to handle AFPS partition...
2) not use the raw install. Instead install High Sierra as a virtual machine on a virtual non-ssd hfs+ partition, to prevent High Sierra automatically switch to AFPS. This worked for me (on a shared NTFS partition, and could load the High Sierra VM in linux from there).
3) reinstall High Sierra on a hfs+ partition. Is this possible on an SSD disk ? I think it will switch to AFPS, right ?

So from my understanding the only practical option would be solution 2), unless there already exists another free hypervisor which can handle High Sierra in AFPS ? Is this correct ?
esmeralgan
 
Posts: 9
Joined: 15. Apr 2018, 22:30

Re: Uefi shell when loading installed macos High Sierra as raw partition under Ubuntu on macbook pro

Postby socratis » 18. Apr 2018, 13:00

You most certainly have an unusual setup, I'll give you that ;)

esmeralgan wrote:1) waiting Virtualbox to handle AFPS partition...
I'm not sure if it's the APFS, or the EFI part that's not quite working. My feeling would be the latter, because VirtualBox couldn't care less what the filesystem the VM uses. It's the BIOS/EFI responsibility to give the boot device the "go". And after that, VirtualBox isn't directly involved per se.

I do have a raw access 10.13 VM (still at 10.13 beta :shock: ), but it's raw access to the whole disk (external USB3). I would never give direct access to my main OSX partition, especially raw access, but that's just me. I'll upgrade my "VM" and see what partitions it ends up with.

esmeralgan wrote:2) not use the raw install. Instead install High Sierra as a virtual machine on a virtual non-ssd hfs+ partition, to prevent High Sierra automatically switch to AFPS
I have a "normal" VM, in which I designated its VDI as being SSD (in the VM Settings » Storage). As you'd expect, 10.13 converted/chose to create an APFS partition. But as I said before, VirtualBox doens't give two hoots whether it's APFS, FAT, HPFS or anything else. The VM works just fine.

esmeralgan wrote:3) reinstall High Sierra on a hfs+ partition. Is this possible on an SSD disk ? I think it will switch to AFPS, right ?
I think you're right on this one, I haven't seen anywhere/anything that would prevent the 10.13 installer switching you to APFS if it's on an SSD.

To be honest, I haven't looked that hard ;)
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: 25934
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: Uefi shell when loading installed macos High Sierra as raw partition under Ubuntu on macbook pro

Postby esmeralgan » 23. Apr 2018, 06:31

I have a "normal" VM, in which I designated its VDI as being SSD (in the VM Settings » Storage). As you'd expect, 10.13 converted/chose to create an APFS partition. But as I said before, VirtualBox doens't give two hoots whether it's APFS, FAT, HPFS or anything else. The VM works just fine.

Strange, when I do an High Sierra VDI install it successful run once installed if and only if I set non-SSD (so it keeps HFS), else I get the same problem as for the raw AFPS High Sierra install : I get a uefi shell with nothing bootable to my knowledge ( the only choice in boot from file leads to blank ). On the other side, I downgraded back my real AFPS High Sierra to HFS+ Yosemite and now I can run it straightforward as raw partition in Virtualbox without problem.

I think you're right on this one, I haven't seen anywhere/anything that would prevent the 10.13 installer switching you to APFS if it's on an SSD.

To be honest, I haven't looked that hard ;)

May be I could do an upgrade of my Yosemite to High Sierra as raw partition in Virtualbox with SSD unchecked (on my real SSD disk) ? :P
But that's not the point, I would like to boot on AFPS in Virtualbox as you do.
Still don't understand how it works on your machine, by the way it seems to be a known problem : http://tobiwashere.de/2017/10/virtualbo ... st-system/
As an attachment the last unsuccessful boot on the AFPS High Sierra VDI.
Attachments
VBox.log.gz
the missing file :)
(27.97 KiB) Downloaded 20 times
Last edited by esmeralgan on 23. Apr 2018, 23:04, edited 1 time in total.
esmeralgan
 
Posts: 9
Joined: 15. Apr 2018, 22:30

Re: Uefi shell when loading installed macos High Sierra as raw partition under Ubuntu on macbook pro

Postby socratis » 23. Apr 2018, 09:40

esmeralgan wrote:when I do an High Sierra VDI install it successful run once installed if and only if I set non-SSD (so it keeps HFS), else I get the same problem as for the raw AFPS High Sierra install : I get a uefi shell with nothing bootable to my knowledge ( the only choice in boot from file leads to blank ).
Have you followed the instructions? [HowTo] Install OSX 10.13 in a VM?

esmeralgan wrote:I downgraded back my real AFPS High Sierra to HFS+ Yosemite
How exactly did you do that? Out of curiosity... BTW, it's not the APFS that's problematic; it's the way that EFI is accessed. Apple changed the way that it accesses the whole thing (#16644: Installation of clean OSX 10.12.4 fails), but in 10.13.x, there is a manual workaround (see the [HowTo] from above). So, again, it's not the APFS vs HFS+, it's the location of boot.efi, in couple with the "inability" of VirtualBox to store EFI variables.

esmeralgan wrote:May be I could do an upgrade of my Yosemite to High Sierra as raw partition in Virtualbox with SSD unchecked (on my real SSD disk) ?
That could potentially work. As long as you follow the [HowTo], otherwise you're going to run in the same problems.

esmeralgan wrote:As an attachment the last unsuccessful boot on the AFPS High Sierra VDI.
There's no attachment, but that's OK, there's nothing that I or anyone else could do about a known problem...
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: 25934
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: Uefi shell when loading installed macos High Sierra as raw partition under Ubuntu on macbook pro

Postby esmeralgan » 24. Apr 2018, 01:26

Have you followed the instructions? [HowTo] viewtopic.php?f=22&t=85631?

Yes. Exactly. And it works fine. As it install an HFS High Sierra, because you let the the default unchecked SSD setting. And as reported in your enclosed link http://tobiwashere.de/2017/10/virtualbo ... st-system/ it should fail to boot if it is installed on an AFPS partition... I still wonder how you manage to boot on an AFPS vdi.
I also tested this: from a bootable HFS High Sierra VDI, I use the AFPS converter tool from recovery disk utility, after this High Sierra is no more bootable...
How exactly did you do that? Out of curiosity...

"Downgraded" was maybe inappropriate as it implies that High Sierra configuration is saved, which was not the case.
During option+R startup with startup icons I tried command+option+R+P to reset nvram, but obviously I missed P, as a result internet recovery was launched, which I interrupted with power button, to not have to wait. I think this last action corrupted High Sierra partition. At next startup MacOS icon was missing, but linux and windows were still lauchable (tested). Doing option+r led to internet recovery as recovery was gone. From there installed Yosemite on previous High Sierra partition. I think any action who destroy the High Sierra partition (reformatting from linux etc..) would lead to the same result.
Last edited by esmeralgan on 24. Apr 2018, 17:53, edited 1 time in total.
esmeralgan
 
Posts: 9
Joined: 15. Apr 2018, 22:30

Re: Uefi shell when loading installed macos High Sierra as raw partition under Ubuntu on macbook pro

Postby socratis » 24. Apr 2018, 07:55

I removed your cross-post from the [HowTo] Install OSX 10.13 in a VM thread. According to the forum rules, duplicate posts are not allowed. It's not good etiquette...
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: 25934
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: Uefi shell when loading installed macos High Sierra as raw partition under Ubuntu on macbook pro

Postby socratis » 25. Apr 2018, 00:17

I tried it again, with SSD enabled this time. The short installation in the recovery partition, works. The secondary, main installation on the normal partition, works. But then the EFI cannot parse the boot tree. Again, I don't think that at that point the filesystem is being read, because those paths are fed to the EFI.

What I believe is going on (and this has bitten the EFI incarnation previously) is the way that the candidates are presented. Apple broke it once before, and it is still broken for HFS+ systems with OSX > 10.12.4. You can't have a clean installation of a 10.12.4, even though it's HFS+. So, I don't think it's the filesystem at this point. I'll investigate further...
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: 25934
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


Return to Mac OS X Guests

Who is online

Users browsing this forum: No registered users and 7 guests