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

@ducks_utki
Which “Clover Method” did you use? Maybe you have done something wrong.
>Here< is a good guide.

Dear Fernando,
Your guide [Guide] NVMe-boot w/o BIOS modding (Clover-EFI bootloader method) is the best! I have read this guide completely!
My post in this guide is #803: [Guide] NVMe-boot w/o BIOS modding (Clover-EFI bootloader method) (54).
I think the problem is with the SSD themselves. Really nobody had problems with these Apple NVMe SSD with SSPolaris or SSPhoton controller to boot in a normal PC?

@ducks_utki , based on the description it is possible that your UEFI environment is able to access your NVMe device, just there are no partitions available or there is no partition with a supported file system format available.

Could you please provide the output of these command from an UEFI Shell:
map
drivers
devtree

If you have a writable FAT32 drive available, you can save the output to files in UEFI Shell:
map > map.txt
drivers > drivers.txt
devtree > devtree.txt

If you don’t have an UEFI Shell available or if it is not recent enough, you can download a recent release (non-debug) version from https://github.com/pbatard/UEFI-Shell/releases

@Ethaniel , thank you very much for your reply!

I am using Clover EFI bootloader. I ran all the commands (map, drivers and devtree) but couldn’t save the .txt files map.txt, drivers.txt and devtree.txt. But all this information is in preboot.log. Please see this file.

Additionally, I would like to say that Apple NVMe SSD is visible in Device Manager and in Disk Management, partition table - GPT, efi section - exists. Windows installer allows me to install Win10 on the NVMe SSD (before the first reboot, then Clover is loaded - and it is not visible again).

Best regards, Dmitry

preboot.zip (5.59 KB)

Disk Management.zip (41.2 KB)

@ducks_utki , Clover seems to be changing a lot of things, so please boot directly into UEFI Shell from https://github.com/pbatard/UEFI-Shell/releases instead of loading Clover. https://rufus.ie/ can be used to create a bootable USD drive with UEFI Shell for the same images.

preboot.log does not contain almost anything that is displayed by the requested commands and I need to see the output of those to understand what is happening.

Disk Management.png has two disks, and only disk 2 with drive D: has an EFI system partition. Can you confirm that your Apple NVMe device is disk 2 on the screenshot? (Note that I don’t speak the language of the screenshot, just trying to make sense of the few things I understand.)

Drive F: (BDU) could be used to storing the output of the UEFI Shell commands as that is FAT32. Once in the UEFI Shell map should show you the drive names. (fs0:, fs1:, etc.) Alternatively you can try finding it by contents:

1
2
3
4
5
6
7
 
fs0:
ls
fs1:
ls
fs2:
ls
...
 


Once you find the FAT32 drive, could you please execute these (updated map to be more verbose):
1
2
3
 
map -v > map.txt
drivers > drivers.txt
devtree > devtree.txt
 


After that please also load NvmExpressDxe_5.efi from my original post (should be easy if you can copy it to the same FAT32 drive where the txt files will go):
1
 
load NvmExpressDxe_5.efi
 


Then could you please run the same commands again (with different file names):
1
2
3
 
map -v > map_nvme.txt
drivers > drivers_nvme.txt
devtree > devtree_nvme.txt
 

@Ethaniel , thank you, now I will deal with UEFI Shell and RUFUS. Unfortunately, it’s not fast.

I confirm that Apple NVMe device is disk 2 on the screenshot. It is SM0128L - 128GB:
https://beetstech.com/product/imac-27-in…b-ssd-661-07312

Please look at the screenshot of Device Manager.

Best regards, Dmitry

Device Manager.zip (58.2 KB)

@Ethaniel , I created a bootable USB drive with UEFI Shell using RUFUS. But I got a black screen saying “An operating system wasn’t found. Try disconnecting any drives that don’t contain an operating system. Press any key to restart”.

My motherboard is old - Fujitsu d2912-a1, Legacy BIOS.
But Clover loads UEFI Shell and I can run these commands - map, drivers and devtree, and I can see the output on the screen. But I can’t output them to a .txt file…

I succeeded! Please see attachment.

Best regards,
Dmitry

.txt.zip (343 KB)

@ducks_utki , thank you for the details and for being able to capture the output. Sorry, I did not realize previously that this is a legacy BIOS system. Have you tried other methods of making it work? For example using DUET?

Could you please provide a link for the guide for installing Clover on a legacy BIOS system, I would like to try it in a virtual machine.

Since the system has no UEFI firmware, there is no need for a bootable UEFI Shell, you can continue using the one that Clover has built in.

I think that a lot of noise is because of BiosBlockIoDxe. Please try unloading it before loading the NVMe driver. This should not disconnect access to the USB drive, but if it disappears you can just reboot the system to start over.

Look for the handle of BiosBlockIoDxe (was 4C in the attached output, but might change on each boot):

drivers


Unload BiosBlockIoDxe using the correct handle (4C in the example):
unload 4C


Load NVMe driver
load NvmExpressDxe_5.efi


