[GUIDE] Grub Fix Intel FPT Error 280 or 368 - BIOS Lock Asus/Other Mod BIOS Flash

okay will try in windows using fptw instead of fpt.

Here are the files:
desc.bin - the original descriptor region that was dumped using fpt v7 under DOS
descff.bin - my mod to ‘ff’ the most common regions
I was able to flash descff.bin easily without error with : fpt -desc -f descff.bin

A1BIOS.ROM - is the lenovo latest stock BIOS (no .cap file during this time period) which I’m able to easily flash using AFUDOS (but not fpt). I used flash2.exe which is a Lenovo utility that gives you a chance to preserve UUID/serial#/Machine-type before it activates and runs AFUDOS to do the actually burning of the A1BIOS.ROM file. Its all part of their DOS package for updating your BIOS.

I then dumped the A1BIOS.ROM that I just burned with: fpt -bios -f test.bin
then I modified the test.bin file to allow nvme support by injected the necessary .dxe (It doesn’t really matter what the actual mod was)
now its time to flash it back in. That’s were I’m stuck, fpt -f -bios test2m.bin gives error code 7 or 8.

test2m.bin - my modded bios.

Actually even trying to burn back in the stock A1BIOS.ROM fails with : fpt -bios -f A1BIOS.ROM

update: I tried fptw with windows 10, still same error 7 shows up, it doesn’t want to erase the BIOS region and flash the modded BIOS region. Yet, it will easily work with AFUDOS.

desc.zip (366 Bytes)

A1BIOS.rar (2.93 MB)

Desc edit is OK
You don’t want to flash stock BIOS by FPT anyway, so you shouldn’t have been trying that. Is that what you are trying now? If yes, good you couldn’t do it then!
Dump your BIOS with FPT, modify that, and then reflash it (Or is this what you did, that’s failing?) If yes, then do as mentioned below

Since you can use flash2/AFU, and you only need NVME Mod, mod that BIOS with NVME and reflash it via flash2/AFU as you’ve already flashed.

Win98SE is just another type of DOS, here’s how I suggest using that instead of FreeDOS - Follow steps 1-4 to create bootable USB
<Request> Flagship X470 Gaming 7 Wifi Motherboard BIOS Fix

The reason this is happening I think, is due to this is 8MB BIOS region and FD/ME + Part of BIOS region possibly, on second chip. I’d be able to say for sure if you had flash programmer and could dump both chips so I could compile the BIOS
I can’t read desc good enough to see what location it’s giving to all the regions, plutomaniac would be able to do that. But, I think maybe one could be wrong, or it’s not letting you write BIOS region due to this region is split between the chips which is common in some dual chip BIOS setups.
I’d need full programmer dump from both chips to better answer about this. Best thing for you to do is try flashing via flash2/afu, if that fails get a flash programmer + SOIC8 test clip cable instead of trying to push your luck and end up bricking the BIOS (CH341A + SOIC8 test clip with cable is less than $7 shipped)

Everything is on one chip. I’m able to do a full SPI dump with : fpt -d spi.bin. It is 16Mb in size (can’t upload here), it contains desc, bios, Gbe, ME region all there. It is also a 16pin SOIC.

When you told me to try fptw, I used the -verbose setting, this is what I got. What do you think?

error8-fptw7.jpg

It’s still may not be on one chip, even if the SOIC16 is 16MB chip, you get FPT Dump of full BIOS size due to that’s how this works. Since BIOS region is 8MB, I assume one chip is 8MB and other is 8MB too (may or may not be SOIC16)
Show me an image of the board. And give me the ID off the SOIC16 chip. Also, upload the entire BIOS to some free file host.

FlockDN bit is set, this similar to FPRR, but it’s in a BIOS module. I can remove it sometimes, but you’d have to flash that via programmer, or possibly AFU flash would get it in there, and then you could FPT (once unlocked, always use that unlocked BIOS as your base)
Please wait, I will see if I can find that and bypass it for you. This is bypassed/disabled when you use AFU, hopefully it will allow that module itself to be replaced if I can find and bypass it.

* Edit - I can’t find safely, you’ll have to use AFU only or flash programmer - sorry

@Lost_N_BIOS thank you for trying, which modules were you looking into for the FlockDN bit?
I’ll have to do some reading up on it.
Thanks

