HOWTO: Update BIOS using WinPE (until LVFS support arrives)

As of this writing, BIOS updating via the Linux Vendor Firmware Service remains a work in progress. If you’re a Linux user and you want to update your BIOS, it is possible to do this by booting off of a Windows Preinstallation Environment USB key.

WARNING:

The usual warnings apply - no warranties given, read the instructions carefully, cross-check them against the documentation that I’ve linked to, and if things break you get to keep the pieces. Only do this if you know what you’re doing!

This worked for me to update to BIOS version 3.06, using Windows 11 to create a WinPE USB key. It may - or may not - work for different Windows or BIOS versions.

You will need:

  • A Windows PC (I did this with Win11; if anybody successfully updates their BIOS with Win10 I will update this post)

  • A USB key that is smaller than 32GB (so it’ll play nice with FAT32 - see explanation here)

  • The latest Framework BIOS updater for Windows

To create the WinPE USB key, do this on your Windows PC (further notes here and here):

  1. Format your USB key. (I used Rufus to do this, and set the partition table to MBR)

  2. Download and install the Windows Assessment and Deployment Kit (Windows ADK) and Windows PE add-on (link here)

  3. Run “Deployment and Imaging Tools Environment” as administrator (it’ll be in Start > Windows Kits). You should now see a command prompt.

  4. Run the following command in the command prompt:

copype amd64 C:\WinPE_amd64

(Replace C:\WinPE_amd64 with the directory of your choice)

You can then close this particular command prompt for now.

  1. Now open a regular command prompt as administrator and run this command:

Dism /Mount-Image /ImageFile:“C:\WinPE_amd64\media\sources\boot.wim” /index:1 /MountDir:“C:\WinPE_amd64\mount”

(Again, replace C:\WinPE_amd64 with the directory of your choice)

  1. Go to C:\WinPE_amd64\mount (or whatever directory you’ve used as MountDir in Step 5), and add the BIOS updater to that directory.

  2. Now open a regular command prompt as administrator and run this command to create a new WinPE image with the BIOS updater included:

Dism /Unmount-Image /MountDir:“C:\WinPE_amd64\mount” /commit

(Replace C:\WinPE_amd64 with whatever directory you’ve used)

  1. Run Deployment and Imaging Tools Environment as administrator and run the following command, changing the WinPE directory (“C:\WinPE_amd64” below) and USB drive letter (“F:” below) as necessary:

MakeWinPEMedia /UFD C:\WinPE_amd64 F:

You should now have a USB key with WinPE and the Framework BIOS updater in it.

On your Framework laptop:

  1. Boot from the USB key. (You may have to change the boot order in BIOS settings to do this)

  2. You should now see a command prompt. Assuming you put the BIOS updater in the “mount” directory in Step 6, you should now run these commands:

X:

Framework_Laptop_BIOS_[version number].exe

  1. Wait.

Congratulations, you’ve updated your BIOS.

Troubleshooting:

The MakeWinPEMedia command doesn’t work

  • Make sure you run the command in Deployment and Imaging Tools Environment. (The Microsoft documentation isn’t entirely clear on this.)

  • Make sure you’re using a USB key that is between 512MB and 32GB.

3 Likes

WinPE seems an overkill just for this. It should be possible to flash the BIOS from DOS using Insyde’s Firmware Flashing Tool directly: search for H2OFFT-D.exe. Just make sure to get a recent version. (Disclaimer: try it at your own risk.)

That might be, but “download the vendor’s flashing tool from a random website” is not a strictly better solution than WinPE.

Also, doesn’t H2OFFT ship as an EFI executable you can run from the EFI shell too?

The .exe provided by Framework is just a self-extracting archive that runs H2OFFT(-W) afterwards. So it’s the same “vendor’s flashing tools” either way, just under the hood.

Flashing under WinPE using the official executable also doesn’t seem to be officially supported, so pick your poison.

If you really want to flash from Windows, I guess you could simply find any old Windows Setup bootable media lying around, press Shift-F10 to launch cmd.exe, and run it from there. Beats having to download and install ADK (which also requires administrative access to another computer running Windows).

Alternatively, Hiren’s Boot CD (modified WinPE) at least doesn’t require any extra installation steps, although it’s also a large download, and one has to visit another scary “random website” to get it.

So I’d say there is in fact a number of strictly better solutions to this problem, in my opinion. I’m not telling anyone what to do however, only sharing my thoughts.

There’s also H2OFFT-L for Linux.

2 Likes

Just a couple of things:

  • I wrote the original post primarily to put down the steps I used, and that happened to work for me (not least because I’ll forget if I don’t write them down somewhere). I’m sure there are quicker ways to do this (like using Windows boot media and launching cmd.exe with Shift-F10 - a trick I wasn’t previously aware of), but this is what worked for me.

  • That said, downloading what purports to be the vendor’s flashing tool from a random website does not strike me as being “better”. For what it’s worth, SBC manufacturer UDOO does make the Insyde flashing tools available, but I have no idea whether they’ll work with this particular firmware update. (You’ll also note that the Linux versions they refer to are pretty ancient.)

3 Likes

@ayhcheung To make things clear, I wasn’t criticizing you. You can see that I even upvoted your original post. I just wanted to let you and everyone else know there are alternative solutions as well. I think it benefits everyone when we learn from each other. Having more information to base one’s decision on can hardly put you in a worse position: on the contrary, it usually leads to strictly better outcomes.

For the record, the tool in question doesn’t have to be downloaded from a “random” website, just another manufacturer’s, as you figured out. In fact, I had a specific manufacturer and place in mind when writing my previous post but generally wouldn’t want to post a competitor’s name here, perhaps it’d even be against the rules to do so. So I left it at that.

Again, I wasn’t telling anybody what to do. It’s good that the WinPE update worked for you, so it can also be assumed to work for others now. However, without this data point I (personally) would be very cautious running Windows binaries with custom drivers (as H2OFFT64.sys is in this case) from within WinPE. This might or might not work on a case-by-case basis.

1 Like

Actually the documentation or lack of when it comes to flashing an insyde bios on linux are ridiculous. There is almost nothing to find out there, the flash tools are outdated and not really documented well enough and I guess insyde bios is just cheap enough that all vendors basically don’t care that this is a bad situation for linux users.

Insyde isn’t any different than the other UEFI vendors in that they don’t provide these tools to end users directly. It could turn into a customer support nightmare for them if they did, and wouldn’t be of much help anyway since firmware images are device-specific, and have to be provided by the OEM regardless.

Alternatively, it might be possible to use Intel’s FPT (Firmware Programming Tool), which also comes in DOS and EFI versions. But this tool has its own caveats and wouldn’t be as simple to use as the other methods I mentioned, so I definitely wouldn’t recommend it except for the brave souls who really know what they’re doing, and are willing to experiment (which is arguably not the prevailing mood in this thread).

Since @ayhcheung already verified flashing from within WinPE works, running a Windows Setup media and pressing Shift-F10 to launch the command prompt will likely be the most convenient way for most people, yielding the same result without having to download gigabytes of data and prepare any special WinPE version, since if one works, others are likely to work just the same.

3 Likes

You also need to note there is an early bug that won’t let you F12 to boot from external media if you have either quiet or quick boot disabled. I eventually found pages on this.

I just manged to wrestle my Linux system to run 3.07 for now.