[GUIDE] Updating BIOS UEFI using GNU/Linux (NO Windows needed)

vanfanel

Member
Hello there,

First of all, thanks to the excellent support that the Minix support team gave via E-Mail using support@minix.com.hk
Contact them if you need technical help. They seem to be very competent and usually answer on the same day. Many thanks to them!


Now, if you use Minix Z100-0DB with GNU/Linux only, there's a very easy way to update it's firmware (AKA BIOS) without having to use Windows.

-Download the BIOS update from this MEGA link, called "MINIX NEO Z100-0dB AD0J0181 20240308.zip" and decompress it:

>>>>>Z100-0DB BIOS update download link<<<<<

(Should the MEGA link go down, ask the support team on support@minix.com.hk)

-Open a terminal window.
-Install the GNU/Linux flashrom utility. Using Debian/Ubuntu it's as simple as:
sudo apt-get install flashrom
-Get a backup of your current BIOS flash contents, just in case something goes wrong:
flashrom --programmer internal -c "Opaque flash chip" -r bios_flash_backup.bin
-Flash the new BIOS using flashrom and the flashrom file included in this post's attachment, which is called AD0J0181.bin:
flashrom --programmer internal -c "Opaque flash chip" -w AD0J0181.bin

After the flashing process is complete, you can safely reboot the computer and enter the BIOS menu by repeatedly pressing DELETE to re-adjust the settings to your liking.
Here you have it: firmware updating without infesting your very nice Z100-0DB with Windows.
 
Hi.
Thank you for that.

I still think the best way to update the BIOS is to use a bootable USB device.

That way we don't need any OS, avoiding other problems.

I think MINIX should also provide that solution.
 
@notrui Indeed, they should provide a way to update without an OS. That is possible using UEFI shell interface, as I detailed here:


However, the MINIX team should provide a ready-to-flash disk image that updates the BIOS. It's relatively easy because UEFI can autoexec commands on a script file at start. But that's their work :)
 
Did the update using Linux method (UEFI method did not work).
The update in fact downgrade the BIOS version from 2.22.1289 to 2.22.1287 - is it normal ?
 
Did the update using Linux method (UEFI method did not work).
The update in fact downgrade the BIOS version from 2.22.1289 to 2.22.1287 - is it normal ?
That's just the AMI Aptio Setup version. I don't know why that would change?
I didn't notice that before I updated the BIOS.

The BIOS version is:
Project Version AD0J0.181 R
Build Date and Time 03/01/2024 18:17:53

For me before the update:
Project Version AD0J0.151 R
Build Date and Time 11/23/2024 17:38:18
 
I'm running "Fedora Linux 41 (KDE Plasma)" with AD0J0161 hoping to upgrade to AD0J0191

Trying above to back-up BIOS I'm getting
Code:
root@fedora:/tmp# flashrom --programmer internal -c "Opaque flash chip" -r bios_flash_backup.bin
flashrom 1.4.0 on Linux 6.11.8-300.fc41.x86_64 (x86_64)
flashrom is free software, get the source code at https://flashrom.org

Cannot open file stream for /dev/mtd0
No DMI table found.
Found chipset "Intel Alder Lake-N".
Enabling flash write... Error accessing SPIBAR, 0x1000 bytes at 0x0000000080600000
/dev/mem mmap failed: Operation not permitted
FAILED!
FATAL ERROR!
Error: Programmer initialization failed.

From https://www.flashrom.org/user_docs/misc_notes.html
I updated /etc/default/grub with
Code:
GRUB_CMDLINE_LINUX="iomem=relaxed rhgb quiet"

And applied change with
Code:
grub2-mkconfig -o /boot/grub2/grub.cfg

After reboot the backup works
Code:
root@fedora:/home/aender/Downloads/Z100-0dB-BIOS-20240308-AD0J0191# flashrom --programmer internal -c "Opaque flash chip" -r bios_flash_backup.bin
flashrom 1.4.0 on Linux 6.11.8-300.fc41.x86_64 (x86_64)
flashrom is free software, get the source code at https://flashrom.org

