[Guide] How to flash a modded AMI UEFI BIOS

Hi everyone,
forum administrator asked me to put my request here…
Please read my short story below, perhaps anuone can help me with flashing modded BIOS in my PC?
Thanks



@Lost_N_BIOS :
EDIT by Fernando (to save space):
Thank you for >this< reply
Looks like a hard one already…
I am not familiar with flash programmers and finding good local specialist may take me much time… Cost unknown, results uncertain…
But as I found following feature:
"System/Emergency ROM Flash Recovery with Video - Recovers system BIOS in corrupted Flash ROM"
listed in the specssheet of my HP Z220 I decided to play a bit with AFU. Did not go far however - I get an "Error 46: Problem Getting Flash Information" - regardless if I try to dump BIOS under Windows (afuwinx64) or using AFUDOS.
What do you think about this? In some other thread someone was describing his Fujitsu-Siemens pc BIOS as "currently not moddable" - maybe this is my case as well and I should simply give it up and try USB stick boot method?

Thanks,
Szymon

EDIT by Fernando: Unneeded (parts of the quoted) posts removed (to save space)

Hi,
Could you explain better the procedure you used succesfully to flash a modded BIOS using USB Flashback port?
I´ve been made lots of tries and hadn’t success.
Your help will be apreciated !
Tks

ASUS P8Z77-M PRO
i5 3570K
8mb RAM Corsair 1333Mhz

I have an ASUS Z87-A and I am trying to flash modded BIOS for NVME boot. No flashback support. The AFU and CMD method doesn’t work, and I can’t find AI Suite for my motherboard. Any ideas?

Hello
This motherboard ASUS P8Z77-V LX2 does not have USB FLASHBACK.

@Black_PR - Then this is what I suggest you do

Check BIOS main page and see if ME FW version is shown, if not then download HWINFO64 and on the large window on left side, expand motherboard and find ME area, inside that get the ME Firmware version.
Once you have that, go to this thread and in the section “C” download the matching ME System Tools Package (ie if ME FW version = 10.x get V10 package, if 9.0-9.1 get V9.1 package, if 9.5 or above get V9.5 package etc)
Intel Management Engine: Drivers, Firmware & System Tools

Once downloaded, inside you will find Flash Programming Tool folder, and inside that a Windows or Win/Win32 folder.
Select that Win folder, hold shift and press right click, choose open command window here (Not power shell).
#1. At the command prompt type the following command and send me the created file to modify >> FPTw.exe -bios -d biosreg.bin

#2. Right after you do that, try to write back the BIOS Region dump and see if you get any error, if you do show me image of the command entered and the error given >> FPTw.exe -bios -f biosreg.bin
^^ This is important step, don’t forget ^^



If you are stuck on Win10 and cannot easily get command prompt, and method I mentioned above does not work for you, here is some links that should help
Or, copy all contents from the Flash Programming Tool \ DOS folder to the root of a USB Bootable disk and do the dump from DOS (FPT.exe -bios -d biosreg.bin)
https://www.windowscentral.com/how-add-c…creators-update
https://www.windowscentral.com/add-open-…menu-windows-10
https://www.laptopmag.com/articles/open-…ator-privileges

Or here is simply registry edit that adds “Open command window here as Administrator” to the right click menu
Double-click to install, reboot after install may be required
http://s000.tinyupload.com/index.php?fil…134606820377175

DO NOT do anything other than what is mentioned here with FPT!! DO NOT, EVER, flash any stock BIOS with FPT!

Please follow directions ONLY as I’ve written here for you, and wait for reply each time, or you can brick your board or loose board specific data etc.

If, as expected, you get error 280 or error 368 above at step #2, then you need to follow this guide to unlock SMI Lock and BIOS Lock
[GUIDE] Grub Fix Intel FPT Error 280 or 368 - BIOS Lock Asus/Other Mod BIOS Flash

You can start at step 6, I’ve gathered the details you need and will give them below

Rename the .efi file to >> Shellx64.efi
SMI Lock variable >> 0x88
BIOS Lock variable >> 0x89

So, at grub prompt, you will type the following one at a time, enter between each. (Case sensitive)
setup_var 0x88 0x0
setup_var 0x89 0x0

Once done, reboot back to windows, make new FPT dump of BIOS region >> FPTw.exe -bios -d biosregnew.bin
Send me that file to edit instead of the one mentioned above, this one will have these locks disabled in place, so you wont have to do that next time around

Or, you can edit that biosregnew.bin file, do the NVME mod to this file, save it with a mod name so you know it’s the mod file, and flash it back via FPT using this command >> FPTw.exe -bios -f biosregnewmod.bin

Hello
ME Version : 8.1.2.1318

Intel ME System Tools v8 r3
1. FPTw.exe -bios -d biosreg.bin - OK
2. FPTw.exe -bios -f biosreg.bin - Error 280

@Black_PR - as expected, now continue with second part of the spoiler above, using the guide I linked about error 280/368 and the info I provided there.

Zitat von SoniX im Beitrag #72

How to flash the BIOS mod Asrock motherboard with BIOS Aptio 5.

1) Flash the original version of the BIOS.
2) FPT Utility to make a backup of the Region BIOS.
- example:
1
 
fpt -d bios.bin -bios
 

2) Modified file "bios bin", for example in UBU or UEFITool, and save the changes as a "mod_bios.bin".
3) Now, using the FPT, to flash the modified file.
- example:
1
 
