[Guide] Recover from failed BIOS flash using Raspberry PI

The MAC address might be lost, but there are Tools for restoring it in most cases, also UUID.

I would suggest you ask CodeRush, Lordkag or Plutomaniac about the BIOS formatting, the BIOS file you link to is 6MB but the BIOS chip is 8MB so it is not complete and will not work.

The voltage rating of the capacitor is not important, as long as it is above 3V.

Hi!

I have a HP Probook 430 G2(5th gen. i3) it has w25q64 bios chip, and my problem is, the bios is locked(don’t remember the password, and out of warranty), and now I want to change something in bios.
If I download the bios file from HP, extract it, save my old bios image from the chip, how can I merge these too?
Don’t actually know where the password is stored in the hex code. Any idea for it, or any suggestion how can I reprogram?
Or if I do the steps you wrote, it’ll be psw free? I think I have to copy something from my old image because it stores some info about mb, but don’t really know.(I mean UUID, and other infos, which contain the bios image on the chip)
Thanks for your answer!

Have you tried a CMOS reset in case that resets the password (along with all other BIOS settings) as well?

This kind of chip stores the password, no matter you pick out the battery or other standard things. I can reset the password, if I can step into the bios with administrator password(without that I can’t). That’s what I don’t have. The only option is reprogram the chip(or replace it with a chip from e-bay, that I tried. But they sent me a bad chip, that I can’t use, cause if I place that, I have error code-General system board failure. So I had to replace my origi chip, that is locked), or contact HP support and they send me an uniq smc file, what I can’t do, cause I don’t have the ownership paper they need. :frowning:
That’s why I want to try do it my own. I can solder out the chip. Have RPI as well, but don’t really know how to merge my origi bios image, and the one I download from HP page.
The file I download from HP is a .bin file which is 6Mb, and the bios file is used to be8Mb. I think the missing contains the UUID, S/N, MAC, and other infos. I think I have bad luck. :smiley:
The only luck is I can use the laptop, can install os’, but can’t change settings I needed to change.
Thanks for your advice btw.

@hopoaat

Hello

Have you tried this utility, i would try this Before trying to flash anything.

That was the first thing I tried. :smiley: Sadly don’t work with this kind of laptop.

The 6MB file that HP has is just the BIOS region, nothing else (no Flash Descriptor, ME etc). If you dump your current SPI Image you can try to replace via a Hex Editor only the BIOS region and flash it back. Under normal circumstances this would work but a) it’s a laptop which has a lot of system-specific tags at the BIOS region and b) it’s an HP laptop which from past experiences makes it so much harder. You may replace the chip altogether and end up with different errors because the system it’s not “provisioned” (with it’s own keys) and so on. You may also be able to replace the BIOS region via the Intel Flash Programming Tool if you have the required rights (no bios protected sections and unlocked flash descriptor) but that would only be beneficial if you wanted to avoid dissoldering, flashing and soldering back constantly while trying stuff. Anyway, I don’t have any personal experience with HP laptops and their weirdness so I’ll leave it to someone who might actually know a thing or two.

Hi All, First Awsome guide…

Fiddeling arround with this for 2 days now.

Using Pi2, had some problems wirrring in the begging and also some issues to get something back from the pi.

got it now working but get the following error:
root@raspberrypi:/home/pi# sudo flashrom -p linux_spi:dev=/dev/spidev0.0
flashrom v0.9.8-r1888 on Linux 4.1.19-v7+ (armv7l)
flashrom is free software, get the source code at http://www.flashrom.org

Calibrating delay loop… OK.
Found Generic flash chip “unknown SPI chip (RDID)” (0 kB, SPI) on linux_spi.
===

The Bios is from my asus p8z68-v MOBO which failed after bios downgrade to 0501. Even flashing worked I the PC never booted again.

the chip is WINBOND 25Q64BVAIG however couldnt find it on the reselers webpage. Used wiring as shown in the diagram in this guide.
http://addpics.com/files/242-2-c07f.jpg

Any sugestions welcome.

There is a new version of Flashrom 0.9.9 , released 2016-03-13

@ gigiwwa

Well, it is some problem in the Communication between the PI and the chip.

Did you configure “raspi-blacklist.conf”, otherwise you can try with these commands
modprobe spi_bcm2708
modprobe spidev

You can also try this: sudo flashrom -r /tmp/1.rom -c W25Q64 -p linux_spi:dev=/dev/spidev0.0
this would tell Flashrom what chip to look for and dump the chip to /tmp/1.rom, but flashrom should be able to identify this chip anyway.

Otherwise, i would recheck the wiring, also use shortest possible wires.

/boot/config.txt has dtparam=spi=on added

root@raspberrypi:/home/pi# modprobe spi_bcm2708
modprobe: ERROR: could not insert ‘spi_bcm2708’: No such device
root@raspberrypi:/home/pi# sudo modprobe spi_bcm2835
root@raspberrypi:/home/pi# modprobe spidev
root@raspberrypi:/home/pi#

/etc/modprobe.d/raspi-blacklist.conf
#blacklist spi-bcm2708
blacklist i2c-bcm2708

pi@raspberrypi:~ $ sudo flashrom -r /tmp/1.rom -c W25Q64 -p linux_spi:dev=/dev/spidev0.0
flashrom v0.9.8-r1888 on Linux 4.1.19-v7+ (armv7l)
flashrom is free software, get the source code at http://www.flashrom.org

Error: Unknown chip ‘W25Q64’ specified.
Run flashrom -L to view the hardware supported in this flashrom version.
pi@raspberrypi:~ $ modprobe spi_bcm2708
modprobe: ERROR: could not insert ‘spi_bcm2708’: Operation not permitted
pi@raspberrypi:~ $ sudo modprobe spi_bcm2708
modprobe: ERROR: could not insert ‘spi_bcm2708’: No such device
pi@raspberrypi:~ $ sudo modprobe spi_bcm2835
pi@raspberrypi:~ $ sudo modprobe spidev

I will upload a picture of the wiring when I get home.

|addpics|5xo-1-4556.jpg-invaddpicsinvv,5xo-2-b56f.jpg-invaddpicsinvv|/addpics|

Yes, i see a problem with the wiring,
Pin 1 on the chip, yellow wire now goes to Pin 18 on the PI, it should go to 24.

Otherwise i seems to be correct.

Rewired it from scratch and still get the same error.
'
pi@raspberrypi:~ $ sudo flashrom -r /tmp/1.rom -c W25Q64 -p linux_spi:dev=/dev/spidev0.0
flashrom v0.9.8-r1888 on Linux 4.1.19-v7+ (armv7l)
flashrom is free software, get the source code at http://www.flashrom.org

Error: Unknown chip ‘W25Q64’ specified.
'

Any chance the Bios i got is actualy not supported ?

Any thing else I could run to do further trouble shooting?

Ok, did you try without the “-c W25Q64”?
And also i Think it should be “-c W25Q64.V” i wrote the wrong name Before, i have not had to specify the chip with Flashrom, so not 100% sure.

Otherwise i don’t really know what the problem might be, you could try with the latest version of Flashrom 0.9.9, if there was a problem with that chip it may be fixed now.

root@raspberrypi:/# sudo flashrom -r /tmp/1.rom -c W25Q64.V -p linux_spi:dev=/dev/spidev0.0
flashrom v0.9.9-r1955 on Linux 4.1.19-v7+ (armv7l)
flashrom is free software, get the source code at https://flashrom.org

Calibrating delay loop… OK.
No EEPROM/flash device found.
Note: flashrom can never write if the flash chip isn’t found automatically.

maybe shorter wires ?

Try
sudo flashrom -r /tmp/1.rom -p linux_spi:dev=/dev/spidev0.0
Just to be sure it does not find anything automatically,

You can try shorter wires, but at this Point i would start wondering if maybe one of the needed GPIO pins on the PI might be damaged, or the chip itself.

Other than this i can’t really Think of anything else, if you are sure the wiring is correct, the chip is supposed to be supported by Flashrom, and it is 3.3V, so it should work.


EDIT: Also, if you have a capacitor, around 4,7 or 10 nano, you could try putting it between +3.3V and the ground, as Close to the chip as possible, it will act as a lowpass filter so there isn’t any high frequency interference.

Please help me.

There is a “small problem” with the EPROM burning.

You can not (PM25LD010) 128kB EPROM chip in burn a 61kB ROM file. I do not understand. Why do not you let me?
This error message writes: Error: image size (60 928 B) doesn 't match the flash chip’s size (131 072 B).

This command I use the chip burning:
sudo flashrom -w 61KB.rom -V -p linux_spi:dev=/dev/spidev0.0

A picture of the error:


Thanks for help me.

Not speaking englis! I use google translator. Sorry!

I used the UEFI Tool to remove capsule header ,and selected the AMI Aptio Capsule" and select "Extract body…" action. The resulting file is a ROM without capsule header and saved, Next I used my coright usb programmer and flashed the chip and put in back in the pc and it booted up enough for me to get into the Bios and re flash the bios,Now backup and running ! The Board is a Asus 970 Pro Gaming/Aura .

hi all

thanks a lot for this usefull thread.

I happened to flash wrong bios on my MSI Z97I AC, and I also happened to order a raspberry pi few days ago (total coincidences)
So I naturally ended up here.

I have a question, my MSI motherboard have a JSPI1 header (it has 12 pin but seems to be the same)
So my concern is to know if my motherboard bios chip is compatible with flashrom (I absolutely can’t read what’s written on this chip :’( )
and also, using JSPI1, can I try without using resistors and capacitors (I’ll make absolutely sure of my wirings hehe) ?

Thanks in advance

Yes, it should be the same pins to connect to with a 12pin JSPI1 header, and it should work fine without the resistors or capacitor.

The only problem i can Think of, if you don’t know what chip it is, you can’t know for a fact that it is a 3.3V chip, but i would assume that it is though.

EDIT: I assume you have seen this page, it has some useful information about the JSPI1 header.