Page 1 of 1

macOS Mojave 10.14.3 does not boot

PostPosted: 15. Mar 2019, 18:25
by SchroedersKater
VBox.log.zip
(31.09 KiB) Downloaded 34 times
Hi all,

I transfered a macOS Mojave 10.14.3 VM from Parallels 13 to VirtualBox. VB is the latest version 6.0.4 running on an iMac with the same OS.

When I boot the EFI loads an show the message "Press esc in 5 seconds to skip startup.nsh or any other key to continue". There is also a short message appearing that says something like "Boot error" or similar. But that's too short to recognise. I can type exit to enter the BIOS, but I have no idea what to do. Does someone have an idea? BTW, I transferred a Windows 10 VM from Parallels 13 the same way and it's working fine. Trying to install a new Mojave VM results in the same state.

I attach the log file for those who can read it ;-)

Thank you very much!
Thomas

Re: macOS Mojave 10.14.3 does not boot

PostPosted: 15. Mar 2019, 19:29
by andyp73
My guess would be that the .hdd virtual disk image from Parallels uses the APFS file system which the UEFI implementation in VirtualBox can't currently boot from. Booting High Sierra would work if you didn't set the virtual disk image type as SSD as that would still use HFS+ but that is no longer true with Mojave.

-Andy.

Re: macOS Mojave 10.14.3 does not boot

PostPosted: 15. Mar 2019, 19:38
by SchroedersKater
Thanks Andy,

No, it's definitely not APFS.

Re: macOS Mojave 10.14.3 does not boot

PostPosted: 18. Mar 2019, 19:48
by socratis
SchroedersKater wrote:No, it's definitely not APFS.

Yes, it's definitely APFS. And we're both talking about the filesystem of the guest, not the host, right? 10.14 will not install on anything else, no matter what I've tried...

VirtualBox doesn't support 10.14.x yet.

Re: macOS Mojave 10.14.3 does not boot

PostPosted: 18. Mar 2019, 20:19
by SchroedersKater
Well it's not, because I changed it to HFS+ under Parallels.

Anyway, I found this (not working very well) solution:

1. Installed Mojave as described here.
2. Cloned this machine.
3. Replaced the HD with the HD from Parallels.
4. Run the installer from the ISO again.

It takes a while, but I finally got a running system. But this is almost unusable.
- Mouse pointer stucks very often and never moves continuously.
- The guest is pretty slow, even on my iMac with 4 cores, 24 GB RAM and 3.1 GHz.
- It also is not very reliable. After sleeping my iMac or MacBook Pro the VM most of the time does not respond to any mouse or keyboard input.
- Saving the VM state and restarting leads to the same result.
I think I'll stay with Parallels because it's running without any problems, fast and reliable. Even if it costs on 2 machines.

Let me know if you need more information.

Re: macOS Mojave 10.14.3 does not boot

PostPosted: 18. Mar 2019, 20:33
by socratis
SchroedersKater wrote:1. Installed Mojave as described here.
You're using Clover, not the VirtualBox EFI bootloader. You can, but it's not supported. You're on your own...

SchroedersKater wrote:Well it's not, because I changed it to HFS+ under Parallels.
I'm not quite familiar with the process. Does Parallels offer a tool to convert an APFS drive to HFS+?
  1. Why?
  2. What does that do to the OSX installed system...

Re: macOS Mojave 10.14.3 does not boot

PostPosted: 19. Mar 2019, 14:42
by SchroedersKater
1. Because zeroing empty space does not work very well with APFS.

2. No. I used SuperDuper to backup the disk and restored it onto a HFS+ formatted disk. This works very well with CCC, too. BTW, this procedure works with VM as well.

Re: macOS Mojave 10.14.3 does not boot

PostPosted: 19. Mar 2019, 15:56
by socratis
SchroedersKater wrote:1. Because zeroing empty space does not work very well with APFS.
Yeah, I wouldn't be surprised. APFS is quite new and complete feature support by anyone other than Apple, is expected to be at its infancy. ;)

SchroedersKater wrote:and restored it onto a HFS+ formatted disk
That worked? OSX didn't complain? Didn't care? At all??? :shock:

