Update Libreboot with Internal Flashing
Once Libreboot is already installed, you can update to new releases through internal flashing, without needing to disassemble your laptop again.
Disable security protections before flashing
Before performing an internal flash, you need to disable the /dev/mem
protections. Remember to re-enable them once you’re done.
To check if there are any issues, run:
If you don’t get any errors, you can proceed to the Flash Chip Size
part.
If you see an error related to /dev/mem
access, you should restart your system with the iomem=relaxed
kernel parameter.
To do this just type:
Find the line starting with GRUB_CMDLINE_LINUX_DEFAULT
and add iomem=relaxed
:
Save the file and update grub:
Reboot the system:
Additionally, use a kernel that does not have the CONFIG_STRICT_DEVMEM
option enabled. For more detailed instructions, refer to the original guide on the Libreboot website.
Flash Chip Size
To determine the size of your boot flash chip, use the following command:
This will display information about your boot flash in the output.
Reading, Writing, and Erasing the Boot Flash
Read the Current Chip Contents:
To read the current contents of the flash chip, run the below command three times:
Next, use sha1sum
to compare the dumped BIOS images
If the hashes match, you should see something like this:
Once you've confirmed that the hashes are the same, you can clean up any temporary dump files:
Erase and Rewrite the Chip:
To erase and write a new ROM to the flash chip, run:
Note: The force_I_want_a_brick
option disables safety checks in flashprog
. This is necessary in some cases due to changes in flashrom and coreboot over time. If you prefer to avoid this option, try the following:
Start with
-p internal
.If that doesn’t work, use
-p internal:boardmismatch=force
.If it still doesn't work, use
-p internal:boardmismatch=force,laptop=force_I_want_a_brick
.
As long as you are using the correct ROM for your machine, it is safe to run these commands. These options simply disable safety checks and are not inherently dangerous.
If the flashing is successful, the tool will display "VERIFIED" or indicate that the chip contents are identical to the requested image.
To double-check, you can dump the newly flashed BIOS image by running:
Next, use sha1sum
to compare the dumped BIOS image with the original Libreboot ROM file
If the hashes match, you should see something like this:
Once you've confirmed that the hashes are the same, you can clean up any temporary dump files:
Now you can reboot your laptop with the updated bios!
Last updated