[Problem] Bricked MSI MS-7728 v2.0 BIOS

Question
When updating the flash chip’s bios region with flashrom, is there a risk that vital SMBIOS structures or other vital data in the bios chip gets lost?

Background information
By using sbkeysync in Linux to enroll UEFI keys, the BIOS of a quite old desktop computer has become corrupted. I was stupid enough not to make a backup beforehand.
Its mainboard is MS-7728 v2.0 BIOS v3 and it contains BIOS version E7728MLN.30F.
The manufacturer provided an updated version E7728MLN.30G (http://cdn.medion.com/downloads/software/00_Bios7728v3.zip), along with AMI’s afuwinx64.exe and flash.bat.

It is impossible to boot Windows, because error ACPI_BIOS_ERROR always appears.
The USB ports do not work while booting.

Following did not help:
*Removing the CMOS battery for a couple of days.
*Unplugging everything from motherboard except cpu.
*The mainboard does not have a backup bios flash chip to restore factory defaults.
*The BIOS menu doesn’t offer an option to restore factory defaults either.
*Changing hard disk didn’t help enough (see below).

The problem is probably in the BIOS flash chip.

I tried the Windows installation on the existing hard disk, Windows Media Creation Tool and Windows PE; the ACPI_BIOS_ERROR always appears.
Shift + F10 to enter command prompt doesn’t work either.
So the provided afuwinx64.exe cannot be run.

But Linux still boots when providing kernel parameter ‘nomodeset’. USB ports at the front work fine in Linux, the ports at the back still don’t work.
With flashrom -p internal, a dump of the corrupt BIOS has been made (when booting kernel parameter ‘iomem=relaxed’ needed to be added).

flash.bat (that cannot be run on that desktop computer) calls afuwinx64.exe with, among other things, the parameter /R, which according to AMI documentation means: ‘Preserve all SMBIOS structures during programming’. flashrom does not seem to contain any comparable functionality.
And AMI doesn’t offer afulnx anymore. Some open source project offers code for afulnx, but I did not succeed in building it. Possibly because the code doesn’t support the current Linux kernel, but failing to build afulnx could also have to do with my inexperience with gcc.

The dump of the corrupted BIOS (created with flashrom) contains NVAR entries which the bios file provided by the manufacturer (E7728MLN.30G) does not contain, such as:

  • 4 entries named AmiSmbiosNvramGuid
  • NVAR entries with text PK, KEK, db and dbx (i.e. the UEFI Keys)

Note: Also MS-DOS and FreeDOS can be booted, but both OS’es hang when running ‘afudos output.bin /O’.

I am considering trying to flash only the bios chip’s bios region with flashrom (providing parameters -p internal -c --ifd -i bios -w E7728MLN.30G).

Therefore the question: When updating the flash chip’s bios region with flashrom, is there a risk that vital SMBIOS structures or other vital data in the bios chip gets lost?

Other ideas are welcome too.

Edit 11:22 UTC: Question posted at the beginning of the post.


Edit by Fernando: Thread title specified and customized

@dnt
Welcome to the Win-Raid Forum!
Each BIOS flash is a risky action. Nevertheless the user can minimize the risk of getting a completely unusable device.
Why do you want to use the tool Flashrom? Its usage only makes sense, if you
a) are sure, that it will work with your mainboard and
b) have a proper backup of a 100% working BIOS.

Provided, that you can enter the BIOS of your mainboard, there are other options (aside from using a programmer). You don’t need Windows to get the BIOS of an MSI mainboard updated. >Here< is a step-by-step Guide.

Good luck!

@Fernando , Thanks for your reply.

Unfortunately the options provided in the linked video will not work on this MSI motherboard (OEM for Medion):

  • The BIOS menu does not offer an option to flash the bios (no M-Flash).
  • The motherboard does not have a flash bios button.

I am not 100% sure if Flashrom is able to write to the bios chip, but at least flashrom is able to read from the chip. So I have a backup of the current partially working BIOS. And as stated in the first post, I was stupid enough not to make a backup before using sbkeysync.
Therefore, I still think flashrom with -p internal, is the least bad option.
Hopefully someone can answer my question.

Needless to say, other ideas still welcome!

Besides the fact that each BIOS flash is risky, doesn’t anyone know more on the risk of losing SMBIOS structures and other vital data when updating with flashrom (i.e. without AFUDOS parameter /R)?
E.g., possibilities of editing the BIOS file in UEFITool before flashing and which entries should be copied from the current semi corrupt BIOS file to the provided BIOS file?

MSI bios usually doesnt contain relevant data information that may cause issues if lost.
The one that needs to be kept in mind is MAC address and Windows Key Lic.
In this case as a MEDION board, the bios should contain some OEM (Medion AG) specific data, search for it on original corrupted dumps and you may use an HEX editor to add it to new file.

@MeatWar ,
Thanks for you reply! I was able to locate the MAC address and baseboard serial number in the SMBIOS variables (Dmi).
I was not able to find the keys on the case of the machine (S/N (different from baseboard serial number) and Product Key).
Unix command dmidecode doesn’t show these either.