[Guide] NVMe-boot for systems with legacy BIOS and UEFI board (DUET-REFIND)

@vasyosuol_24

Since the DBR seems correct I’m assuming it’s an issue with the board and the way this DUET version work.

Look, this will somehow help you determine if the MBR is correct for the booting sequence of DUET, nothing else.
Download HxD and locate the EXTRA TAB select OPEN DISK.
On the new form select the “Physical Disk” should be under “Logical Disk”.
With only the DUET USB as removable attached select the “REMOVABLE DISK 1” and click OK with the READ ONLY option checked.
Now select the 0 - 1FF block and copy that 512 BYTE portion on a new file.
That portion is the actual MBR of the USB, the other (DBR) is on the removable “Logical Disk” and it’s partially tied with the error somehow you described.

1
2
3
4
 

M.B.R. .S.t.a.r.t.!
B.S.t.a.r.t.
 
 


If your board read "BStartart!" and die, that's the problem. 0 Space/Align = memory lock.

Hi!

I would one more time to thank all helpful people here, especially @noInk for step by step instruction and help, Lost_N_BIOS for advices, SkOrPn, and Fernando.
It wasn’t easy, and it take me longer than I would like, but my new NVMe drive works without a problem on Gigabyte Technology Co. Ltd. Z68P-DS3 (Socket 1155) with sandy bridge CPU using duet/refind method provided here.
This motherboard is launching quite long (memory tests, after this - AHCI etc - and thats on fast boot) so additional 2-3 seconds for duet are really not a problem.
I would like to add, that computer I use had last clean install around windows 8. After this It just adding new versions and patches. I don’t like t to do this, and do this very seldom - and I think majority of people here not doing it for living so -
My biggest problem was my ignorance on this topic and not STICKING PRECISELY TO THE INSTRUCTION.

I used step by step solution provided by noInk. I downloaded and used "Build 2020"

What problems I had and what helped:

- USBsetup.exe didn’t saw my USB drives.
It took me most of my time, and I tried to do this using command line as in youtube tutorials made by SkOrPn. If it is like this, find another computer and make start diske here.
It was probably bug in windows (after reinstall my windows 10 recognise USB keys as removable, so it wasn’t hardware problem)

USBSetup.png





- My DUET/REFIND disk was stucking with red Rerror! message
I just added additional file provided somewhere in this thread by noINK, and it finally went to menu.

DUET/REFIND didnt saw my existing WIN 10 but I’m sure there is remedy for this, but I didn’t search for it. I’m sure its because it was working in Legacy mode
I made new windows instal USB using Rufus ON DIFFERENT USB. (no problem here)

I tried GPT AND MBR but windows instaler always refused to install on new disk

WIn10Install.jpg




- I finally opened case and disabled all additional disks
- NVME should be GPT, but installer still say that he could not use this partition or create new one. But when It was only one disk, I was able to delete this partition and make new one from the same menu (I highlited where is this function - here it is disabled - maybe because of MBR disk or maybe because of other disk IDK)

Windows 10 Installing procedure wasn’t exactly painless.

-When instaler restarts 1st time - youll need to remove USB with windows install.

- I had one full stop (black screen and nothing for long time) during install. I just restarted computer and installation was proceeding as nothing happens.

That’s all folks. Sorry it is in so weak english and not very precise, but frankly I’m quite exhausted and I’m not really good with hardware and its nomenclature (and motherboard naming its a hell ;))
I hope my observations will help someone, like this thread and nice helpful people here helped me. I hope world will thank you in some way too :).

@vasyosuol_24

I’ve sort of dirty quick fixed the GenBootSector utility again. Data sector division has been set static to FAT32 cluster count value.
If you re-download and unpack within the DUET_EDK2015_REFIND directory this archive the following command from an Admin command prompt should now work correctly on any updated windows version with unavailable FAT16 (or less) support.

1
2
3
 

ReadBoot Drive_Letter: SECTOR
 
 


Locate the new DBR and MBR files and attach\post or PM the files.


(20-06-2020)
UTILITY: Adjusted the cluster count to FAT32 value.


Yes, it worked. Now the file MBR.bin is created not of zero length. I posted a new archive here:
https://www.upload.ee/files/11902320/mbr_dbr.rar.html
Otherwise, the boot flash behavior with DUET_REFIND (EDK2015 new) is exactly the same as before.

@vasyosuol_24

The behavior doesn’t change because it was already an requirement for the USB to be FAT32.
Both DBR and MBR are correct, unfortunately like I wrote it’s a board BIOS implementation issue with the way the memory hold together.
Unless the bypass to the issue is proposed and documented enough to be quickly implemented I’m not going to look at it.
GIGABYTE (PHOENIX|AWARD) with source code and tool availability decided to make an entirely separate build.
You need to find an alternative, or propose the workaround.

noInk
That is, as I understand it, with DUET-REFIND I have no way?
This is not such behavior on the only board - I have at least 4 of them

@vasyosuol_24

The only option I can quickly give is to look for the NVME option ROM to determine the outcome.

noInk
Understood thanks. Apparently not fate. Thank you for your help and time spent.

@noink


i got it finally. Thanks for your patience.

Now i am able to reproduce the error.

It is the "EuP Ready" must be "Disabled" and VT-d musst be disabled too.

The big problem was if i changed the VT-d and press F10 nothing changed the same long load time and windows got stucked. I had to change the value save and unplug the main power cable and boot again. Holy sh**!

Now i have 17 sec. I came form 60 sec.


without DUET it is:

The orginal SMBIOS is all ready 2.5.

with DUET 2015 it is 2.5

with the older 2015 version from march it is 3.0


Are the improvements in the versions not usefull ?



I read something on post #620

VT is not required to be disabled ( disabling or enabling certain bios setting, unless prepared before may require a full OS install).

but then someone wrote in post #749



So what is true now ?
I installed a fresh windows 10 without duet on a normal ssd with 1909 build (18363) and windows was able to boot :smiley:

@mujuli

Larger table require actual data to to fulfill the query. There no macro filler implemented on DUET to fulfill the missing entry\data size.
The 2.5 version as been selected for compatibility purpose.
A board with larger table will be either reduced to 2.5 or uses it’s own higher version.

About VT: both are true it depend by the CPU/CHIPSET/BIOS/OS and how the specification get implemented and exposed.


If your board expose the VT (x)-(D) feature try to set those IOV feature individually.
On mine DX58SO2 I’m using these setting:
Interrupt Remapping ENABLED
FLR Capability DISABLED
ALS DISABLED

Find also the EXECUTE DISABLE BIT and set it to ENABLE


Good you found the related option, some register require a full power cut to wear down but I don’t understand the use-case and the working scenario as your expectation.
Your board might have inverted meaning on it’s settings. BIOS setting will control the BOARD behavior. Check on the manual the meaning of the option.

Does anybody did this on a ga-970-ds3p fx rev. 2.1?
Trying for two days and nothing…

@ijokerboy

If the board is UEFI compatible use the REFIND option ( mass-storage without DUET ) to load the NVME driver.


Booting the NVME drive from UEFI capable board - REFIND mass-storage without DUET - with USBSetup:


1) Connect a USB flash drive and start the USBSetup application

2) Select the USB flash drive letter from the drop-down combo box

    Warning.
    The following step will completely remove all information and partitions on the selected USB flash drive

3) Remove all information and partitions from the drive by clicking on: CLEAN

4) format the selected drive by clicking on: FORMAT

5) Copy the graphical boot manager REFIND by clicking on: REFIND

6) Connect the USB on the target system and set Boot from USB as the first option in your system BIOS Boot order




Eventually if REFIND is not required you can set it on -1 with it’s timout option or also check how the NSH work and adapt it to load just the EFI driver directly from an available shell.

change

1
2
3
4
5
6
7
8
9
10
11
12
13
 

# LOAD EFI RAID SATA DRIVER IF FOUND ON FS0 (DUET)
for %x run (0 0)
if exist fs%x:\EFI\Raid\RaidDriver.efi then
echo "LOADING fs%x:\EFI\Raid\RaidDriver.efi"
load fs%x:\EFI\Raid\RaidDriver.efi
echo "RELOADING FILESYSTEMS"
map -r > NUL
else
# echo "FS%x: RAID DRIVER NOT FOUND"
endif
endfor
 
 


to

1
2
3
4
5
6
7
8
9
10
11
12
13
 

# LOAD EFI NVME DRIVER IF FOUND ON FS0 (USB)
for %x run (0 0)
if exist fs%x:\EFI\Boot\drivers\NvmExpressDxe.efi then
echo "LOADING fs%x:\EFI\Boot\drivers\NvmExpressDxe.efi"
load fs%x:\EFI\Boot\drivers\NvmExpressDxe.efi
echo "RELOADING FILESYSTEMS"
map -r > NUL
else
# echo "FS%x: NVME DRIVER NOT FOUND"
endif
endfor
 
 
Zitat von noInk im Beitrag #812
@ijokerboy

If the board is UEFI compatible use the REFIND option ( mass-storage without DUET ) to load the NVME driver.


Booting the NVME drive from UEFI capable board - REFIND mass-storage without DUET - with USBSetup:


1) Connect a USB flash drive and start the USBSetup application

2) Select the USB flash drive letter from the drop-down combo box

    Warning.
    The following step will completely remove all information and partitions on the selected USB flash drive

3) Remove all information and partitions from the drive by clicking on: CLEAN

4) format the selected drive by clicking on: FORMAT

5) Copy the graphical boot manager REFIND by clicking on: REFIND

6) Connect the USB on the target system and set Boot from USB as the first option in your system BIOS Boot order




Eventually if REFIND is not required you can set it on -1 with it's timout option or also check how the NSH work and adapt it to load just the EFI driver directly from an available shell.

change

1
2
3
4
5
6
7
8
9
10
11
12
13
 

# LOAD EFI RAID SATA DRIVER IF FOUND ON FS0 (DUET)
for %x run (0 0)
if exist fs%x:\EFI\Raid\RaidDriver.efi then
echo "LOADING fs%x:\EFI\Raid\RaidDriver.efi"
load fs%x:\EFI\Raid\RaidDriver.efi
echo "RELOADING FILESYSTEMS"
map -r > NUL
else
# echo "FS%x: RAID DRIVER NOT FOUND"
endif
endfor
 
 


to

1
2
3
4
5
6
7
8
9
10
11
12
13
 

# LOAD EFI NVME DRIVER IF FOUND ON FS0 (USB)
for %x run (0 0)
if exist fs%x:\EFI\Boot\drivers\NvmExpressDxe.efi then
echo "LOADING fs%x:\EFI\Boot\drivers\NvmExpressDxe.efi"
load fs%x:\EFI\Boot\drivers\NvmExpressDxe.efi
echo "RELOADING FILESYSTEMS"
map -r > NUL
else
# echo "FS%x: NVME DRIVER NOT FOUND"
endif
endfor
 
 






it does boot to the installer, i can see the nvme ssd. I can install it but now still cant boot into the nvme. I can only install windows 10 on it but i cant boot the drive itself...

@ijokerboy


The OS must be booted from|with the REFIND mass-storage (without DUET) USB attached.
You need to make within the BIOS the USB BOOT (REFIND mass-storage without DUET) option the default boot option.

@noInk

I did that. When it boots to the USB stick no drive appears…

@ijokerboy

X64 OS GPT partitioned drive is required.
If you are using the REFIND mass-storage without DUET option double check the presence of an NvmExpressDxe.efi within the [USB]:\EFI\Boot\drivers<br />There should just be NvmExpressDxe with the directory.
If the installation ended correctly RESET the BIOS to default or clear the NVRAM if an option is available.
Once in REFIND try to HIT the ESC or F2 keyboard button.
If the keyboard doesn’t work place the Ps2KeyboardDxe.efi too within the [USB]:\EFI\Boot\drivers<br />


If nothing:
Disable secure boot - remove actual key.
Re-do the installation making sure only the NVME is attached during the installation process (detach other SATA port\drive but leave the USB with REFIND mass-storage without DUET attached )
Certain board require to remove the OS installer USB before the first reboot.

select the shell option in REFIND and let it run the startup.nsh
or
check manually the location and presence of the OS boot file usually located in FS1:\EFI\Boot\


take a screen of the INFO page (F10) and from the shell type;

1
2
3
4
5
6
7
8
 

FS0:
dmem > dmem.txt
memmap > memmap.txt
smbiosview > smbiosview.txt
map > map.txt
reset

 


and post a zip with the screen (screenshot folder) and the text result found on the USB root directory.

Ok, so before i read your answer i went i gave a few more attempts. Turns out that on legacy he can see the nvme driver everytime. I can even try to boot from it. But now the problem is when i try to boot windows from thenvme i get errors like “the operating system couldn’t be loaded system driver is missing…”

@ijokerboy

If the board is set to UEFI
mode use the REFIND option ( mass-storage without DUET ) to load the NVME driver.


Booting the NVME drive from UEFI capable board - REFIND mass-storage without DUET - with USBSetup:


1) Connect a USB flash drive and start the USBSetup application

2) Select the USB flash drive letter from the drop-down combo box

    Warning.
    The following step will completely remove all information and partitions on the selected USB flash drive

3) Remove all information and partitions from the drive by clicking on: CLEAN

4) format the selected drive by clicking on: FORMAT

5) Copy the graphical boot manager REFIND by clicking on: REFIND

6) Connect the USB on the target system and set Boot from USB as the first option in your system BIOS Boot order



REFIND will rely on the UEFI boot operation present within your BIOS to boot your OS.
The OS must be installed with GPT support.




If the board is set to LEGACY mode use the DUET-REFIND option ( non-UEFI legacy board - DUET with optional REFIND )
To use DUET the board must be compatible with this version and the OS must be installed with GPT support.

