dakanji / RefindPlus

A Boot Manager for Mac and PC
GNU General Public License v3.0
320 stars 68 forks source link

macOS installations do not appear in boot picker #159

Closed drhaynes closed 1 year ago

drhaynes commented 1 year ago

RefindPlus Version

v0.13.3.AD Release

Device Type

Apple Mac

Problem Description

Describe the bug:

I am trying to install RefindPlus and OC in dual mode to boot my existing Mojave system on a MP5,1.

I used MyBootMgr to configure the system (log attached).

RefindPlus seems to not detect my macOS 10.14 installations (I have two, present on two separate disks). I only see the explicitly defined OpenCore options (boot log also attached).

In addition, when choosing one of the OpenCore options, the OC boot loader also fails to detect any macOS installations.

It is worth noting that when booting the Mac and holding option to show the boot menu, both OS installations are present and can be booted into.

Expected behaviour

RefindPlus should show all available macOS installations for booting.

Environment

MyBootMgr 090 (downloaded today, 23 March 2023) Hardware: cMP 5,1; AMD 580 GPU OS: macOS Mojave 10.14.6

I also noticed that my EFI partition's BOOT/drivers/ directory is empty - should this be the case? I noticed there are previous issues where this may have been a cause.

Problem Point

RefindPlus fails to load

Affected Items

Mac OS Loader, OpenCore Loader

Debug Log

DebugLog_ConfigFactory.log 23f23u2535.log

Additional Context

The machine's disk layout is as follows:

Screenshot 2023-03-23 at 19 05 00

In this screenshot, Macintosh HD and Mojave SSD both contain existing (working) Mojave installations.

github-actions[bot] commented 1 year ago

Similar Items

  1. [Score: 76%] ... Mac OS and Windows installations do not appear
  2. [Score: 68%] ... Mac OS installations do not appear
  3. [Score: 53%] ... Boot volumes do not appear
dakanji commented 1 year ago

Sorry ... Somehow missed the notification on this

Problem Point

RefindPlus fails to load

I believe this must be incorrect from what you wrote. that is, RefindPlus does load but only shows one MacOS instance

In any case, the way MyBootMgr sets RefindPlus up in Dual Mode by default is for only the MacOS instance currently running to be displayed and for MacOS to be run using OpenCore. If you want other MacOS instances to show up, then you need to not use the defaults and explicitly select what you want in MyBootMgr.

As for instances not showing up in OpenCore, Can you raise that on the MacRumors MyBootMgr thread?

dakanji commented 1 year ago

Sorry ... Read the issue a bit too hastily on the phone and can see there is indeed an issue on looking again properly.

EFI partition's BOOT/drivers/ directory is empty - should this be the case?

The old issues have been resolved. Drivers are only present if they are needed ... Typically for booting Linux or Windows.

In summary, while RefindPlus can find three APFS containers consistent with your diskutil list output, it is unable to access the contents of those containers.

Your disk setup is a bit unusual for a MacPro (Fusion Drive Present). If OpenCore is unable to detect your drives, then it points to something a bit significant.

Queries: 1 . What is the origin of the Fusion Drive and what is on it?

  1. Is there some sort of encryption in place?
  2. Please share the OpenCore debug log

Thanks

drhaynes commented 1 year ago

Thanks for the response. Replies below

  1. What is the origin of the Fusion Drive and what is on it?

How are you able to tell which drive is a fusion drive? I acquired the machine second hand recently and was not aware that one of the drives is fusion.

  1. Is there some sort of encryption in place?

Yes, both boot drives are FileVault encrypted. This was achieved by using the Dosdude Mojave installer to partition the drives as APFS encrypted before installing. This is to get round the macOS check for MP5,1 which doesn't allow FileVault to be enabled in System Settings on 'unsupported' machines.

I have used this method, along with (a previous version of) MyBootMgr on another MP5,1 a while ago and it detected the OS drives ok in RefindPlus (and OC).

I wonder if there is an issue with my APFS container layout perhaps...?

  1. Please share the OpenCore debug log

opencore-2023-03-23-182607.txt

I have also taken a screenshot of Disk Utility in case it is helpful:

Screenshot 2023-03-25 at 17 23 43

dakanji commented 1 year ago

Hi,

The 1TB HFS WD drive is a fusion drive or more accurately, appears to have been part of a fusion drive setup at some point. Your diskutil list output shows it is anApple CoreStorage format disk. This is not something that ever appears on a MacPro by itself. The disk must have been pulled from an iMac. I suppose it is not critical here but probably should have been reformatted as regular HFS+ before use.

I don't think the process that worked for you before involved APFS Encrypted. Never actually come across it in use but it makes sense that third party tools would not be able to work with it since everything within the Container has been encrypted. Not an issue for Apple Firmware but different story for third party tools such as RefindPlus and OpenCore.

Mojave is supported on MP51 so there should be no need for any gymnastics to implement FileVault (which third party tools can deal with btw).

So I would suggest you find a way to roll back to regular APFS and apply FileVault to that if you want to use third party tools. Alternatively, you can accept that the tools cannot boot those instances and only use such tools for other stuff. As your GPU appears to have been flashed, you should be able to hold the OPT key to get into the native Apple Bootscreen on startup to boot those instances.

Summary is that APFS Encrypted is not suppoted as the encryption makes it impossible to access the container as at how things are at this point.

Ultimately an "invalid" item as not supported I'm afraid. Will have to document this somewhere, somehow.

drhaynes commented 1 year ago

Summary is that APFS Encrypted is not suppoted as the encryption makes it impossible to access the container as at how things are at this point.

Ok, I decrypted the Mojave SSD volume and tried to boot again... and it is still not appearing in the list of bootable installations, in ReFindPlus (nor OC):

Screenshot 2023-03-26 at 13 44 36

Am I missing something?

Logs attached:

23f26n4054.log opencore-2023-03-26-124120.txt

dakanji commented 1 year ago

Odd. Would have bet the farm on it being the APFS encryption.

Try placing the attached apfs driver in the BOOT/drivers folder to see whether it makes a difference. Shouldn't be needed but just to make eliminate that angle. Also, please run system_profiler SPHardwareDataType | grep 'Boot ROM Version' in terminal and share the output.

apfs.zip

startergo commented 1 year ago

This APFS driver in combination with partition disappearance reminds me of the MVC ROM issue Dayo. When I had that issue it will work once only after NVRAM reset (without apfs driver). Try triple NVRAM reset.

dakanji commented 1 year ago

the MVC ROM issue

Yes. MVC flashed GPU seems to be in play. RefindPlus should now be immune to that issue but wanted to confirm, hence the apfs driver.

drhaynes commented 1 year ago

Also, please run system_profiler SPHardwareDataType | grep 'Boot ROM Version' in terminal and share the output.

Boot ROM Version: 144.0.0.0.0

Try placing the attached apfs driver in the BOOT/drivers folder to see whether it makes a difference. Shouldn't be needed but just to make eliminate that angle.

Placing the apfs.efi driver in /BOOT/drivers worked!

I am now able to boot both installations (encrypted and not), as per my other machine.

Incidentally, that other machine has a non-flashed AMD 570 GPU.

Anything else I can do to help debug further?

drhaynes commented 1 year ago

This APFS driver in combination with partition disappearance reminds me of the MVC ROM issue Dayo. When I had that issue it will work once only after NVRAM reset (without apfs driver). Try triple NVRAM reset.

How does one do a 'triple NVRAM reset`? @startergo

drhaynes commented 1 year ago

'Working' boot logs:

opencore-2023-03-26-142635.txt

23f26q2549.log

drhaynes commented 1 year ago

Further to the above, when running VerifyOC.app (after booting through OC_LEG, which I presume is the correct one for Mojave), I get the following:

OpenCore Detected with Notes

1. Not Detected: Lilu
2. Not Detected: WhateverGreen

Not sure if that's directly related or not.

startergo commented 1 year ago

This APFS driver in combination with partition disappearance reminds me of the MVC ROM issue Dayo. When I had that issue it will work once only after NVRAM reset (without apfs driver). Try triple NVRAM reset.

How does one do a 'triple NVRAM reset`? @startergo

Just keep the keys pressed until you hear the chime 3 times.

dakanji commented 1 year ago

There is something messed up on your Mac and the driver is just a patch up for the real issue; which you need to figure out how to eliminate. A Mac should not need loading APFS drivers. Also, both RefindPlus and OpenCore will activate the APFS driver without further intervention (even on a hack) but this does not work in your case for some reason.

In the meantime, drop that apfs driver (Mojave Specific) and try the attached jumpstart driver (for any APFS version) instead. This driver does the same as Refindplus and OpenCore do with APFS ... they mimic the driver.

ApfsJumpStart.zip

How does one do a 'triple NVRAM reset`?

Reboot and immediately hold down the CMD, OPT, P and R keys and keep holding until you hear the chime a fourth time.

startergo commented 1 year ago

A Mac should not need loading APFS drivers

True, but not with the MVC cards.

dakanji commented 1 year ago

As I said though, RefindPlus already takes care of that and should be immune to the MVC issue.

startergo commented 1 year ago

Lets see if there is a difference after NVRAM reset. Just boot to the Apple boot picker and select RefindPlus.

dakanji commented 1 year ago

Not sure if that's directly related or not.

It isn't. You can attach the OC_LEG config plist for a quick look. Might just need to silence those under some circumstances. Unrelated as said though.

drhaynes commented 1 year ago

It isn't. You can attach the OC_LEG config plist for a quick look. Might just need to silence those under some circumstances.

Ok, thanks for confirming. plist below:

config.plist.zip

dakanji commented 1 year ago

Thanks. Please try the jumpstart driver in place of the previous one

drhaynes commented 1 year ago

Thanks. Please try the jumpstart driver in place of the previous one

Gave it a try but no luck I'm afraid. Back to no Mac OS installations showing.

23f26s1751.log opencore-2023-03-26-161407.txt

drhaynes commented 1 year ago

@startergo said:

Lets see if there is a difference after NVRAM reset. Just boot to the Apple boot picker and select RefindPlus.

Tried this as well. Did not resolve the issue.

dakanji commented 1 year ago

OK. More or less as expected since RefindPlus and OpenCore mimic the driver as said.

Also not surprised that resetting NVRAM made no difference as I don't think the issue is related to your GPU. RefindPlus already sorted that problem as mentioned before and in any case, you did mention in passing that you have the same issue with another GPU that has not been flashed.

I believe the issue, and this is just an educated guess, is linked to the APFS encryption that was done. This is despite the subsequent de-encryption. From what I can see from some quick web searches, APFS encryption was particularly problematic in early APFS versions (such as that in Mojave).

My suspicion that that it has left the APFS driver embedded in the container still encrypted and that this is why the jumpstart driver (and RefindPlus/OpenCore that mimic this) cannot load it.

So, we roll back to this being an invalid (Not RefindPlus Related) item again!

My suggestion to you would be to take a back up just in case and re-install Mojave (vanilla) over the existing instances. Might be a good idea to ditch all encryption first. Loading the apfs driver is just sticking a plaster over the real issue FYI.

EDIT: Better to format a disk and install there from scratch so that the container is recreated. Use your existing Mojave to do the formating. Standard APFS of course.

Good luck!

PS: Lilu is not activated on Mojave on MP51 as it is natively supported and WhateverGreen is deactivated when using the Orinoco framebuffer (you selected the option to use alternative framebuffers in MyBootMgr). I think the benefit of the Orinoco framebuffer is limited at best and you might want to skip that option on RX5x0.

drhaynes commented 1 year ago

Thanks for the response and suggestion on Orinoco.

I had a spare AMD 570 lying around, I couldn't resist swapping it with the flashed 580 as a test and... everything works.

No APFS driver needed in BOOT. All boot entries appearing. Booting encrypted Mojave installation drives.

Does this point to a potential issue with the flashed 580 BIOS?

dakanji commented 1 year ago

That does turn it around on its head and suggest the problem is indeed with the MVC flashed GPU. Could well be that what it is doing now in terms of mucking about with APFS is different to what it used to do.

Just running the JumpStart code was previously enough to get things working with such problem GPUs from MVC that messed APFS up (for still unknown reasons) before.

For background, what the JumpStart does is to simply load the driver embedded in the APFS container. This driver is what is current for each MacOS version. Better than loading a fixed one from one specific version as sticking one in the drivers folder does.

Can't think of any reason why a GPU would be messing around with APFS in the first place but the MVC VBios appears to do so. Even more bizarre if it is now messing around with the embedded driver and preventing this from being loaded.

dakanji commented 1 year ago

Can't think of any reason why a GPU would be messing around with APFS

Thinking about this a bit more, I just cannot see any reason why this should be happening and it stinks.

Furthermore, temporarily disabling the embedded driver, AFAICT, requires that an APFS driver clone that does nothing is installed by the GPU so that when a attempt to install the "real" one is made later, it finds itself "already installed" and halts. Quite a lot of effort for no apparent logical reason.

RefindPlus forces things such that any driver in the BOOT/drivers folder is always installed and any previous copy installed is replaced. So that works.

Can you please raise an issue on the OpenCore bugtracker and kindly @ mention me so I can follow? Basically report that using an MVC flashed GPU appears to disable APFS and that EnableJumpStart does not work in such cases?

LINK: https://github.com/acidanthera/bugtracker