How to get a Apple OEM SSD to boot in a normal PC

@Morbius , thank you for the detailed guide,

I read your post carefully and tried your method but unfortunately the result was the same. So I made a request to Ethaniel.

Best regards,
Dmitry


@ducks_utki
I am not sure what "the same" means…
Could you explain exactly what problem you encountered when you tried the method I described in post #38, and which worked for several people ?

@Morbius ,

My post is #803: [Guide] NVMe-boot w/o BIOS modding (Clover-EFI bootloader method) (54)
Problem - there is no Apple NVMe SSD in Clover.

Now I have two Apple NVMe SSD - SM0032L and SM0128L. They behave the same - there is no Apple NVMe SSD in Clover.
I’ve selectively tried Clover versions from 4003 to 5146, and 4961, and I’ve tried a lot of NvmExpressDxe.efi from different sources - everything is the same - there is no Apple NVMe SSD in Clover.
If I boot Clover (versions 4003 to 5146 randomly) using boot6 - I get a black screen. So I boot Clover using boot7.

@Ethaniel identified what the problem was:


Because this is a feature of my motherboard - Fujitsu d2912-a1.
I think that we will bring the solution of this problem to its logical conclusion, and others might find it useful too!

Special thanks to @Ethaniel !

Best regards,
Dmitry

@ducks_utki , I could not find anything wrong other than not working in the log files or on the screenshot.

I created a new NvmExpressDxe_debug.efi that provides a lot of diagnostic output.

Could you please try the following:
Use boot7 from the attached CloverBootloader-5146-skipNVMe.zip: It has no NVMe driver, but BiosBlockIoDxe should not bind the NVMe controller either.
Delete \EFI\CLOVER\drivers\BIOS\NvmExpressDxe_5.efi so that it is not loaded automatically by Clover.
Copy NvmExpressDxe_debug.efi to the drive that you use for the output files.

Could you please provide the output of these:

devtree > devtree_before.txt
load NvmExpressDxe_debug.efi > NvmExpressDxe_debug.txt
devtree > devtree_after.txt

CloverBootloader-5146-skipNVMe.zip (286 KB)

NvmExpressDxe_debug.zip (25 KB)


@ducks_utki
Here again, I’ll ask you to be a little more precise : what do you mean exactly by "there is no Apple NVMe SSD in Clover" ?
In fact, what do you expect to see ?

You do not need to try "a lot of NvmExpressDxe.efi" ! The one which is in the Clover key after you created is enough and it is the right one.
By the way, if you use the CloverISO v.4961 as I suggested, its name is not NvmExpressDxe.efi, but NvmExpressDxe-64.efi.
After, you have created the Clover key, all you have to do is to copy the ‘EFI/CLOVER/drivers-Off/drivers64UFI/NvmExpressDxe-64.efi’ driver to:
• ‘EFI/CLOVER/drivers64’
and to:
• ‘EFI/CLOVER/drivers64UEFI’

If you create your Clover key using CloverISO v.4961 and BDUtility v2.1.2018.023b as I suggested (the only combination which worked for me), you should boot using boot6 by default, you should not change anything, and you should not get a black screen ! If you still get a black screen, there could be something with your system which makes it incompatible with Clover. Perhaps you want to try again…?

I read your post #803 in the other thread, and I am puzzled…
"Windows installer allows me to install Win10 on the NVMe SSD (before the first reboot, then Clover is loaded - and there was no NVMe SSD, and no)."

So, you actually installed Win 10 ! Which means that you succeeded in booting on the Clover key. Or do I get it wrong ?
Remember that you need to install Windows from the Clover key.
If you install Windows on your NVMe SSD by booting from your Windows installation disk, and then reboot from your Clover key, it’s not going to work ! (at least, it has never worked for me that way…)

@Ethaniel ,
I removed …\NvmExpressDxe_5.efi, copied NvmExpressDxe_debug.efi to the drive and booted Clover using your boot7.
I ran the first command - everything is OK.
I ran the second command - computer freezes after load driver. I waited 3 minutes and restarted computer. I saw 2 reports created - devtree_before.txt and NvmExpressDxe_debug.txt. But NvmExpressDxe_debug.txt had a size of 0 kilobytes.
Next, I booted Clover again. I waited 15 minutes - but computer freezes.
Please look at the attachment.

What else can we do? Output a report with a different driver?

Best regards,
Dmitry

for #44.zip (169 KB)

@ducks_utki the BiosBlockIoDxe change worked, the NVMe controller is available now.

Could you please try again with the new NvmExpressDxe_debug2.efi attached to this post. Sorry, the the previous version got corrupted during copying and was not working for me either.

load NvmExpressDxe_debug2.efi > NvmExpressDxe_debug2.txt
map -r


If still freezing could you please run it without redirection and provide a screenshot of the output:
load NvmExpressDxe_debug2.efi

NvmExpressDxe_debug2.zip (26.5 KB)

@Ethaniel ,
All commands are executed, the driver is loaded.
But apparently there is a bug somewhere, and therefore there is no NVMe disk in Clover.
Please look at the attachment.
Best regards,
Dmitry

for #47.zip (433 KB)

@ducks_utki , please try this new version with different diagnostic information:

load NvmExpressDxe_debug3.efi > NvmExpressDxe_debug3.txt

NvmExpressDxe_debug3.zip (26.5 KB)

