[Guide] How to flash a modded AMI UEFI BIOS

A post was merged into an existing topic: [HowTo] Get full NVMe support for all Systems with an AMI UEFI BIOS

Hi, I was trying to use your guide, but the link to re creating the CAP file seems to be broken, and I seem to need that step to proceed?:

Only for ASUS BIOSes, whose capsule had been removed by extracting the “Body”, but shall be flashed by using the ASUS USB Flashback feature:
Don’t forget to re-insert the original capsule and to save the modded BIOS as *.CAP file!

Can you either point me to the correct place ,or just explain what needs doing, thanks in advance.

Edit by Fernando: Broken and misleading link within the quoted text removed

You… who…??? Use @username and that user will be notified.

Using the UEFI tool to extract (UEFItoolNA version) and replace (UEFI tool regular version) the bios region, by the mod one.

LongSoft/UEFITool: UEFI firmware image viewer and editor (github.com)

That’s Correct Fernando, just what I was trying to do.
This is a different link to that previously pointed to, but suggests an answer.
Seems I just rename the .rom file as specific name .cap file, and put it onto a USB stick…
so I can use USB flashback…
So far it fails… but there we go.

So, to be clearer. I downloaded the file for my motherboard, P8Z77-V-PRO-ASUS-2104.CAP
and the NvmExpressDxe_5.ffs file to add the NVMe capability.

downloaded UEFITool.exe and extracted the body, to get a rom file.

Downloaded and used the MMTool 4.50.0.23 to put the NVM into the rom file.

renamed the rom file Z77VP.CAP as per the document DE103_Z77_H77_Series_BIOS_Renaming.pdf

Dropped it onto a recently formatted small size USB stick, and put it into the flashback usb port.
Shutdown the computer, pressed the usb flashback, and waited? 4 maybe 5 flashes, then with a light on? for 10 mins or so, and nothing seemed to happen, so something failed.
Tried with a few usb sticks… no change…

No…after inserted the NVMe dxe driver, the mod rom is to replace the previous bios region you extracted with the UEFItool, again on the CAP file, then the file is renamed and USB BFB will work.

EDIT: (22 Set 2022) Where did i mentioned MMtool for the bios region swapping operation on the CAP???.. i said UEFI tool, MMtool is only for the insertion of NVMe DXE


  • General guidance of UEFItool and general operations behaviour, with SPI bios volumes, regions, guids, mcodes… same rule for all those, that the tool can extract/replace, but always in mind that anything can change when saving/rebuilding the image after modifications, this will mostly apply when dealing with individual sections, usually theres no issues when dealing with entire volumes/regions.

Tools variants used: UEFItool_NA_A6x/5x for extraction, UEFItool_0.28.0 / 0.25.0 for replacing.

  • The ORIGINAL CAP bios file (Ex.: ASUS P8Z77-V PRO) upon opening…

  • REMOVING the MAIN bios image from the CAPSULE/(ATED) original bios file…
    This is the optimal action to work on mods, preventing the OEM firmware signature breakdown.
    This will ask to save it as Default name: Image_Intel_Intel_image.rom, that can be renamed at user description.

  • EXTRACTION of the bios_region from an ALREADY uncapsulated bios file:

  • REPLACING the modified bios_region (Ex.: NVMe mod inserted)… on the extracted image or in the original CAP file, if the work is done and no further modifications required.


    Upon modifications done by the user, its time to apply them by saving and the tool will rebuilt the image it presenting us the option of opening and view the new file.

  • ALTERNATIVE manual method to return the a full extracted original/mod main bios to the original CAPSULE file…an HeX editor of your own choice.

  • And in this example we have 0x800 as the full CAP header on the original CAP file on the left and next to it, on the right side, we can see that it lacks such length in the previous main bios extracted file (Ex.: Intel_image)

  • …now this newly user modified (Assuming so as intention) extracted main image is exactly the length that needs to be merged/replaced in the original CAP file and having so, a ready-file mod for flashing.

  • Final notes: In this example, ASUS CAP file was used and it should be renamed by BRENAMER tool (This Ex.: P8Z77-V-PRO-ASUS-2104.CAP will be will turn in Z77VP.CAP) or manually renamed if the user already has the knowledge of it.

ONLY mods merged again back in to the CAPSULATED file will be accepted in motherboard models with the ASUS USB Bios Flash Back feature, being the recommended flashing method for MODS, as quoted in this thread flashing guide.

Last reviewed: Aug 2024


EDIT: (22 Set 2022) “Within the CAP file, so the newly created file, is presumably the file to rename and then flash to the bios…”
Yes, now rename the CAP according Asus BFB and use it with it, that’s it if the NVMe was correctly inserted upon the guide, follow the OS installation instructed also in the guide.

Oh OK…
so, after MMTool used to put NVM into the rom file…
How do you then replace the bios region in the cap file with this version?

Or, do you just edit the CAP file with the MMTool to put the Nvm driver directly into it?
In which case why use the UEFITool at all?

Thought I was following the instructions Ok before, now not sure at all.

EDIT:
OK, so use UEFItool to extract the Bios region only.

Your images do not show the AMI Aptio capsule level… again, maybe relevant.

edit the exported rgn file to add the NVMe driver.

and then you have an option to replace the bios region with this file? its greyed out for me, as per your first image?

I note you seem to be using 2 different version of UEFITool, is that relevant?
The version I have is NE alpha 60

I also note your file is a .BIN file not .CAP?

@MeatWar
EDIT 2:
OK, downloaded another version, following your version numbers, the latest is 0.26.0 and this does let me replace the bios, as you said…
Within the CAP file, so the newly created file, is presumably the file to rename and then flash to the bios…