SchroedersKater wrote:BTW, this procedure works with VM as well.
I assume that you mean you went with the CloverEFI and then restored a 10.14 with APFS onto a VDI formatted as HFS. I wonder what would happen if you could replace the CloverEFI then with the VirtualBox one after that...

Re: macOS Mojave 10.14.3 does not boot

PostPosted: 19. Mar 2019, 17:23
by SchroedersKater
I wonder what would happen if you could replace the CloverEFI then with the VirtualBox one after that...

I can try if you are interested, but I don't know how to do it the easiest way. I removed the Clover ISO from the CD drive after finishing all my experiments and it's still working. I did this only for the HFS+ system. Concluding I assume it's working with the VB EFI, but don't know how to find out. On the APFS system it only seems to work if I put the Clover stuff once the HD.

HTH

Re: macOS Mojave 10.14.3 does not boot

PostPosted: 19. Mar 2019, 18:06
by socratis
SchroedersKater wrote:I removed the Clover ISO from the CD drive after finishing all my experiments and it's still working
That should be enough I think. It merely shows once again that it's not the 10.14 part, it's the APFS part in the VirtualBox EFI that's not working for Mojave.

SchroedersKater wrote:Concluding I assume it's working with the VB EFI, but don't know how to find out
Compare the two VBox.logs, I believe it should be easy to detect. If you want, you can upload a complete run from the VM while booting with the Clover one, and one without. ZIPPED please... ;)

Re: macOS Mojave 10.14.3 does not boot

PostPosted: 21. Mar 2019, 10:44
by SchroedersKater
Here are the two logs. I'm excited to see your analysis.

Re: macOS Mojave 10.14.3 does not boot

PostPosted: 21. Mar 2019, 16:30
by socratis
Thank you for the logs! There's nothing exciting really, just a side-by-side comparison of the two logs. The trick is to finding a good text editor to do that. I use TextWrangler (discontinued) and not even the latest version 5.5.2, but the 4.5.12 one. It really helps to isolate the differences visually much better... ;)

Besides the fact that in the APFS one you had a DVD, the interesting part comes in the EFI boot. Both of them use the VirtualBox EFI actually, which makes sense if you think about it. But when the "where do I boot from" time comes in, here's where it gets interesting...

The boot order is different, since the APFS has to boot from the DVD, that's expected. But what I haven't seen before is what Clover does:
00:00:03.741173 EFI: VBoxDbg> loadimage64 '.efi' 0xdbd58000 LB 0x55e0
00:00:03.741518 EFI: VBoxDbg> loadimage64 '.efi' 0xdbd56000 LB 0x1c40
00:00:03.741831 EFI: VBoxDbg> loadimage64 '.efi' 0xdad93000 LB 0x1180
00:00:03.742286 EFI: VBoxDbg> loadimage64 '.efi' 0xdad8b000 LB 0x7380
00:00:03.743808 EFI: VBoxDbg> loadimage64 'apfs.efi.m.efi' 0xdacf8000 LB 0x927e0
00:00:03.874425 EFI: Adding variable 7c436110-ab2a-4bbb-a880-fe41995c9f82::'fakesmc-key-#KEY-ui32' fAttrib=0x7 cbValue=0x4
00:00:03.875102 EFI: Adding variable 7c436110-ab2a-4bbb-a880-fe41995c9f82::'fakesmc-key-$Adr-ui32' fAttrib=0x7 cbValue=0x4
00:00:03.875698 EFI: Adding variable 7c436110-ab2a-4bbb-a880-fe41995c9f82::'fakesmc-key-$Num-ui8' fAttrib=0x7 cbValue=0x1
00:00:03.876313 EFI: Adding variable 7c436110-ab2a-4bbb-a880-fe41995c9f82::'fakesmc-key-RMde-char' fAttrib=0x7 cbValue=0x1

The two key things that I see in there are:
  1. CloverEFI jumps from reading the base EFI loader, to their reverse-engineered APFS reader.
  2. CloverEFI inserts the FakeSMC keys required to emulate a Mac.
Impressive! 8)