mpack wrote:You have to support whatever filesystem is used by the boot partition (which is separate from the OS main partition)
The filesystem is browseable all right, that part is done. The EFI partition in a typical OSX installation (and I think for everything EFI), is a 200 MB, FAT32 partition with the "boot" and "ESP" (EFI System Partition) flags. You can read it and get the "appropriate" boot file. But, as with all things Apple, they had to make it "
different". From the source code (
/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/GenericBdsLib/InternalBdsLib.h):
- Code: Select all Expand viewCollapse view
#if !defined (EFI_REMOVABLE_MEDIA_FILE_NAME)
#if defined (MDE_CPU_EBC)
//
// Uefi specification only defines the default boot file name for IA32, X64
// and IPF processor, so need define boot file name for EBC architecture here.
//
#define EFI_REMOVABLE_MEDIA_FILE_NAME L"\\EFI\\BOOT\\BOOTEBC.EFI"
#else
#error "Can not determine the default boot file name for unknown processor type!"
#endif
#endif
#ifdef VBOX
/**
Apple seems to have a different EFI_REMOVABLE_MEDIA_FILE_NAME value, so it
seems we have to check for both the apple value and for the UEFI value if we
want to support both apple and non-apple systems. (Probably more to this.)
**/
#define VBOX_EFI_APPLE_MEDIA_FILE_NAME L"\\System\\Library\\CoreServices\\boot.efi"
#endif
And then? Where do you boot from? I wish (and so does everybody) that it was as simple. It's so complicated compared to the old BIOS, it's not even a joke. And Apple is not making things easier, being Apple and everything...
For example, as 'Alex_' pointed out, after 10.13, phase 1 of the installation creates the recovery partition and reboots. In theory, you're supposed to boot from the HD (the recovery partition). In practice, it boots from the CD. Even if you remove the CD, you got to manually select the
file to boot from. See
[HowTo] Install OSX 10.13 in a VM, parts 6 and later. Same thing with the updates.
Now, for the 10.14 specifically, Apple has
not changed the standard location of the "boot.efi" from "/System/Library/CoreServices/boot.efi", which has been the case since who knows when.
What
has changed AFAIK, is that Apple doesn't provide the APFS_filesys driver in the EFI partition, hence making it impossible to read the filesystem that you're supposed to boot from.