@MeatWar
EDIT 3: Yep… That worked, I now have NVMe support in the Bios…
Now to setup the OS on device.
Thanks Very much for your help on this, much appreciated.

@potterpg
If you address your post to a certain Forum member, you should do it by using the @ feature of the Forum. Only this way the related person will get instantly notified about your post.

@Fernando
OK - thanks - didn’t know that one.

@Fernando
Just adding a thankyou to you Fernando, for making this possible!

@Fernando

Hi I read all the guide, I tried to use ezflash but it doesn’t work, I tried with Flashrom v1.2 Utilities but I got this error:

and with ami aptio i don’t understand if i should use afudos or afuefi

@acidburn87
You can use either the tool AFUDOS or AFUWin, both should be designed by AMI for Aptio IV BIOSes.
If you want to use AFUDOS, you have to boot off an USB stick running MSDOS or FreeDOS.
If you want to use AFUWIN or AFUWINx64, you can flash the BIOS from within the related 32/64bit Windows OS.
In both cases you should use the older version 3.05.04 of the tool (links are within the start post), because the newer ones do not support the " /GAN" command suffix.
You will have to flash the BIOS twice:

  1. The original BIOS as *.CAP file (with the capsule header) and
  2. the modded BIOS as *.ROM file (after having removed the capsule header).

For details please read >this< guide written by OldGuy (the link has been fixed by me within the star post).
Good luck!

@Fernando
Hello and thanks again for the reply, then with afudos I was able to write the bios in .cap without problems but when I go ahead and try to use the .rom file the /GAN command I get the error unknown command

EDIT:
I try the previous windows version using the /GAN command, I’ll let you know how it goes

EDIT 2:
I used the windows version and I succeeded windows started without problems thank you very much have a nice day

1 Like

@acidburn87
Thanks for your feedback and the report, that the " /GAN" command suffix doesn’t work with the currently latest AFUDOS version v3.07.01. The version 3.05.04.ones seem to be the latest AFUDOS and AFUWIN tools, which do support the " /GAN" option. As a consequence I will customize the related guides.
It is fine, that you finally succeeded and now can boot off the NVMe SSD with your old ASUS mainboard.
Enjoy it!

@Fernando

of nothing is a duty, I also come from years of forums and guides made by me, I understand and know well the commitment that must be dedicated and rightly so, anyway thank you again it was 2 days that I could not understand why this nvme it didn’t work you don’t know how much it helped me

Hi All! I try to write modified bios with Flashrom tool to ASRock H310M-STX from freedos.
But receive some errors. Can somebody help? Is any other way to flash it?
Dump log Write log

Whats your doubts here, cant you read the log?
Only bios_region can be written.
The Intel FPT tool can write this region, the correct tool for your ME FW version

Ex:
Full backup: fpt -d spi_full.bin
Bios region dump: fpt -bios -bios -d bios_reg_bak.bin
Bios region write: fpt -bios -f bios_reg_mod.bin

image

[Guide] Unlock Intel Flash Descriptor Read/Write Access Permissions for SPI Servicing - Special Topics / Intel Management Engine - Win-Raid Forum (level1techs.com)

Intel (Converged Security) Management Engine: Drivers, Firmware and Tools (2-15) - Special Topics / Intel Management Engine - Win-Raid Forum (level1techs.com)

1 Like

Hey!

I am a bit new to modding scene - trying from fresh. Wanted to mod my Lenovo ThinkCentre M700 SFF (H110) to support Kaby-Lake-S Xeons.

I tried to follow Guide by Unleashed Overclocking of how to use UBU Tool.
I took the .bin files / microcodes for the Xeon i am trying to mod from here - exactly that one

Socket 1151 (LGA)
506E3 Skylake-S, Skylake Xeon E3 v5
cpu506E3_plat36_ver000000BE_2017-08-20_PRD_DFF17890.bin

(Got 1250v5 and 1250v7 which i wanted to use)

Furthermore, I had no big issue of modding bios file itself - the issue is happening when i tried to flash that modded bios via FreeDoS of the pendrive (tho same issue happens when i try to do it through windows with official Lenovo tools but after replacing “official” file with modded one)

I am getting stopped after “Reading Flash” with an error that i guess many of you already saw many times, exactly “18 - Error: Secure Flash Rom Verify fail.”

Do i need to do some kind of… hex edits or what exactly?
If yes - about Hex Edits.
Would you be so kind to give me some help of how to do here?

I can provide original bios file and the modded one if anyone want to check it.

Cheers for all the help!

What did you expect from flashing mods? Of course it fails as most of bios security doesnt allow flashing mod files.
Work on a bios region dump with Intel FPT tool from the correct ME11 tools package.
Search on forum for similar user experiencies on flash/unlock Lenovo machines.

EDIT: Stop doing new posts. You can edit it.

@Karti
Welcome to the Win-RAID Forum!
Since a thread about the topic “How to flash a modded BIOS” already exists, I have moved your help request into it (and the reply given by @MeatWar).
Good luck!
Dieter (alias Fernando)

1 Like

I was looking for a way to add Xeon v5 support to the Lenovo ThinkCentre M700 SFF motherboard (H110, LGA1151)

I tried to search it first myself, sadly no other topic related to that motherboard. Likewise, I also tried to make modded bios myself for that, but I failed massively… (Error 18).

Here is the latest official bios from Lenovo site
m05jt93usa.zip (5.0 MB)
( You can also download it from official Lenovo website here )

If there is anything else needed from me, please inform me and I will try to get those things as fast as I can :slight_smile:

And just wanted to ask - is it also possible to add ECC memory support to motherboard like that, or not really?

edit - sorry @Fernando for the mess, still catching whole that forum