oreilly.comSafari Books Online.Conferences.


BIOS Flashing and Hotflashing

by KIVILCIM Hindistan

For several years, motherboard vendors have allowed users to update their motherboards with BIOS images and without using EPROM programmers. This allows customers to solve problems on their own -- at least, problems that can be solved with an updated BIOS image. It's also cheaper for manufacturers, who can push more technology into cheap and patchable software, not expensive and replaceable hardware.

This technology led to some problems. The most common one is that the whole procedure is simple, but delicate. Any failure could leave the computer unbootable. More notoriously, some viruses could actually damage computers with this feature. One such virus, CIH, rendered many computers unusable in 1999, causing great panic.

Of course, there are cures even for this situation. You can take your motherboard to the local electronics shop and they can reprogram the BIOS with an EPROM programmer. This will cost you $15 or so. Alternately, if you have another similar computer nearby, you can try a technique called hotflashing to write your BIOS on your own.

For regular BIOS updating procedures and the hotflash technique, I recommend you use a very good program called UniFlash. It is a very capable program, tested with many motherboards and BIOS chips. The program is published as-is with the binary and source but without an open license. Fortunately, the author has promised he will use the GPL in forthcoming versions.

Before explaining hotflashing, we should first start with the basic BIOS flashing technique.

Basic BIOS Flashing

First of all, because your motherboard has a BIOS update does not necessarily mean you should apply it. Read the update explanation to see if the fixes are really related to your problems. Otherwise, if everything is fine with your computer, if you have no nonsense with lockups, no graphic card instabilities, or no CD-ROM boot-up problems, you need not update your BIOS.

If the cure to your computer's problem really does require a BIOS update, then you should first check for the correct update image. Google is your friend. Find your motherboard's make and model and search for that with the string "BIOS image" to find the update. Remember, it's better to find the BIOS image from the official site of your motherboard vendor than from a third party.

Now that you have the BIOS image, you'll need a boot disk, because you'll boot from the floppy, backup the current BIOS, and then update the new one. I recommend the TechW0rm boot disk. This is a very good boot disk based on FreeDOS (a good, open source DOS clone). It is full of very good programs for partitioning or managing your DOS drive. It also supports a huge amount of high memory, making it a perfect boot option for good old DOS games.

You also need the BIOS updater program. You can use the program from your BIOS manufacturer -- Award, AMI, and others have such programs. For regular flashing and hotflashing though, I recommend using UniFlash, because it is a very capable program and will soon be open source.

Let's open some space in the TechW0rm disk for UniFlash, the backup BIOS image, and the update BIOS image. This should not be a problem because the disk is full of many programs. Your BIOS image will more likely be 256K or 128K.

Whatever boot disk you are using, be sure that it does not meddle with highmem, because UniFlash would not like it. For TechW0rm you should choose 5-5 from the boot menus (see Figures 1 and 2). For the regular Win95-98 installation boot disk, Shift-F5 should be fine because it will exit without loading anything.

the first boot prompt
Figure 1. The first boot prompt.

the second boot prompt
Figure 2. The second boot prompt.

Now boot from the diskette and start UniFlash.

First of all, you should backup your BIOS. That is the first option in the menu. Be sure to have at least 256K free on your disk. If this operation fails, make more room and try again. Do not try to update before you have backed up successfully (see Figures 3 and 4).

backing up your BIOS
Figure 3. Backing up your BIOS.

writing your BIOS backup
Figure 4. Writing your BIOS backup.

After that, select the second option (Figure 4) and give the name of your new BIOS image.

writing your new BIOS image
Figure 5. Writing your new BIOS image.

Here you should see if your BIOS has a write protection against this action. Because of the reasons I've stated before, some motherboard manufacturers use such a precaution. If so, the second and third options will stay ghosted (as seen in the figures). Disable that feature before trying to write a new BIOS image.

The program will ask you once more if you are sure that you want to update your BIOS. (Do not continue if you are not sure.) After that the operation will start. While it commences, you will see a progress bar. It is all good if the bar stays green. Red means trouble, usually indicating a damaged BIOS that cannot be written correctly.

If the procedure ends all green, congratulations! You've updated your BIOS. Reboot the computer and see if your problem is solved.

If the update failed with a red bar, you have two options. You can try the update again. Sometimes persistence will pay off. Your other option is hotflashing.

There may be an other problem. After a successful BIOS update, your computer may not boot. The installed image may not be compatible with your motherboard, for example. The symptoms in this case are a computer that will not boot, a monitor that acts as if you've pulled its data cable, a hard drive spinning but not starting, and no beeps on startup.

This is where hotflashing may work.