@nikey22 - Several, powermgmtDXE/powermangmt2 (may be abbreviated differently in your BIOS, not looking at it right now) & PCHInitDXE << This it’s usual location.
Here is guide I use to find it usually, from CodeRush here on the forums (See post near bottom if this doesn’t link you directly), but doesn’t apply exactly to your BIOS, and I can’t find anything that look similar to other formats for this I’m familiar with
https://www.insanelymac.com/forum/topic/…comment-1944166

trying to use FTPw.exe to run cmd lines for BIOS region dump. "Error 365: Invalid parameter value specified by user. Use -? to see help."
This is the command window error from the FPT folder. I would like to eventually unlock my BIOS lock and all overclocking settings. How to get BIOS region dump?

@wazgi3 - Sounds like you are entering something wrong in the CMD line. Please show me image of the CMD window, and be sure I can see what you type before you get that error.

I am opening the command with the file location type cmd hit enter.

Capture.PNG

@wazgi3 - That doesn’t help me, that only shows the help file. Please type your command you are trying and let me see command entered you typed and the error
Ohh wait! I see, you only typed FPTw.exe without any commands!! [qunge]

To dump BIOS region you need to >> FPTw.exe -bios -d biosreg.bin

Please do research on what you are trying to do, before you brick your board!!
FPT can brick system with one click, so you have to know what you are doing and be exact, or it will not be good outcome!

Will do. So I’ve attached my BIOS region. Should I keep giving you updates? Can’t find my GUID using UEFITool NE alpha 51, UEFITool NE Alpha 56. Also my BIOS dump is .bin and wont upload.

Capture.PNG

@wazgi3 - No, I don’t need your BIOS region, why would you send me that? But, if you wanted to upload something online to give to someone you put it in an archive (zip, rar)

Can’t find my GUID?? That’s not a complete sentence, unsure what GUID you are looking for?
If you are looking for Setup module, then the correct GUID is given on page one step#2 (and or use “BIOS Lock” Unicode as mentioned) use UEFITool search/GUID function and you will find it

@Lost_N_BIOS
First of all, thanks for explaining and making this whole guide.
However, I’ve run into some issues using this method.

I found the address for the BIOS Lock, which was 0x894

1
2
3
4
5
6
7
8
 
0x54E1B 		Suppress If {0A 82}
0x54E1D QuestionId: 0x435 equals value in list (0x1) {14 08 35 04 01 00 01 00}
0x54E25 One Of: BIOS Lock, VarStoreInfo (VarOffset/VarName): 0x894, VarStore: 0x1, QuestionId: 0xAB6, Size: 1, Min: 0x0, Max 0x1, Step: 0x0 {05 91 02 08 03 08 B6 0A 01 00 94 08 10 10 00 01 00}
0x54E36 Default: DefaultId: 0x0, Value (8 bit): 0x1 {5B 06 00 00 00 01}
0x54E3C One Of Option: Disabled, Value (8 bit): 0x0 (default MFG) {09 07 04 00 20 00 00}
0x54E43 One Of Option: Enabled, Value (8 bit): 0x1 {09 07 03 00 00 00 01}
0x54E4A End One Of {29 02}
0x54E4C End If {29 02}
 


And I've set and verified that the value changed to 0x0 using setup_var 0x894 0x0, and setup_var 0x894 (verification).
However, the same error occurs whenever I use the .\FPTW64.exe -bios -f .\biosreg.bin command.

1
2
 
Error 368: Failed to disable write protection for the BIOS space.
FPT Operation Failed.
 


What should I do?
Thanks in advance!

**P.S. I am trying to unlock the Dell Inspiron 7567 BIOS if that helps in any way :)

Turns out that the errors for Dell Inspiron 7567 could be only solved with a hardware mod, entering service mode by shorting realtek chipset’s first and fifth pins.
Now full access to the chipset is possible!

Hi!
What If I set the bios lock,and dump the bios with your method?
Would the bios file dumpped has no blos lock?

Updated the ME region:
1. Using FIT, I prepared firmware ME12 for my motherboard (Intel CSME Firmware v12.0.65.1567 (CON H BA) + Intel PMC CNP Firmware v300.2.11.1025 (H B)), all according to the instructions (me.bin).
2. Using FTK, updated the ME region “fwupdlcl -f me.bin” and made a global reset “fptw -greset”.
3. Rebooted, made sure that everything is in order with the ME region.