Booting the NVME drive from non-UEFI legacy board - DUET with optional REFIND - with USBSetup:


1) Connect a USB flash drive and start the USBSetup application

2) Select the USB flash drive letter from the drop-down combo box

    Warning.
    The following step will completely remove all information and partitions on the selected USB flash drive

3) Remove all information and partitions from the drive by clicking on: CLEAN

4) Format the selected drive by clicking on: FORMAT

5) Make the selected drive bootable by clicking on: BOOT

6) Copy the required DUET files by clicking on: DUET

7) Copy the optional graphical boot manager REFIND by clicking on: REFIND

8) Connect the USB on the target system and set Boot from USB as the first option in your system BIOS Boot order








How to CLEAN install WINDOWS 10

• Download the windows 10 media creation tool and make the WIN10 ESD-USB directly from the media creation tool.
• Boot the PC with the DUET USB connected and wait for it to reach the graphical boot manager.
• Connect the WINDOWS 10 ESD-USB and refresh the visual representation list by hitting the ESC keyboard KEY to make the “Boot Fallbcak boot loader from ESD-USB” option appear.
• Launch the EFI WINDOWS 10 installer from the WINDOWS 10 ESD-USB by selecting the “Boot Fallbcak boot loader from ESD-USB”.
• Select CUSTOM: Install Windows only (advanced) on the next screen delete all the partition till the NVME drive show as “Drive 0 Unallocated Space” and select NEXT, YES, NEXT.
• Once the Windows Setup screen end copying and installing Windows disconnect the WINDOWS 10 ESD-USB before it self-reboot. On some legacy board this is required.



ERROR HANDLING


If the NVME become un-bootable it mean the PC is not booting from the DUET USB.
If the NVME doesn’t appear as selectable disk there could either be an broken\hidden hybrid partition or hardware issue locking the EFI installer read access, on WINDOWS 7 a driver must be provided.


To delete an hidden partition and rebuild the disk layout use the DISKPART CLEAN parameter from a command prompt, recovery environment or by when in another WINDOWS OS connected as non-bootable storage.

• With only the NVME inserted.
• Boot the PC with the DUET USB connected and wait for it to reach the graphical boot manager.
• Connect the WINDOWS 10 ESD-USB and refresh the visual representation list by hitting the ESC keyboard KEY to make the “Boot Fallback boot loader from ESD-USB” option appear.
• Launch the EFI WINDOWS 10 installer from the WINDOWS 10 ESD-USB by selecting the “Boot Fallback boot loader from ESD-USB”.
• Instead of “Install now” select “Repair your computer” > Troubleshoot > Command Prompt
• In the “Command Prompt” type;

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
 

DISKPART
 
LIST DISK
 
SELECT DISK <DISKNUMBER> (should be 0 without <> if no other DISK are connected )
 
CLEAN
 
EXIT
 
EXIT
 

 

 

• Select "Turn off your PC" and detach the WINDOWS 10 ESD-USB.
• See How to CLEAN install WINDOWS 10 again from the start.

@noInk

At the moment i had some time an made some improvements

I updated the USB 3.0 firmware like you showed how to.

Then i made a modded bios. (thanks to Fernado for providing the roms)
with MMtool V3.22

I used for the start a modded bios with the microcode patch:
CPU Microcode Updated to latest [106A4 Revision 13 (2015-06-30), 106A5 Revision 1D (2018-05-11), 206C2 Revision 1F (2018-05-08), 206C0 Revision 1C (2009-12-14)].

then i change this roms to

Intel RST RAID ROM v17.8.3.4687 (SSD TRIM support in AHCI and RAID modes)
Marvell 91xx SATA 6G Controller - Bios : v1.0.0.1038
Marvell 91xx SATA 6G Controller - Firmware: v2.1.0.1413
Marvell 91xx SATA 6G Controller - Bootloader: v1.0.1.0002b
JMicron JMB36X Controller: v1.08.01 (AHCI Patched)
INTEL 82567V-2 Gigabit Network: v1.5.85

that (especially the Marvell controller ) improved the booting and load time a little.

and i found out if i remove the onboard wifi card Qualcom Atheros Card AR9002WB-1NG (its a mini PCIE expresscard) the load time is improved now to around 11 sec.

so now i am done with imporvements on that hardware.

And i replace the wifi card through a Intel AX200 (ax 2.4 Gbit) and thats it.

Thanks again for providing a great tool like DUET with REWIND.

@mujuli

Thanks for the report!

Be sure you can enter the IRST utility from your BIOS with the assigned combination ( CTRL-I ) an also check if it provide all the required function along the rebuild feature on disk error before calling it done.