Hotflashing means programming our BIOS in a different computer than it belongs (we'll call this other computer and BIOS the host). This includes removing the current BIOS of the host computer -- after booting -- and putting on the problematic one and flashing it.

To clear some doubts, I must express that this technique is very simple and has only a very small risk of damage. The worst thing you can do is to install the BIOS the wrong way (left to right or right to left), causing the legs of the EPROM to receive the wrong voltages. This CAN burn the BIOS and motherboard and leave them useless. Let me tell you that I accidentally made this biggest mistake, and after seeing that the computer froze and nothing was responding, I quickly shut down the machine some 30 seconds or so later. The BIOS was very hot and there was even a nasty burning smell. When I booted with the good BIOS a few minutes later, I saw that the computer was functioning properly and the BIOS that should have been burned was writable.

If you pay attention to two things I'll explain, nothing will be lost.

You have a BIOS A that belongs to motherboard A, which malfunctions one way or another and will not boot the computer. You also have a computer B with BIOS B, which works correctly and will be your host computer for writing the BIOS.

Remember that the host motherboard should resemble the destination motherboard. It is more likely to rewrite a 440BX board BIOS in another 440BX board. Of course, you don't have to use exactly the same motherboard model from the same vendor. A similar model is fine.

There is a limitation with the BIOS chip compatibility, however. Some BIOS chips are 128K and some are 256K. You can write a 128K BIOS with a 256K BIOS host, but not vice versa. Think back to taking the backup of your BIOS; if it is bigger than your update BIOS file, the operation will likely fail.

There are two important tips that will make your day:

  1. You'll have to remove the host's BIOS chip while the computer is running. This is not easy without a special tool for this operation. You may have to use force. Fortunately, a better way exists. Just turn off the computer and then try to remove the chip.

    Be careful not to remove one side first, as this may damage the legs. Unless the legs come off completely, even this won't be a fatal problem. You can straighten the legs after you take it off, but better not to need to do this at all.

    After removing the chip, straighten the legs if need be and replace it. This time, let it stay connected -- apply no force to drive it home as it was before. This should be enough for booting the computer. After that, it'll be easy to remove the chip again.

  2. Pay close attention to the direction of the BIOS chip. There will be a little engraved half circle at one end and a similar counterpart on the motherboard. Be sure that these are facing in the same direction. Do not take your direction from the label on the BIOS. Labels may be wrong, but these circles won't be.

Placing the chip in the wrong direction can be a huge mistake, but if you can shut the computer off within 15-20 seconds, most probably nothing will burn.

Now that you understand these vital points, we can start the operation.

First be sure that the computer is off. Remove the cable to be sure. Then take off your host BIOS (as explained in the first tip) and replace it. Don't push; just be sure that all legs are connected.

After that, replace the power cable and boot the computer from the diskette. It may be better if you disconnect the hard drive and CD-ROMs firsthand.

Now you should have your computer on, your host BIOS in, and the UniFlash program executing. Make a backup of your host BIOS in case anything goes wrong. After that, slowly remove the host BIOS and replace it with the destination BIOS. Again, do not push hard. Just let it connect. Be gentle.

Now write your backup BIOS with the third option (Figure 4) or, if you believe that the problem was not caused by the BIOS image, the updated version. After seeing the success bar all green, shut down the computer, replace the host BIOS, and reboot the computer to see that the host computer is fine. Do not try the new BIOS on the host machine. It will most likely not boot.

This operation is not only easy but also more tolerable than most other computer peripheral operations. As for my example, when I tried to hotflash the Gigabyte GA-6BXE BIOS on my ABIT BM-6 motherboard, the operation was unsuccessful because the chip was damaged in the former update on its own board. I took off a Tomato LX board's BIOS (which looked the same) and tried hotflashing it. On my first try, because I was excited, I misplaced the BIOS and the computer hanged. I reseated the chip correctly, rebooted the machine, wrote the BIOS, and then put the Tomato LX BIOS (which now had the Gigabyte GA-6BXE BIOS update) into the Gigabyte machine and everything went fine.

There is another option in the CMOS submenu, as shown in Figure 6. This is the data of the BIOS, which stores your boot, hard drive, and peripheral choices as well as the system time. If you have a problematic computer that only works with some special BIOS parameters, you can also backup this data, but it will not be needed in most cases.

saving BIOS data
Figure 6. Saving BIOS data.

I stress again and again that this is really an easy process. If you can change the video cards or memory on your motherboard by yourself you can easily do this. It is less risky than putting on a memory unit without taking the appropriate static precautions. As always, though, everything you try from this article is up to you and you take your own risks.

KIVILCIM Hindistan works as a full time computer security consultant with a CISSP, using Linux and Free Software as weapons of choice.

Return to

Sponsored by: