PDA

View Full Version : G771JM Custom BIOS with NVMe Support



djouija
05-06-2019, 05:33 PM
Hey all,

I recently purchased an Intel 660p NVMe drive to breath new life into my Asus ROG G771JM laptop, only to find out that it would not boot any UEFI operating systesm due to lack of bios support.

Thankfully, after stumbling across the post by @FiXXXer1982 here https://rog.asus.com/forum/showthread.php?90235-G771JW-BIOS-not-detecting-(NVME)-M-2-SSD-Samsung-960-EVO-250GB&p=632851#post632851 -- and more improtantly, the forum outlining the instructions here: https://www.win-raid.com/t871f50-Guide-How-to-get-full-NVMe-support-for-all-Systems-with-an-AMI-UEFI-BIOS.html -- I managed to create a custom bios for the G711JM and am now able to boot Windows 10, Linux, and even macOS installations from my shiney new NVMe drive!

The biggest headache I had durring this entire process was being able to actually flash the modified bios to my system; I kept getting an "Invalid BIOS file" error if/when trying to flash using WinFlash, or a "ROM file size does not match existing BIOS size" when trying to use AFUDOS.

And finding a version of AFUDOS that worked with this machine was a bit of trial and error as well. But once I did find a version that worked (and after a bit of reading), I figured out the proper steps to take in order to modify the BIOS successfully and get it to flash without errors!

Please note that I take NO RESPONSIBILITY if you brick your system following these instructions and that you proceed with caution at your own risk!!

Here's the steps I took to achieve this:

1. Ensure that the G771JM is flashed to latest BIOS version [203 as of this documentation]. Note that this step is important since you'll need to dump the actual BIOS from the system to remove the header and fix filesize issues when flashing the modified BIOS back to the system, and therefore you'll want to be running the latest version of the BIOS

2. Create Bootable USB Using Rufus [Portable]: https://rufus.ie/

Change "Boot selection" to FreeDOS and leave all other settings as defaults:



https://i.imgur.com/RxDpwCD.png

3. Download AFUDOS from https://xeon-e5450.ru/soft/afudos/ extract and copy .exe to the bootable USB you create with Rufus.

4. Reboot into the BIOS and ensure that CSM is enabled (required to boot from USB) and then reboot again and boot from the bootable USB created with Rufus.

5. Dump the current BIOS using AFUDOS and the follow command:

AFUDOS.EXE ORIG.ROM /O

6. Reboot back into Windows and modify the original [dumped] BIOS:

Download and extract the "NvmExpressDxe_4" module: https://www.win-unattended.de/Benutzer/Fernando/BIOS-Files/non-Intel/NVMe%20Modules/NvmExpressDxe_4.rar
Download and extract UEFITool.exe from https://www.win-unattended.de/Benutzer/Fernando/BIOS-Tools/UEFITool_v0.26.0.rar
Launch UEFITool.exe and open the ORIG.ROM file that was dumped earlier using AFUDOS.EXE and search for "DXE" text:


https://i.imgur.com/iIIwyKO.png

Select the third occurance of the 'Unicode text "DXE" found in User interface section at offset Ch' result [which is for the CryptoDxe entry] and you will see that CSMCORE DXE Driver is present, so you know you're in the right place.
Close the parent node of this CryptoDxe reseult (the 20D8FFFE-15C3-4EA9-9D28-CFE2745D78F3 tree) and then navigate down the list of entries until you see the "LANDriver" entry, just before the "Volume free space" entry, and right click on this and choose "Insert After":


https://i.imgur.com/5JVgeG2.png

Select the extracted NvmExpressDxe_4.ffs file and choose open and it should insert the NVMExpress module after the LANDriver module:


https://i.imgur.com/LIrqikA.png

Then save the modified BIOS file using "File" -> "Save image file" and save the modified BIOS to the bootable USB with a filename of MOD.ROM

7. Reboot the laptop again from the bootable USB and Flash the modified BIOS (only if you are feeling brave!) using the command:

AFUSDOS.EXE MOD.ROM

AFUDOS.exe should successfully flashed the modified BIOS. Power off the machine when completed, wait 10 seconds, power back on and boot into BIOS immediatly to disable CSM and re-enable FastBoot.


You should now be able to boot any UEFI installation from the NVMe drive (if installed) or can install any OS now to the NVMe drive and have it detected by the BIOS upon startup! :)

You can also download a copy of the modified BIOS with AFUDOS.exe from here: https://www49.zippyshare.com/v/z2jUa2pE/file.html
(Mirrors: https://mir.cr/1SIS1QME)


Enjoy.