Cannot open file stream for /dev/mtd0
No DMI table found.
Found chipset "Intel Alder Lake-N".
Enabling flash write... SPI Configuration is locked down.
FREG0: Flash Descriptor region (0x00000000-0x00000fff) is read-write.
FREG1: BIOS region (0x00500000-0x00ffffff) is read-write.
FREG2: Management Engine region (0x00001000-0x00411fff) is read-write.
Enabling hardware sequencing because some important opcode is locked.
OK.
Found XMC flash chip "XM25QH128C" (16384 kB, Programmer-specific) on internal.
===
This flash part has status UNTESTED for operations: PROBE READ ERASE WRITE WP
The test status of this chip may have been updated in the latest development
version of flashrom. If you are running the latest development version,
please email a report to flashrom@flashrom.org if any of the above operations
work correctly for you with this flash chip. Please include the flashrom log
file for all operations you tested (see the man page for details), and mention
which mainboard or programmer you tested in the subject line.
You can also try to follow the instructions here:
https://www.flashrom.org/contrib_howtos/how_to_mark_chip_tested.html
Thanks for your help!
Reading flash... done.

But when trying to flash 181 or 191 I get
Code:
root@fedora:/home/aender/Downloads/Z100-0dB-BIOS-20240308-AD0J0191/Z100-0dB-BIOS-20240308-AD0J0181# flashrom --programmer internal -c "Opaque flash chip" -w AD0J0181.bin 
flashrom 1.4.0 on Linux 6.11.8-300.fc41.x86_64 (x86_64)
flashrom is free software, get the source code at https://flashrom.org

