4

Problem: NVMExpress Macs that have Refind do not see the APFS container and I cannot boot into my mac.

Also, apologies to those who were aware of this solution, but I faced this issue along with several other technicians on the problem and we could not solve this until now.

I will be answering my own question below but this post applies to users who are doing the following with their mac:

  • Have disabled SIPS on their device
  • Trying to use refind with Mac OS Mojave
  • Upgrading from High Sierra HFS to Mojave APFS
  • Using refind version 10.4 or 11.4

This post will not apply for macs that do not have:

  • A NVMExpress controller. Examples of Macs that do have it are the Mac Models 18,2, and 18,3.

If you install refind using the unix installer onto an NVMExpress machine, it does not automatically install the appropriate driver folder that will allow you to support APFS, leaving you to assume that refind is buggy. Refind ends up not being able to see the APFS container Preboot or Macintosh HD volumes on the refind menu to boot into your Mac OS Mojave System.

If you tried this on a non NVMExpress machine and had High Sierra APFS, you would only see the Macintosh HD volume, which validates that refind works. This is also true if you had Mojave on a non NVMexpress machine, as refind version 11 would easily pick up on both the Preboot and the Macintosh HD Volumes.

  • So your refind installation is too old? – Thorbjørn Ravn Andersen Feb 28 at 15:47
  • 1
    Are you using encryption? – David Anderson Feb 28 at 15:49
  • @ThorbjørnRavnAndersen No, actually, I could use version 10.4, and install the hfs_x64.efi driver and it will allow refind to see the bootable option. The only difference is that refind will not see the Preboot partition and only the macintosh HD volume. Start from refind v11.1, it was designed to see the preboot partition. – chrisdahfuh Feb 28 at 16:29
  • @DavidAnderson No, there is no encryption. – chrisdahfuh Feb 28 at 16:29
4

Solution:

EDIT: Thank you to @DavidAnderson for pointing out that the driver file "hfs_x64.efi" is what causes the Mac to be able to see the bootable container on the mac. Please see his answer for a better explanation.

The solution is very brief and involves installing the "driver_x64" folder included with the refind download in refind-bin_X/refind/drivers_x64.

Simply drag and drop this "drivers_x64" folder into the EFI/EFI/refind directory after mounting the EFI. Your EFI refind folder should look like this:

enter image description here

Below are some useful commands that helped me.

How to check which mac model I have

You can enter the following in terminal to see your model number:

system_profiler SPHardwareDataType | grep "Model Identifier:"

How to check if my Mac has NVMExpress

Newer macs will most likely have the NVMExpress SSD Controller. But if you are curious in learning what kind of connection you are using, you can input the following commands, separately.

If your device is SATA it will return the info regarding your SATA hard drive and the connection.

If your device is NVMExpress then it will return info regarding your NVMExpress Hard drive and the connection. Of course if your device is not NVMexpress then it will return nothing.

system_profiler SPNVMeDataType
system_profiler SPSerialATADataType

Example:

enter image description here

Please note that the version of Refind will affect which Volumes you would be able to boot up from. I tested this on Refind version 10.4 and 11.4.

From my testing I found that with 10.4 you will only be able to see the "Macintosh HD" volume.

Any version after and including 11.1 are designed to see the Preboot Volume that comes installed with the upgrade to Mac Os Mojave. For more info regarding Refind revisions you can go here:

http://www.rodsbooks.com/refind/revisions.html

I do find it strange that within the driver folder there is no explicit mention of an "apfs.efi" driver. I probably plan to bring this up to the developer. But it still seems to fix this issue. See below for what I mean:

enter image description here

I hope this helps! This was breaking my head for over a week until this simple solution occurred to me. Hopefully it helps you as well.

  • 1
    So basically you are saying that when entering ./refind-install, one should include the --alldrivers option. – David Anderson Feb 27 at 23:04
  • @DavidAnderson, yup! Thanks for pointing that out – chrisdahfuh Feb 28 at 14:11
  • 1
    You should mark your answer as correct. This will help others with a similar problem. – David Anderson Mar 7 at 2:56
3

Normally, rEFInd relies on the Mac firmware to read Apple formatted partitions. Eventually, this software is not sufficient in certain circumstances.

You can include all the drivers provided with rEFInd by adding the --alldrivers option when executing the ./refind-install script. However the refind-install man page states the following with regard to this option.

--alldrivers

When you specify this option, refind-install copies all the driver files for your architecture. You may want to remove unused driver files after you use this option. Note that some computers hang or fail to work with any drivers if you use this option, so use it with caution.

I assume one of the drivers you want to keep would be named hfs_x64.efi. The The rEFInd Boot Manager: Using EFI Drivers webpage states the following about this driver.

  • HFS+—Oracle wrote this driver, apparently with some code taken from open source Apple examples. It was then further modified by the Clover authors. I expect this driver to have limited appeal to most rEFInd users. Macs don't need it, since Apple's EFI implementation provides its own HFS+ driver, and HFS+ isn't normally used on UEFI-based PCs. Some CDs are mastered with both ISO-9660 and HFS+, or even with HFS+ alone, and it's conceivable that an HFS+ driver would be useful when accessing such discs. Also, one unusual feature of this driver is that it can read files from within an Apple LVM setup, which Apple's own EFI HFS+ driver can't do. The upshot of this feature is that if you load this driver on a Mac that uses Apple's LVM, rEFInd is likely to show two OS X boot options. Ordinarily this is pointless, but it could be helpful if your Recovery HD volume becomes damaged. I'm providing the driver mainly because it compiled cleanly with no extra work, aside from providing a Makefile entry for it.

APFS is Apples latest attempt to create a LVM. The above excerpt does confirm that the driver can detect additional boot options when using Apple's LVM.

  • 1
    Thanks for this info as well @DavidAnderson. This definitely sheds light as to why the container was found after the driver was installed. I will test this by leaving the hfs_x64 driver as the only driver and report my findings. EDIT: Just tested this and this is exactly the case. Thanks! I will go ahead and Edit my answer as well. – chrisdahfuh Feb 28 at 16:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .