[Solution Found + Guide] MSI BIOS internal Checksum

Hello,
when updating the BIOS from my MSI Z390 Gaming Pro Carbon AC and replacing the original with more recent modules (GOP 9.0.1092 and RST 17.5.4) everything works fine, as MSI has an unlocked Flash Descriptor. But when i use the newer ones (RST 17.7 and GOP 9.0.1095, tried also one at a time) the BIOS displays a error message on boot saying that the System Image is corrupt and needs a reflash. However, when Fastboot is enabled, it boots anyway. So no reflash is needed. Except when i want to enter the BIOS setup, it prompts me to reflash the ROM. After that, i cannot enter the OS anymore and have to reflash the ROM using a USB Stick and a unmodded BIOS File from MSI (M-Flash Recovery Mode). To me it seems that MSI BIOS has an internal Checksum it compares to at Boot. And if it detects a different one, it will say that the BIOS image is corrupt. But why is it working then with the older GOP and RST modules? I found a module in the BIOS using MMTool called FvChecksum. Have deleted it, which ended in a bricked and non booting BIOS (no Image from the PC whatsoever). Had to reflash using a CH341A Programmer. So onto my Question: Does anyone know if and how the internal BIOS check on an MSI BIOS can be removed or deactivated?

FV Checksum.PNG



Edit:

Ok, just searched a bit in the BIOS File using UEFITool (love it :slight_smile: )and found the error Message. Guess its the M-Flash Module itself that triggers the warning?

M Flash Massage.PNG




SOLUTION:

So after some searching arround in UEFITool, i found the Module that triggers the Error. Its the MFLashDXE Module. As you can see in the above Image, the Message that usually gets displayed is stored in there. It also uses AMICallback. So i decided to Zero out the following section ( see Screenshot underneath), and voila the Error message is gone and i’m able to enter the BIOS Setup without the need to reflash the original ROM.

Step by Step:

1. Open your backed up and then modded BIOS File with UEFITool ( i’ve used A56 because it is more powerful for searching)
2. Search for MFlashDXE (or in the Case of BIOS Version 1.60 GUID 44A10DA4-5B73-49D1-A4FB-ABAC3C7EB225)
3. Extract the Body of the PE32 Image Section
4. Now open a Hex Editor (i use HxD), open the file you just saved using UEFITool and select the Block starting at the offset 46F0 to 592F. After selecting the Block use the function replace selected and replace the contents with 00.

Offset.PNG


5. Save the changes to the file.
6. To replace the module, use UEFITool 26.0 and search the GUID of MFlashDXE ( 44A10DA4-5B73-49D1-A4FB-ABAC3C7EB225 )
7. Right click on PE32 Image Section and replace body. Select the File you edited with a Hex editor.
8. Save the modified BIOS Image in UEFITool.
9. Flash the BIOS image using Intel FPT with the command fptw64 -BIOS -F "yourmoddedbiosfile.bin"
10. Congratulations, you can use newer BIOS Modules with your MSI Mainboard, without getting an System BIOS is damaged warning and you can enter the BIOS setup without the need to reflash a Stock BIOS.





Thanks!

@Just_Some_Noise - Thanks for posting your findings and solution for others!

On the original issue, maybe it was bad mod/edit BIOS to begin with?? I’ve never had an issue modifying MSI BIOS, link me to the exact BIOS you used as base, and then I will update RST for you myself as a test, then you can try my BIOS edit and see if same issues or not.
If not, and my BIOS is fine, send me your mod BIOS, and maybe I can tell you why it’s failing (I already have suspicion)

Also, please explain why you mentioned “Unlocked Descriptor”, are you flashing your mod stock BIOS via FPT? If yes, there’s one of the main issues, you should use M-Flash.
When you use FPT, you loose your original board details (Serial, UUID, and a board specific padding file at the end of the original BIOS last volume).
If you never backed up your original chips contents with FPT or programmer before you flashed with FPT, then this will be lost forever, nothing we can do to put it back

If you do have original BIOS backup via FPT or programmer, for my test when I send you a mod BIOS, please program that original back in, and then M-Flash (ONLY) the BIOS I send you.
Otherwise, if you want to use FPT or programmer, send me your original dump and I will edit that instead.

Hello Lost_N_BIOS,

thanks for the quick reply. A few months back i used AFUwin to update the BIOS. But i somehow messed up the BIOS file, which lead to a non booting system. After that i used a Raspbery Pi 4 to bring it back to life. I forgot to backup the original file in the first place, so i decided to flash the generic one from the MSI website. I got my MAC Adress recovered, but like you said i lost the UUID and the Serial. Didn’t know that there is also a special padding file. Since i lost UUID, Serial, Mac i decided to go on easy mode thanks to the unlocked FD and use FPT instead :wink:

One strange thing is that when Updating the BIOS with the older modules (RST 17.5.4 and GOP 9.0.1092) using UBU, it worked without the error message. Only since i wanted to use the newer ones (RST 12.7 and GOP 9.0.1095) it displayed the System Image is damaged message.

If you find time, i would like to try a BIOS modded by you. Here is the newest original BIOS from the MSI website. http://download.msi.com/bos_exe/mb/7B17v16.zip

Thank you :slight_smile:

You’re welcome! Yes, I believe it, AFU is really not ideal to use on Modern Intel based system, there is no need for it really. Serial and UUID go into that special padding file, but also in another BIOS module too usually (This where it would be polled from when you look at the serial/UUID with BIOS or software).
The padding module I mention is what can cause you booting issues if missing after bricked etc, like your situation. So this special situation you created is why you’ve ran into this problem, other users should not have such issues.
And, you should be able to flash mod BIOS with M-Flash, using stock bios name.extension, but that may not apply to all MSI BIOS and I’m not 100% certain on latest models like you have.

My assumption of the source/cause of the issue you’ve now mentioned. Send me your mod BIOS that fails, so I can compare to proper mod and show you what causes the problem, once you test a mod BIOS I make and it’s OK.
Before I mod stock BIOS for you, do you know for sure you can flash modified stock BIOS with M-Flash? If you know you cannot, then send me FPT BIOS region dump instead (FPTw.exe -bios -d biosreg.bin)
^^ If this is case, you can’t flash mod BIOS with M-Flash, already confirmed and tested with exact stock BIOS name.extension, then include with your FPT BIOS region dump, your mod BIOS into same archive, so I can download less - thanks!

Also, if you want to send me images of your stickers on the board in that archive too, I can see about putting your serial and UUID back into BIOS.
For that, I may need to find proper dump of this BIOS by someone first though, or at least BIOS region, that hasn’t be flashed/programmed with stock BIOS

Bump on this. I want to disable the HPET and enable the RAID OPPROM…

@petterkkk - No bump needed here?