Updating the BIOS region:
1. I downloaded BIOS 1502 from the ASUS website (ROG-MAXIMUS-XI-EXTREME-ASUS-1502.CAP). BIOS Platform: AMI Aptio V.
2. Updated it using UBU.
3. Using UTNE, I pulled out the body of BIOS 1502 (bios.bin).
4. Using FTK, “fptw -d backup.bin” made a backup of the current BIOS 0805 (backup.bin).
5. Using UBU, I found the BIOS Lock VarOffset 0xA83 variable for backup.bin.
6. Using FTK, “fd44cpr backup.bin bios.bin” copied the individual board data from the current BIOS 0805 backup (backup.bin) to the updated BIOS 1502 (bios.bin).
7. Prepared USB Flash (FAT32) and wrote the contents of the “Boot_Shell_AmiSetupWriter.rar” archive there.
8. Turned off Security Boot (OS Type = Other OS, Secure Keys = Not installed), booted from USB Flash, executed amisetupwriter 0xA83 0x0, the variable changed from 0x1 to 0x0, “exit” came out, immediately started from the Windows boot device.
9. Using FTK, I try to flash the BIOS region “fptw -rewrite -bios -f bios.bin” and still get an error, I’ve done this several times already:

Error 167: Protected Range Registers are currently set by BIOS, preventing flash access.
Please contact the target system BIOS vendor for an option to disable
Protected Range Registers.
FPT Operation Failed.

Where is the problem?
Tell me please…

But I remember for sure that quite a while, somehow it worked.

P.S. Utilities Used:
FTK = FTK 12 r24 (ME 12) I made myself from the package “Intel CSME System Tools v12 r24.rar”.
FIT = FIT 12 r24 (ME12) from the package “Intel CSME System Tools v12 r24.rar”.
UTNE = UEFI Tool New Edition (UTNE) Alpha 57.
UBU = UBU 1.79.1.

----------

Обновил ME-регион:
1. С помощью FIT подготовил прошивку ME12 для моей материнской платы (Intel CSME Firmware v12.0.65.1567 (CON H BA) + Intel PMC CNP Firmware v300.2.11.1025 (H B)), всё по инструкции (me.bin).
2. С помощью FTK обновил ME-регион “fwupdlcl -f me.bin” и сделал глобальный сброс “fptw -greset”.
3. Перезагрузился, убедился что с ME-регионом всё в порядке.

Обновляю BIOS-регион:
1. Скачал BIOS 1502 с сайта ASUS (ROG-MAXIMUS-XI-EXTREME-ASUS-1502.CAP). BIOS Platform: AMI Aptio V.
2. Обновил его с помощью UBU.
3. С помощью UTNE вытащил тело BIOS 1502 (bios.bin).
4. С помощью FTK “fptw -d backup.bin” сделал резервную копию текущего BIOS 0805 (backup.bin).
5. С помощью UBU нашёл переменную BIOS Lock VarOffset 0xA83 для backup.bin.
6. С помощью FTK “fd44cpr backup.bin bios.bin” скопировал индивидуальные данные платы из текущей резервной копии BIOS 0805 (backup.bin) в обновлённый BIOS 1502 (bios.bin).
7. Подготовил USB Flash (FAT32) и записал туда содержимое архива “Boot_Shell_AmiSetupWriter.rar”.
8. Выключил Security Boot (OS Type = Other OS, Secure Keys = Not installed), загрузился с USB Flash, выполнил amisetupwriter 0xA83 0x0, переменная изменилась с 0x1 на 0x0, вышел “exit”, сразу запустил с загрузочного устройства Windows.
9. С помощью FTK пытаюсь прошить BIOS-регион “fptw -rewrite -bios -f bios.bin” и всё равно получаю ошибку, проделывал это уже несколько раз:

Error 167: Protected Range Registers are currently set by BIOS, preventing flash access.
Please contact the target system BIOS vendor for an option to disable
Protected Range Registers.
FPT Operation Failed.

Где проблема?
Подскажите, пожалуйста…

Но точно помню, что давненько, как-то раз сработало.

P.S. Используемые утилиты:
FTK = FTK 12 r24 (ME 12) сделал сам из пакета “Intel CSME System Tools v12 r24.rar”.
FIT = FIT 12 r24 (ME12) из пакета “Intel CSME System Tools v12 r24.rar”.
UTNE = UEFI Tool New Edition (UTNE) Alpha 57.
UBU = UBU 1.79.1.

@gloobox - yes, BIOS will be dumped with any changes you make, so whatever you set will then be in the dumped BIOS.

@Binarycraft - Be careful with FPT rewrite option, really this should only be used if/when you are having some issue, or you already know 100% it’s safe and you have previously erased this area and written it back with FPT without issue.
Error 167 is major pain sometimes!! Sometimes we can get eventually, other times you may need flash programmer.

Please link me to your BIOS Download page and I will check the BIOS, maybe you need to disable more than BIOS Lock. Sometimes you should also disable FPRR/PRR if enabled, or SMI Lock, and always BIOS Guard too if/when enabled (Maybe this!)
Never mind above, I see it in your comments now, missed it previously I will check BIOS now and edit in info/variables for you shortly!

* Edit - @Binarycraft - BIOS Lock variable for ROG-MAXIMUS-XI-EXTREME-ASUS-1502 is >> 0xBBD -/= NOT 0xA83 >> That = IPU Device (B0:D5:F0), VarStoreInfo (VarOffset/VarName): 0xA83
So, that is first issue, and possibly main/only issue FPRR (0x127B) looks to be, and should be, disabled by default, so shouldn’t have to disable that - Same applies to BIOS Guard (0x7CD)

Before doing this, and so that the above BIOS Lock info is the correct variable to use, flash this stock BIOS with EZ Flash first, so this version is in there, otherwise you need to check the current onboard BIOS version setup module to see what it’s BIOS lock variable is.

@Lost_N_BIOS , if you notice, I specified the BIOS Lock variable for the BIOS version 0805 (0xA83) physically flashed at that time, because After all, his BIOS region had to be unlocked in order to change using the FPT to another BIOS region from version 1502. Or can’t this be done? Those. Can I change only the BIOS of one version? The question is resolved, I saw the text in the topic in red!
1. Well, using EZ Flash, I already updated version 1502 (ROG-MAXIMUS-XI-EXTREME-ASUS-1502.CAP).
2. Using FTK, “fptw -d backup.bin” made a complete BIOS backup (backup.bin).
3. Using UBU, I found the BIOS Lock VarOffset 0xBBD variable (yes, it was exactly the same as you found, I already found it before) for backup.bin.
Immediately the question is, can I somehow unlock the entire BIOS, so that just using FTK “fptw -rewrite -f bios.bin” to flash back backup.bin, but only already modified? I did this on the ASUS P8Z77-V DELUXE, because there the early BIOS was unlocked. I understand that this is impossible.
4. Using UBU, I prepared “M11E.CAP” with the necessary modifications for firmware using the ASUS USB BIOS Flashback, but I do not want to risk it yet. Because one BIOS has already messed up. The firmware of the factory “ROG-MAXIMUS-XI-EXTREME-ASUS-1502.CAP” renamed to “M11E.CAP” does not give anything, the motherboard does not start with this BIOS at all.
5. Using UBU, I prepared a new “backupmod.bin” with the necessary modifications for firmware using FTK.
How can I now update at least the BIOS region?
The ME region is being updated very well.

1. I will try to alter only the BIOS region “fptw -rewrite -bios -f backupmod.bin”, but already from the modified “backupmod.bin” … I tried both Win32 and Win64 options, the result:

Error 167: Protected Range Registers are currently set by BIOS, preventing flash access.
Please contact the target system BIOS vendor for an option to disable
Protected Range Registers.
FPT Operation Failed.


I do everything from under the OS: MICROSOFT Windows 10 Pro x64 (2004 May 2020 Update & All Updates / 10.0.19041.329).

2. Broken BIOS2: What will happen if the ASUS USB BIOS Flashback suggests eating “backup.bin”, with the header added, i.e. “backup.CAP”? Will it be an operation similar to the programmer? I’ll check … in theory, only individual data will be left most likely, because he’ll take them from the stitched porridge … Who would tell in detail how this ASUS USB BIOS Flashback works …

Nothing came of it, it would be better if the ASUS hardware programmer built in than this USB BIOS Flashback, which in my case can no longer help. Guess how it works …

3. I continue to update the working BIOS1 (1502). Here are the values of the variables you specify:
Flash Protection Range Registers (FPRR), VarStoreInfo (VarOffset / VarName): 0x127B, VarStore: 0x1
BIOS Guard, VarStoreInfo (VarOffset / VarName): 0x7CD, VarStore: 0x1
BIOS Lock, VarStoreInfo (VarOffset / VarName): 0xBBD, VarStore: 0x1
What variables should I reset (as I understand it, you can do it all at once) in order to flash the BIOS region using FTK “fptw -bios -f backupmod.bin” (excluded the “-rewrite” key, although it seems to indicate overwriting if the data the same)? I went to create …

URAAAA, everything is fine, I flashed the BIOS region, but the truth somehow somehow from the second time …, from the first something did not work.

4. Well, all that remains is to restore the broken BIOS2, and is it just a programmer?
Do not consider it as offtopic: the ASUS ROG MAXIMUS XI EXTREME motherboard has two BIOS (let’s call them BIOS1 and BIOS2, as in the instructions for the board). So, I screwed up one (BIOS2), even after flashing the official “M11E.CAP” using the ASUS USB BIOS Flashback, the board does not start.
On the motherboard there is a button “BIOS_SWITСH”, which allows you to manually switch between BIOS. Which of the BIOS is active is indicated by the BIOS_LED1 and BIOS_LED2 LEDs. Near the BIOS chips there is a jumper of three contacts “BIOS_SELECT”, but why is it if there is a button? The board manual says nothing about this. How to copy / clone BIOS1 to BIOS2 or vice versa? A motherboard with active BIOS2 does not turn on at all, how can I now flash BIOS2 without a programmer? As I understand it, the BIOS does not switch while the computer is running.

P.S. Sorry for the English using Google Translate.

--------------------------
Исходный текст:

@Lost_N_BIOS , если Вы заметили, то BIOS Lock переменную я указывал для физически прошитого в тот момент BIOS версии 0805 (0xA83), т.к. ведь его BIOS-регион необходимо было разлочить, чтобы перешить с помощью FPT на другой BIOS-регион с версии 1502. Или так нельзя делать? Т.е. перешивать можно только BIOS одной версии? Вопрос решён, увидел в топике текст красным!
1. Хорошо, с помощью EZ Flash, я уже прошил версию 1502 (ROG-MAXIMUS-XI-EXTREME-ASUS-1502.CAP).
2. С помощью FTK “fptw -d backup.bin” сделал полную резервную копию BIOS (backup.bin).
3. С помощью UBU нашёл переменную BIOS Lock VarOffset 0xBBD (да, именно такой она и была, как и Вы нашли, я её уже находил раньше) для backup.bin.
Сразу вопрос, можно как-то разлочить весь BIOS, чтобы просто с помощью FTK “fptw -rewrite -f bios.bin” прошить обратно backup.bin, но только уже модифицированный? Я так делал на ASUS P8Z77-V DELUXE, т.к. там ранний BIOS был разлочен. Я так понимаю, что это невозможно.
4. С помощью UBU подготовил “M11E.CAP” с необходимыми модификациями для прошивки с помощью ASUS USB BIOS Flashback, но рисковать пока не хочу. Т.к. один BIOS уже запорол. Прошивка в него заводского “ROG-MAXIMUS-XI-EXTREME-ASUS-1502.CAP” переименованного в “М11Е.CAP” ничего не даёт, материнская плата не стартует с этим BIOS вообще.
5. С помощью UBU подготовил новый “backupmod.bin” с необходимыми модификациями для прошивки с помощью FTK.
Как мне теперь обновить хотя бы BIOS-регион?
ME-регион отлично обновляется и так.

1. Попробую перешить только BIOS-регион “fptw -rewrite -bios -f backupmod.bin”, но уже от модифицированного “backupmod.bin”… Пробовал и Win32 и Win64 варианты, итог:

Error 167: Protected Range Registers are currently set by BIOS, preventing flash access.
Please contact the target system BIOS vendor for an option to disable
Protected Range Registers.
FPT Operation Failed.


Делаю всё из под OS: MICROSOFT Windows 10 Pro x64 (2004 May 2020 Update & All Updates / 10.0.19041.329)