fpt -f mod_bios.bin -bios
 

4) Reboot and Reset.

Added:
Why do we have to work with a backup?
If you flash the original version of the BIOS, you can lose the unique data such as MAC, S/N and etc.



Does this work with ASRock AMD Chipset Platform (x470/x570) too?
FPT was originally for Intel Chipset.
If it doesn't work, is there another way to flash modded bios für AMD Platform?

@Wishbringer - you can try this method linked on page one of this thread, download the tools attached to the thread below, and follow just the “flashing” part of that guide
https://linustechtips.com/main/topic/592…r-motherboards/

Otherwise you need hardware flash programmer, like CH341A

Hi Fernando,

Your info helped my a while ago to update my Supermicro X9 board to be able to boot from an NVME SSD (running Ubuntu) so I figured I might as well update my Asus B85M-G board as well.
I’ve followed all the steps and managed to install Windows 10 and boot from my Kingston A2000 SSD just now

One remark though: I flashed the modded BIOS with the latest version of the Asus AI Suite from within Windows (using the EZ Update “replace-the-file-after-check” method).
This worked, but EZ Update always crashed/froze in the end (maybe it tries to do another check after the actual flash?)
It might give some piece of mind to anybody using this method if you mention this can happen in the original post?

As far as I can tell: if you let EZ Update run for long enough (even if it looks frozen) the flash will be successful.
One way to make sure if it’s flashed OK, is if you are forced into the BIOS setup during the first reboot after the flash (where you basically confirm the settings and exit).
I didn’t have the NVME SSD yet when I flashed the BIOS so I couldn’t simply test if it was OK.

a have a question how should be the files in usb (modded Bios + the attached efiflash + the original autoex ec ) ?? and how i will copy them
copy and past or should i use a software to copy them ??

@waleed.dawa :
Since I never had a Gigabyte mainboard, I am not 100% sure, which is the safest way to get a modded UEFI Gigabyte BIOS successfully flashed.
AFAIK many Gigabyte MB users gave the modded BIOS the exactly same name (incl. extension) as the original BIOS and flashed it by using QFlash.
Hopefully an experienced Gigabyte BIOS modder can give you an advice.

@waleed.dawa - You do not need to use EFIFlash, but you can if you want. You can flash from USB via Qflash from within BIOS (F8 on any page), or END at boot.
Since I don’t know what board you have, I can’t check stock BIOS. Some BIOS need this for Qflash to allow mod BIOS flash
[OFFER] Gigabyte GA-Z370-Aorus Gaming 7 BIOS mod (6)

File name should be OK with any name, but best to use stock extension to avoid possible denial. It’s really .bin anyway, but some may check if normal Gigabyte format, I am unsure

good afternoon. Using the AFUWIN64 v3.05.04 tool gives me the following error.[[File:Captura de pantalla (42).png]]

Captura de pantalla (42).png

@eva10nu :
Since your problem is BIOS modding and not driver related, I have moved your post into this thread.
Please read very carefully the start post of this thread.

Fernando looked at my mod’ed BIOS and says it looks like it was done correctly. Yet I followed the steps at the beginning of this forum for my MB (Asus P8H61-I R2.0).

MB has no Flashback support, so I followed steps:

I downloaded the AFUWIN tool from the link shown (i.e. ">here<") and used the command "afuwinx64.exe my-bios-name.rom /GAN" but it keeps throwing the error:

the CAP/ROM file sizes (original vs mod) are identical. I’m stumped. Help??

EDIT by Fernando: Unneeded blank lines removed (to save space)

@Lost_N_BIOS :
Can you help the Forum member 0Byte Solutions?

Oddly, I decided to boot to Windows and use the AFUWINGUI.EXE tool & VOILA! That tool allowed the ROM to update. I can now boot to my NVMe.

I GREATLY appreciate the how-to’s and the help, sirs!

Download the AFUWINX64 tool (v3.05) in a folder on your boot drive, for example, C: \ AFUWINX64
Download the last original ‘clean’ BIOS for your system, for example, Bios.cap in C: \ AFUWINX64
Download MMTool (v4.50) in C: \ AFUWINX64
Download the NVMe module that you want to insert, for example, NvmExpressDxe.ffs in C: \ AFUWINX64
From the CMD prompt, run AFUWINX64 to extract a backup of your ‘existing’ BIOS in C: \ AFUWINX64 (use … AFUWINX64.exe Extracted.rom / O)
From the CMD prompt, run MMTool and load it into the Extracted.rom file
Then find and ‘insert’ the NVMe module in the CSMCORE section of the Extracted.rom file (according to Fernando’s guide)
Then save a copy of the modified file, for example, BiosNvme.rom in C: \ AFUWINX64
From the CMD indicator, run the AFUWINX64 tool to update your system with original ‘clean’ biographies that you downloaded (use … AFUWINX64.exe Bios.cap) THEN …
From the CMD prompt, run the AFUWINX64 tool to update your system with the ‘modified’ BIOS that you performed in MMTool (use … AFUWINX64.exe BiosNvme.rom / GAN)

Having done all this, in the end I get a .ROM, which my BIOS rejects for: “The file format is not correct. Ensure that filename extension is. CAP”.
I have read all over the forum, but I don’t know how to solve it.
Thank you

In the end with Fernando’s help and following the Wishbringer procedure (# 246) I managed to flash my ASUS P8H77-V-LE board for NVME boot by PCI.
Thank you. Greetings.