Cannot open file stream for /dev/mtd0
No DMI table found.
Found chipset "Intel Alder Lake-N".
Enabling flash write... SPI Configuration is locked down.
FREG0: Flash Descriptor region (0x00000000-0x00000fff) is read-write.
FREG1: BIOS region (0x00500000-0x00ffffff) is read-write.
FREG2: Management Engine region (0x00001000-0x00411fff) is read-write.
Enabling hardware sequencing because some important opcode is locked.
OK.
Found XMC flash chip "XM25QH128C" (16384 kB, Programmer-specific) on internal.
===
This flash part has status UNTESTED for operations: PROBE READ ERASE WRITE WP
The test status of this chip may have been updated in the latest development
version of flashrom. If you are running the latest development version,
please email a report to flashrom@flashrom.org if any of the above operations
work correctly for you with this flash chip. Please include the flashrom log
file for all operations you tested (see the man page for details), and mention
which mainboard or programmer you tested in the subject line.
You can also try to follow the instructions here:
https://www.flashrom.org/contrib_howtos/how_to_mark_chip_tested.html
Thanks for your help!
Reading old flash chip contents... done.
Erase/write done from 0 to ffffff
Verifying flash... FAILED at 0x0050008f! Expected=0xf8, Found=0xf0, failed byte count from 0x00000000-0x00ffffff: 0x1
Your flash chip is in an unknown state.
Get help on IRC (see https://www.flashrom.org/Contact) or mail
flashrom@flashrom.org with the subject "FAILED: <your board name>"!-------------------------------------------------------------------------------
DO NOT REBOOT OR POWEROFF!
😱

Recovery from backup works
Code:
root@fedora:/home/aender/Downloads/Z100-0dB-BIOS-20240308-AD0J0191# flashrom --programmer internal -c "Opaque flash chip" -w bios_flash_backup.bin 
flashrom 1.4.0 on Linux 6.11.8-300.fc41.x86_64 (x86_64)
flashrom is free software, get the source code at https://flashrom.org

Cannot open file stream for /dev/mtd0
No DMI table found.
Found chipset "Intel Alder Lake-N".
Enabling flash write... SPI Configuration is locked down.
FREG0: Flash Descriptor region (0x00000000-0x00000fff) is read-write.
FREG1: BIOS region (0x00500000-0x00ffffff) is read-write.
FREG2: Management Engine region (0x00001000-0x00411fff) is read-write.
Enabling hardware sequencing because some important opcode is locked.
OK.
Found XMC flash chip "XM25QH128C" (16384 kB, Programmer-specific) on internal.
===
This flash part has status UNTESTED for operations: PROBE READ ERASE WRITE WP
The test status of this chip may have been updated in the latest development
version of flashrom. If you are running the latest development version,
please email a report to flashrom@flashrom.org if any of the above operations
work correctly for you with this flash chip. Please include the flashrom log
file for all operations you tested (see the man page for details), and mention
which mainboard or programmer you tested in the subject line.
You can also try to follow the instructions here:
https://www.flashrom.org/contrib_howtos/how_to_mark_chip_tested.html
Thanks for your help!
Reading old flash chip contents... done.
Erase/write done from 0 to ffffff
Verifying flash... VERIFIED.
😌

❓Any idea why 181 or 191 won't flash ❓

I downloaded the Z100-0dB-BIOS-*
from https://files.theminixforum.com/shared/bios/
 
I'm running "Fedora Linux 41 (KDE Plasma)" with AD0J0161 hoping to upgrade to AD0J0191

Trying above to back-up BIOS I'm getting
Code:
root@fedora:/tmp# flashrom --programmer internal -c "Opaque flash chip" -r bios_flash_backup.bin
flashrom 1.4.0 on Linux 6.11.8-300.fc41.x86_64 (x86_64)
flashrom is free software, get the source code at https://flashrom.org

Cannot open file stream for /dev/mtd0
No DMI table found.
Found chipset "Intel Alder Lake-N".
Enabling flash write... Error accessing SPIBAR, 0x1000 bytes at 0x0000000080600000
/dev/mem mmap failed: Operation not permitted
FAILED!
FATAL ERROR!
Error: Programmer initialization failed.

From https://www.flashrom.org/user_docs/misc_notes.html
I updated /etc/default/grub with
Code:
GRUB_CMDLINE_LINUX="iomem=relaxed rhgb quiet"

And applied change with
Code:
grub2-mkconfig -o /boot/grub2/grub.cfg

After reboot the backup works
Code:
root@fedora:/home/aender/Downloads/Z100-0dB-BIOS-20240308-AD0J0191# flashrom --programmer internal -c "Opaque flash chip" -r bios_flash_backup.bin
flashrom 1.4.0 on Linux 6.11.8-300.fc41.x86_64 (x86_64)
flashrom is free software, get the source code at https://flashrom.org

Cannot open file stream for /dev/mtd0
No DMI table found.
Found chipset "Intel Alder Lake-N".
Enabling flash write... SPI Configuration is locked down.
FREG0: Flash Descriptor region (0x00000000-0x00000fff) is read-write.
FREG1: BIOS region (0x00500000-0x00ffffff) is read-write.
FREG2: Management Engine region (0x00001000-0x00411fff) is read-write.
Enabling hardware sequencing because some important opcode is locked.
OK.
Found XMC flash chip "XM25QH128C" (16384 kB, Programmer-specific) on internal.
===
This flash part has status UNTESTED for operations: PROBE READ ERASE WRITE WP
The test status of this chip may have been updated in the latest development
version of flashrom. If you are running the latest development version,
please email a report to flashrom@flashrom.org if any of the above operations
work correctly for you with this flash chip. Please include the flashrom log
file for all operations you tested (see the man page for details), and mention
which mainboard or programmer you tested in the subject line.
You can also try to follow the instructions here:
https://www.flashrom.org/contrib_howtos/how_to_mark_chip_tested.html
Thanks for your help!
Reading flash... done.

But when trying to flash 181 or 191 I get
Code:
root@fedora:/home/aender/Downloads/Z100-0dB-BIOS-20240308-AD0J0191/Z100-0dB-BIOS-20240308-AD0J0181# flashrom --programmer internal -c "Opaque flash chip" -w AD0J0181.bin
flashrom 1.4.0 on Linux 6.11.8-300.fc41.x86_64 (x86_64)
flashrom is free software, get the source code at https://flashrom.org

Cannot open file stream for /dev/mtd0
No DMI table found.
Found chipset "Intel Alder Lake-N".
Enabling flash write... SPI Configuration is locked down.
FREG0: Flash Descriptor region (0x00000000-0x00000fff) is read-write.
FREG1: BIOS region (0x00500000-0x00ffffff) is read-write.
FREG2: Management Engine region (0x00001000-0x00411fff) is read-write.
Enabling hardware sequencing because some important opcode is locked.
OK.
Found XMC flash chip "XM25QH128C" (16384 kB, Programmer-specific) on internal.
===
This flash part has status UNTESTED for operations: PROBE READ ERASE WRITE WP
The test status of this chip may have been updated in the latest development
version of flashrom. If you are running the latest development version,
please email a report to flashrom@flashrom.org if any of the above operations
work correctly for you with this flash chip. Please include the flashrom log
file for all operations you tested (see the man page for details), and mention
which mainboard or programmer you tested in the subject line.
You can also try to follow the instructions here:
https://www.flashrom.org/contrib_howtos/how_to_mark_chip_tested.html
Thanks for your help!
Reading old flash chip contents... done.
Erase/write done from 0 to ffffff
Verifying flash... FAILED at 0x0050008f! Expected=0xf8, Found=0xf0, failed byte count from 0x00000000-0x00ffffff: 0x1
Your flash chip is in an unknown state.
Get help on IRC (see https://www.flashrom.org/Contact) or mail
flashrom@flashrom.org with the subject "FAILED: <your board name>"!-------------------------------------------------------------------------------
DO NOT REBOOT OR POWEROFF!
😱

Recovery from backup works
Code:
root@fedora:/home/aender/Downloads/Z100-0dB-BIOS-20240308-AD0J0191# flashrom --programmer internal -c "Opaque flash chip" -w bios_flash_backup.bin
flashrom 1.4.0 on Linux 6.11.8-300.fc41.x86_64 (x86_64)
flashrom is free software, get the source code at https://flashrom.org

Cannot open file stream for /dev/mtd0
No DMI table found.
Found chipset "Intel Alder Lake-N".
Enabling flash write... SPI Configuration is locked down.
FREG0: Flash Descriptor region (0x00000000-0x00000fff) is read-write.
FREG1: BIOS region (0x00500000-0x00ffffff) is read-write.
FREG2: Management Engine region (0x00001000-0x00411fff) is read-write.
Enabling hardware sequencing because some important opcode is locked.
OK.
Found XMC flash chip "XM25QH128C" (16384 kB, Programmer-specific) on internal.
===
This flash part has status UNTESTED for operations: PROBE READ ERASE WRITE WP
The test status of this chip may have been updated in the latest development
version of flashrom. If you are running the latest development version,
please email a report to flashrom@flashrom.org if any of the above operations
work correctly for you with this flash chip. Please include the flashrom log
file for all operations you tested (see the man page for details), and mention
which mainboard or programmer you tested in the subject line.
You can also try to follow the instructions here:
https://www.flashrom.org/contrib_howtos/how_to_mark_chip_tested.html
Thanks for your help!
Reading old flash chip contents... done.
Erase/write done from 0 to ffffff
Verifying flash... VERIFIED.
😌

❓Any idea why 181 or 191 won't flash ❓

I downloaded the Z100-0dB-BIOS-*
from https://files.theminixforum.com/shared/bios/
Dear Alane

Sorry for the inconvenience. Please use the UEFI upgrade package. We have sent it to your email.
 
Back
Top