If successful, could you please capture the output of all of these:
map -v > map.txt
drivers > drivers.txt
devtree > devtree.txt
devices > devices.txt
dh > dh.txt
pci > pci.txt


If the USB drive disappears, you can try loading the driver first, but then devices need to be connected manually and you might not be able to save the output either:
load NvmExpressDxe_5.efi
unload 4C
connect -r


In case you cannot make the USB drive work, could you please provide the output of just the new commands after the a clean reboot:
devices > devices.txt
dh > dh.txt
pci > pci.txt


Could you also please provide the output of lspci from Linux on the same machine. Ubuntu .iso can be made to a bootable USB using Rufus for example.
sudo su
lspci


Linux has support for a lot of hardware and file systems, so should be possible to save the output, but a screenshot is fine too. This could help making sure the Clover is seeing the same hardware as Linux does.

@Ethaniel , thank you!
I used [Guide] NVMe-boot for systems with legacy BIOS and UEFI board (DUET-REFIND) but the result is the same.

I use Clover according to this guide: [Guide] NVMe-boot w/o BIOS modding (Clover-EFI bootloader method)
BDUtility - https://taimienphi.vn/download-bootdisk-…-39017#showlink
I’ve selectively tried Clover versions from 4003 to 5141, and I’ve tried a lot of NvmExpressDxe.efi from different sources - everything is the same.
Clover is loaded only through boot7 (otherwise I get a black screen) - I rename the “boot” file to “boot_” and then I rename “boot7” to “boot”.

Next, as you said, I will try to upload the BiosBlockIoDxe.

Best regards,
Dmitry

@Ethaniel , it didn’t work, unfortunately…

“Result Unsupported” - please look at the screenshot.
What could be wrong?

Best regards,
Dmitry

Result Unsupported.jpeg

@ducks_utki , as I understand Clover’s main purpose is enabling “Hackintosh”, so it does a lot of unusual things. On the other hand UEFI does not have to reside in the firmware so it should still work.

Could you please provide the output of the three new UEFI Shell commands from my last post and lspci from Linux so that I can have a better understanding of how much Clover is distorting reality.

In the mean time I’ll try to set up a virtual Clover environment based on your instructions.

@Ethaniel ,
I got the output of 6 commands - please see attachment.
Next, as you said, I’ll try Linux.
But I’ve never done it, so it won’t be fast.
Best regards,
Dmitry

.txt for #31.zip (12.2 KB)

@ducks_utki , could you please try manually connecting the NVMe device to the NVMe driver.

First try this:

connect -r
map -r


If the NVMe device is not showing up in the output of map, please proceed with the next steps:

Find the handle for device “PciRoot(0x1)/Pci(0x0,0x0)” in the output of “devices”. This was the line in your last attachment (handle might change on reboot):
  F0 D - -  1  0   0 PciRoot(0x1)/Pci(0x0,0x0)


Find the handle for the “NVM Express Driver” in the output of “drivers”. This was the line in your last attachment (handle might change on reboot):
102 00000010 ? - -  -  - NVM Express Driver                  \EFI\CLOVER\drivers\BIOS\NvmExpressDxe_5.efi


Note: Both the device and the driver should be near the end of the output, but you can change to paged output if you want to read the entire output:
devices -b
drivers -b


Connect the device to the driver using the handles found above (and connect the sub items, map -r is assigning fsX: numbers too):
connect F0 102
connect -r
map -r


If the NVMe device is still not showing up in the output of map, could you please provide me a screenshot of the last connect commands so that I can see if anything failed and the output of “devices” and “drivers” without a reboot so that I can see if anything was changed by the above commands.

Could you please also try Clover 5146 using BDU v2.1.2020.028b from http://cvad-mac.narod.ru/index/bootdiskutility_exe/0-5

@Ethaniel ,
I’ve selectively tried Clover versions from 4003 to 5146, and now I am using Clover version 5146 - everything is the same.

After connect -r and map -r: the NVMe device is not showing up in the output of map.
After connect F0 102 and connect -r: please look at the screenshot in attachment.
After map -r, devices and drivers: please look at the .txt in attachment.

Best regards,
Dmitry

for #33.zip (153 KB)

@ducks_utki , could you please try getting the output of these from Linux:

lspci -PP
lspci -t


Some useful guides:
https://ubuntu.com/tutorials/create-a-usb-stick-on-windows
https://ubuntu.com/tutorials/try-ubuntu-before-you-install
https://www.howtogeek.com/686955/how-to-…n-ubuntu-linux/

@Ethaniel , thank you very much for your links!
I boot from the USB stick and select "Try Ubuntu" before installing.
Please see attachment.
If I install Ubuntu, the Ubuntu installer sees the Apple NVMe SSD!
Best regards,
Dmitry

After lspci -PP and lspci -t.JPG

Ubuntu installer sees Apple NVMe SSD.JPG

After sudo su and lspci.JPG

@ducks_utki , I think that the problem is that all your disk drives are attached to the NVMe controller, probably by BiosBlockIoDxe. This is different from the hardware layout and is just the internal UEFI representation, but prevents the NVMe driver from attaching as it sees the device already having a driver. Note that in the previous attempt I choose the wrong device, but lspci shows that PcieRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0) is the NVMe controller.

Could you please try disconnecting it and then connecting it to the NVMe driver. Note that this should result in you losing access to both the USB and the SATA drive until you reboot, so only screenshot will be available. This time please don’t change to fs0: either just stay on the default path to avoid using the disk drives.

Find the handle for device “PcieRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)” near the top of the output of “devices -b”. This was the line in your last attachment (handle might change on reboot):

5A B - -  1  1 128 PcieRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)


Find the handle for the “NVM Express Driver” in the output of “drivers”. This was the line in your last attachment (handle might change on reboot):
102 00000010 ? - -  -  - NVM Express Driver                  \EFI\CLOVER\drivers\BIOS\NvmExpressDxe_5.efi


Connect the device to the driver using the handles found above:
disconnect 5A
connect 5A 102
connect -r
map -r


The difference between boot6 and boot7 seems to be that boot6 is using UEFI drivers for hardware access while boot7 is using BIOS interrupts for hardware access. boot6 should not have this issue as it does not have BiosBlockIoDxe. Could you please try boot6 again with Clover 5146 and describe what the problem is with boot6. Are you able to load the UEFI Shell using boot6? If the problem only is access to disks, cloud you please provide screenshots for drivers, devices and devtree.

@ducks_utki
I’ve read your posts in this thread, and it seems to me that you are turning in circles. If I correctly understand, you are trying to install Windows 10 (and/or Ubuntu) to boot on a NVMe SSD set on a legacy platform.

Clover works very well. I have recently succeeded in installing several OSs (including Win 10 and Win 11) on a 2009 non UEFI legacy system, as I explained here.

The guide which was mentioned to you in this thread is excellent, except that it was written some time ago, and that some things have changed. In particular, the most recent versions of BootDisk Utility pointed in this guide do not allow to select the old versions of Clover, which seem to work better especially for those who, like us, have an older platform.

I believe that, if you wish to follow the following guidelines, you will succeed in installing Windows 10 (or another OS) and boot from your NVMe SSD in less than 2 hours. You will not need to do any tweaking or use any shell. It will just work immediately.

In the same thread, another user has recently reported success in installing Ubuntu Server on a legacy (~2009) non-UEFI platform using those guidelines.

1. First, it is advisable that you delete any system partition you might have created on your NVMe SSD earlier.

2. Then, create a new Clover USB drive following the instructions in this post, and using the 2 files (BDUtility.exe v2.1.2018.023b and CloverISO-4961.tar.lzma) attached to the post (and nothing else !)

3. Boot from the newly created Clover key, and insert your Windows (or other OS) installation disk.
A new icon should appear on the Clover menu. If you are trying to install Windows, do not select this icon !
Instead, navigate to : Exit Clover → Boot Maintenance Manager → Boot from file → Windows 10 USB drive → <efi> → <boot> → bootx64.efi
The Windows installation process should start.
Through this process, your system should restart several times. Every time your system restarts, you should select the ‘Boot Microsoft EFI Boot from EFI’ icon from the Clover menu.

If you create your Windows installation flash drive from an image file, it is highly advisable to use the Rufus utility.
If you create a Linux installation flash drive from an image file, I would recommend using the Balena Etcher utility, which seems to give better results.

@ducks_utki , I was able to reproduce the issue using QEMU, the problem is that BiosBlockIoDxe is binding to the first storage device. If there is no BIOS support for that device, then other UEFI drivers are not able to bind to that later unless it is manually disconnected. See the relevant source code for more details.

I was able to compile Clover boot loaders with NvmExpressDxe included and loaded before BiosBlockIoDxe that results in BiosBlockIoDxe binding to the next storage device and avoids the issue. In addition it requires no extra NVMe driver load. Please see the attached CloverBootloader-5146-NVMe.zip. Note that this should not be used with other Clover versions.

@Morbius , thank you for the detailed guide and instructions those are very helpful and better than what I could find before. I’ve tried Clover 4961 and that has the same BiosBlockIoDxe problem, so would not help unless boot6 works on the problematic computer.

boot6 does not have a BiosBlockIoDxe driver so is not affected by the issue but I included a version with NvmExpressDxe in case anyone needs it.

CloverBootloader-5146-NVMe.zip (633 KB)

@Ethaniel , thank you very much for your assistance!

If I boot Clover (versions 4003 to 5146 randomly) using boot6 - I get a black screen. So I boot Clover using boot7.

I found a handle for the device - 5A.
I found a handle for the driver - 102.
I ran the commands: disconnect 5A, connect 5A 102, connect -r, map -r, and than exit - please look at the screenshot.

I then took your boot7 from your attachment and loaded Clover_5146 using it. Unfortunately, the NVMe SSD did not appear. Please look at the attachment “for #39”.
I noticed that the handle for the device and the handle for the driver have changed.

Maybe I’m wrong somewhere?

Best regards,
Dmitry

for #39.zip (10.2 KB)

After disconnect and connect.JPG