How to flash a BIOS when only a Windows binary is provided?

I would highly recommend not flashing a BIOS with an .exe using Wine. Flashing a BIOS can potentially turn your computer into a large paperweight if something goes wrong.

Some manufacturers (I know Dell does for example) have alternative BIOS upgrade methods for Linux.

However if Toshiba does not offer any Linux compatible options, your best bet is to:

  1. Determine if you really need to do the update. If you aren't having any problems with the BIOS currently and don't require any new features from it you can probably safely ignore the update.
  2. If you do require the update, either create a DOS boot disk (Mitch's answer links to a good how-to for doing this), install DOS/freeDOS etc. onto a new partition, or -gulp- install Windows. If you have an extra old hard drive around you could also install this hard drive, put windows on it, flash the BIOS and then switch back to your hard drive with Ubuntu on it.

This site explains how to go about doing a BIOS update under Linux.

Quoted from the same site:

So you've finally made the move to a Windows-free computer, you're enjoying your brand new Linux OS, no Trojans/viruses, no slowdown, everything is perfect. Suddenly, you need to update the BIOS on your motherboard to support some new piece of hardware, but typically the motherboard vendor is offering only DOS based BIOS flash utilities. You panic! Fortunately, this problem is easy to solve...

Below are the steps to follow:

Step 1: Download FreeDOS boot disk floppy image

Step 2: Copy your BIOS flash utility and new BIOS image to the mounted floppy disk image

Step 3: Burn a bootable CD which will emulate floppy device for use

Step 4: Reboot, flash, reboot, enjoy your new BIOS

Source: linuxinsight.com


Flashing using only GNU/Linux

(No floppy disks, No CDs, No DOS, No FreeDOS, No Win*)

Explanation

Usually there are two files:

  • a binary file which includes all the data (firmware) which is going to be transferred to the motherboard's rom chip,

  • a binary file which is an executable utility and is used to make the actual transfer of the firmware to the motherboard, plus some checks.

Manufacturers may combine these two binaries into one self extracted compressed executable file (.exe which is like a .zip file).

In this case a GNU/linux user can unzip the .exe file and extract the firmware file. Then using the flashrom utility can flash the new firmware to the motherboard.

I have tested this procedure using a Gigabyte GA-Z68MA-D2H-B3 (rev. 1.3) and an .exe file which included F10 firmware revision.

The procedure

To make a backup of the old firmware:

flashrom -p internal -r backup.rom -o backuplog.txt

To make the writing of the new firmware, replace Z8MAD2H3.F10 with your new firmware:

flashrom -p internal -w Z8MAD2H3.F10 -o writelog.txt

To revert from an unsuccessful writing, if you completed the backup at the first step:

flashrom -p internal -w backup.rom -o restorelog.txt

That's not going to work.

Depending on the tool provided by Toshiba, you must either:

  • run the exe file on a real Windows
  • create a DOS boot disk

If Toshiba is providing an exe file for the second option, you can try creating a FreeDOS image to run the file. I found a description for Gentoo how to do that.