2. Битый BIOS2: А что будет, если ASUS USB BIOS Flashback предложить скушать “backup.bin”, с добавленным заголовком, т.е. “backup.CAP”? Не будет ли это операция аналогичная программатору? Проверю… по идее только индивидуальные данные будут левые скорее всего, т.к. он же их из прошитой каши возьмёт… Рассказал бы кто в подробностях, как этот ASUS USB BIOS Flashback работает…

Ничего не вышло, лучше бы ASUS аппаратный программатор встроил, чем этот USB BIOS Flashback, который в моём случае, уже ничем помочь не может. Догадайся как он действует…

3. Продолжаю обновлять рабочий BIOS1 (1502). Вот значения переменных, указанных Вами:
Flash Protection Range Registers (FPRR), VarStoreInfo (VarOffset/VarName): 0x127B, VarStore: 0x1
BIOS Guard, VarStoreInfo (VarOffset/VarName): 0x7CD, VarStore: 0x1
BIOS Lock, VarStoreInfo (VarOffset/VarName): 0xBBD, VarStore: 0x1
Какие переменные мне следует обнулить (я так понимаю можно и все сразу), чтобы прошить BIOS-регион с помощью FTK “fptw -bios -f backupmod.bin” (исключил ключ “-rewrite”, хотя он вроде указывает на перезапись, если данные такие же)? Пошёл творить…

УРАААА, всё отлично, прошил BIOS-регион, но правда как-то со второго раза…, с первого что-то не сработало.

4. Ну вот, осталось только битый BIOS2 реанимировать, и это только программатор?
Не сочтите за оффтоп: на материнской плате ASUS ROG MAXIMUS XI EXTREME имеется два BIOS (назовём их BIOS1 и BIOS2, как в инструкции к плате). Так вот, один я запорол (BIOS2), даже после прошивки официального “M11E.CAP” с помощью ASUS USB BIOS Flashback, плата не стартует.
На материнской плате есть кнопка “BIOS_SWITСH”, которая позволяет вручную переключаться между BIOS. Какой из BIOS активен, показывают светодиоды BIOS_LED1 и BIOS_LED2. Рядом с микросхемами BIOS есть перемычка из трёх контактов “BIOS_SELECT”, но зачем она, если есть кнопка? В инструкции к плате ничего об этом не сказано. Как допустим, скопировать/клонировать BIOS1 в BIOS2 или наоборот? Материнская плата с активным BIOS2 вообще не включается, как мне теперь прошить BIOS2 без программатора? Как я понял, BIOS не переключить во время работы компьютера.

P.S. Извините за английский, использую Gooogle Translate.

@Binarycraft - No, you flash the latest BIOS version you want to be using via the normal BIOS Update method, then you do the grub unlock, then dump BIOS region new and this is what you edit/reflash.
Again, please stop using -rewrite option for FPT!! If you don’t, you will be sorry eventually.

Sorry, but your wall of test is too huge and confusing! Also, no need for Russian, this is English forum so most everyone only replies in English
What is your goal here?? You can either flash mod BIOS with USB Flashback, or dump bypass error 167 if possible via grub edit (Disable FPRR, SMI BIOS Lock, BIOS Lock, BIOS Guard - if any enabled), and make sure you have secure boot disabled, and any password or TPM off. Then dump BIOS with FPT, edit and reflash.
Since your board has USB Flashback, that is the quickest and easiest way to flash mod BIOS here, no need to waste time with anything else (At all!)

You may need programmer to fix second BIOS, depending on how badly it’s messed up? What you can try for now is boot to BIOS on BIOS1, while in BIOS go to EZ Flash, once in EZ Flash switch the button to BIOS2, then flash stock BIOS using EZ Flash and that will reflash BIOS2.
But, that will only work if BIOS2 FD/ME region is not messed up, and or only if USB Flashback programs in the FD/ME regions as well (if they are missing, corrupted etc)

Otherwise, without programmer, this can be fixed via pinmod and FPT. First you have to do pinmod to unlock FD on BIOS1, then dump it’s contents in full with FPT, unlock FD and program back.
Then reboot back to windows while still on BIOS1, switch the switch to BIOS2, then FPT flash that BIOS in full with FPT


What is "pinmod"?