@Ethaniel ,
Unfortunately, the computer freezes after loading the driver. I waited 3 minutes and restarted my computer. I saw 1 reports created - NvmExpressDxe_debug3.txt, size 0 kilobytes.
Please look at the screenshot.
Best regards,
Dmitry

Computer freezes after load driver_debug3.JPG

@ducks_utki , could you please load it without redirection and provide a screenshot of the output whet it freezes:

load NvmExpressDxe_debug3.efi


Could you also please try NvmExpressDxe_Small.efi from my original post. The modified boot7 might make that work.
devtree > devtree_before.txt
load NvmExpressDxe_Small.efi
devtree > devtree_after.txt


Also attached a new NvmExpressDxe_debug4.efi it is less likely to freeze, but please try the others first.

Instructions are the same, load and capture the output:
load NvmExpressDxe_debug4.efi > NvmExpressDxe_debug4.txt


And if it is freezing, load it without redirection and a provide a screenshot:
load NvmExpressDxe_debug4.efi

NvmExpressDxe_debug4.zip (26.5 KB)

@Ethaniel , SUCCESS!!! We see the NVMe drive!!!

So, in order:
After loading debug3 - freezing - look at the attachment "for #51_load debug3".
After loading Small - SUCCESS!!! - look at the attachment "for #51_load Small". And I was able to boot from NVMe drive and finish installing Windows 10.
After loading debug4 - freezing - look at the attachment "for #51_load debug4".

@Ethaniel , I am very grateful to you, to whom I just did not turn for assistance!

Could you tell me what are the differences between the drivers? Which driver is better to choose?

Best regards,
Dmitry

for #51_load debug3.zip (262 KB)

for #51_load Small.zip (355 KB)

for #51_load debug4.zip (361 KB)

@ducks_utki , great news that it is working now!

Your NVMe controller does not seem to support more than one submission/completion queue pair, but NvmExpressDxe requires support for two queue pairs to function. The second queue pair is used for asynchronous operations, and since I removed asynchronous operation support from NvmExpressDxe_Small to make it smaller, it requires only one queue pair.

NvmExpressDxe_Small has all the functionality that you need to boot an OS, the changes are described in my original post.

@Ethaniel ,

Thank you very much for your work!

Do I understand correctly that your files (boot7 and NvmExpressDxe_Small.efi) will help NVMe-boot using Clover on old motherboards with a problematic BiosBlockIoDxe?
If so, can I ask @Fernando to attach your files in this t2375f50-Guide-NVMe-boot-w-o-BIOS-modding-Clover-EFI-bootloader-method.html?

Best regards,
Dmitry

@ducks_utki
Thanks for your advice.
Unfortunately I have no idea where to attach Ethaniel’s NVMe BIOS files and how to make sure, that the interested Forum visitors/members will find them.
The start post of the related thread and its original guide has been written by Nyctophilia, who hasn’t been online since August 2019. Although I would be able to modify the start post (Nyctophilia’s guide), I don’t want to do it (apart from the replacement of wrong/broken/outdated links).

@ducks_utki , you run into three separate problems:
1) boot6 is not working on your system – We did not even try to identify the root cause of this, but according to @Morbius this is extremely rare.
2) BiosBlockIoDxe is binding to the first storage device and your NVMe drive was the first – because of mother board specifics – preventing the NVMe driver from binding to it – Not sure how usual this is as others don’t usually run into this because not having issues with boot6 that has no BiosBlockIoDxe.
3) Your NVMe drive has support for only one queue pair – In the last several years all motherboards have shipped with the EDK2 NvmExpressDxe that requires two queue pairs, so this probably is not usual either.

As a conclusion I think you run into too many edge cases. While I was happy to help you and I am glad that you now are able to use NVMe on your system, I think that it is highly unlikely for others to run into the same issues. If they run into the same issues, this thread should help them solve the issues, and we can reconsider the likelihood of these issues.

I know this is an old topic, but maybe people like me will find this when googling for a Solution. Here is a straightforward one:

I wanted to reuse existing Apple SSDs as PC drives as well. My drive was a 256GB PCIe drive with Samsung SSUAX Chipset out of a 2014 Macbook pro 15inch. These drives are known to be an apple made version of the Samsung XP941 / 951 running on PCIe 2.0x2 in AHCI mode. They can reach 800-1400mb/s in ideal conditions depending on the flash size (500gb= better) and read/write (write=slower).

I had an M.2 to Apple Gumstick 12+16Pin Adapter laying around and a M2 to PCIe X1 Adapter. Since the Apple SSD is slightly longer than a normal m.2 and the adapter adds another 15mm, i had to make a hole in the PCIe Bracket of the Adapter. I used a roper withney hole punch and added 2 screw holes for a 3d printed a cap that sticks out the back and encloses the SSD and adapter.

I injected the SAMSUNG_M2_DXE into the UEFI of my B85-PLUS motherboard using MMtool following this method: [HOWTO] Get NVMe support on older motherboards! - Guides and Tutorials - Linus Tech Tips

It is now detected in the BIOS and works flawlessly to install windows directly without any further tools like refind, clover or tianocore.
I also added the general NVMExpress DXE module into the BIOS in order to make later Upgrades with more modern NVME drives possible.
As most modded BIOSes, this one takes a long time to POST, roughly 40seconds of splash screen, but then boots as quick as any other SSD.

Because of PCIe x1 sadly the speeds aren’t much better than SATA though, but the point was in recycling an unused drive.