[Guide] How to extract/insert/replace EFI BIOS modules by using the UEFITool

@Fernando
I am using a Lenovo ThinkStation P500 (30A6), the BIOS is AMI Aptio V and the motherboard is Lenovo scorpius rev1.0. Here’s the BIOS dump:
BIOS_Dump.zip (7.8 MB)

@Ahmad_Salal
After having tried to get the ReBarDxe.ffs module properly inserted into your Dump file by using various BIOS modding tools I gave up. No matter which AMI MMTool or UEFITool version I used, I got unwanted impacts on other BIOS modules.
Conclusion: I am not able to help you.

Why is it so @Fernando ? is there any way we can make it work, maybe @CodeRush can help?

The bios may work without empty paddings, but the one that is non-empty must be fixed.

@Ahmad_Salal

You should better ask Lenovo.
Since several years many mainboard manufacturers are trying - more or less successfully - to prevent the flashing of a modded BIOS.
Maybe a BIOS modding expert like @Sweet_Kitten can help you. His last post looks as being promising.

@Sweet_Kitten
Can you look at this file and tell if it will work or not, I manually inserted the Rebar module and removed 0xA18 bytes of 1s from “Volume Free Space”
BIOS_ReBar_HxD.zip (7.8 MB)

Thank You @Fernando, I appreciate your help

Don’t know if it will work. If you can easily recover the motheboard from bad flash, give it a try. Also try this one.

Can I ask what modifications you did with dump?

I just rebuild the file with uefitool. One pad completely removed and two altered.

I see, with old engine? When I inserted the module with UEFITool 0.28 same thing happened, one pad file removed and other altered.

Is it a desirable outcome? Is it safe to flash? I am struggling with the same problem, made a post under Kuri0’s Resizeable BAR thread regarding the issue.
I thought for a Pad-file to be deletes it needs to be done properly (meaning the BIOS’s company itself should do it so it won’t break the motherboard).
Would appreciate it very much if you have an idea.

@Blizz

Nobody is able to answer such question. Each BIOS flashing is somehow risky, even with an untouched original BIOS (e.g. if a sudden power breakdown happens during the flashing produre).
If you are unsure to flash a modded BIOS, where one or more Pad-files have been moved/removed/added by the UEFITool, I recommend to use another tool (e.g. a suitable AMI Aptio UEFI MMTool version, if you have access to it).

The mainboard manufacturers will not help you. Quite the contrary they try to prevent any BIOS modification done by the user.

Right, I wasn’t clear enough then. I meant is it going to work?
Also, I tried both MMTool and UEFITool as I elaborated in the post I linked. Sadly does not work.

Of course, I meant that there are some BIOSes out there that come from the manufacturer as Raw > Pad-file > Raw (which is supposedly corrupted) and not Pad-file > Raw > Pad-file > Raw. So I meant to ask is there a chance the BIOS is going to function properly even after deleting a Pad-file if the manufacturer itself didn’t do it?

Thank you very much for your time and will to help!

@Blizz
Have you ever tried to use the AMI Aptio MMTool v5.0.0.7? It works fine with AMI Aptio IV BIOSes.
Don’t ask here for a download link, do a Google search for it.

@Fernando
Tried both v4.50 and v5, both corrupt the BIOS.

How much Pad-files are needed? Isn’t it just for aligning the PE32 section in PEI files? So it sounds like it can be deleted safely.