Thanks, I'm glad you see the situation from a much more reasonable perspective. What I don't like is the way way Foxlet brought this whole thing up, with essentially a long post making false accusations against me, without even so much as a private message to me first, claiming I've done things such as stealing code from his programs, some of which were never even released and I never even had access to. Heck, I didn't even know what he did to get APFS volumes to boot on unsupported Macs before doing hours worth of late-night research about the EFI shell, EFI drivers, and EFI shell scripting. All in all, I'd just like to ensure people in this thread understand that I'm not the type of person to steal somebody's work/code and pass it off as my own. Any program, code, or resource that I did not write or create, but use in my program, is credited to the author in the About window.
[doublepost=1504054286][/doublepost]I've just finished doing some work on the APFS booting method of High Sierra Patcher, and I think I've managed to get the issue of booting with multiple hard disks installed resolved. The changes have been added to the latest version of High Sierra Patcher, which is available
here.
@jhowarth, unfortunately the EFI shell is so limited, that it cannot even read from files into a variable. This prevented me from using a volume's UUID to determine the boot volume, so what I've done instead is placed an empty file, called "apfsboot", in the root of the APFS volume that should be booted. The EFI shell script will look for this file, which, when found, allows it to determine the device to boot from. I'm currently in the process of creating a PreferencePane for System Preferences to allow selection of the desired boot volume, which should help users who have more than one APFS volume with a macOS installation on a single drive. I've almost finished this, so I should be able to get it out in the next day or so.
Actually, I wasn't thinking of reading from the place keeper file on the EFI and / partitions but just have their filenames contain the embedded UUID. This file would be created at the APFS patching level so that shouldn't be an issue. So for my particular hardware configuration....
/dev/disk2 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *250.1 GB disk2
1: EFI EFI 209.7 MB disk2s1
2: Apple_APFS Container disk4 249.8 GB disk2s2
which resulted in a fs# entry of...
fs4 :HardDisk - Alias hd45c0a1 blk4
Acpi(PNP0A03,0)/Pci(1FI2)/Sata(2,0,0)/HD(Part1,Sig3B46F49B-BC50-4B9B-97FF-2A20E6472AF1)
for the EFI, the place keeper filename would be efi-boot-3B46F49B-BC50-4B9B-97FF-2A20E6472AF1 and the startup.nsh would search for it with code like...
for %m run (1 50)
if exist "fs%m:\EFI\efi-boot-3B46F49B-BC50-4B9B-97FF-2A20E6472AF1" then
if exist "fs%m:\EFI\apfs.efi" then
load fs%m:\EFI\apfs.efi
exit
else
if %m == 50 then
echo "apfs.efi file not found, exiting..."
endif
endif
endif
endfor
Likewise for the boot.efi, startup.nsh would use code like...
for %m run (1 50)
if exist "fs%m:\System\Library\CoreServices\system-boot-3B46F49B-BC50-4B9B-97FF-2A20E6472AF1" then
if exist "fs%m:\%apfsBootFile%" then
echo "Starting macOS..."
fs%m:\%macOSBootFile%
exit
else
if %m == 50 then
echo "Boot file not found, exiting..."
endif
endif
endif
endfor
This avoids any need of reading the UUID from files as it is hardcoded into the place keeper filenames themselves.
Of course, when APFS is re-applied, it should first purge any files at the proposed locations with the wildcard \EFI\efi-boot-* and \System\Library\CoreServices\system-boot-* to remove any stale place keepers files that might have been transferred when an existing APFS partition was cloned from one drive to another on an unsupported Mac.