Kroon Information Systems
       
    
Howto: Linux BIOS update

Last updated 5 July 2012

Introduction

Many companies (Toshiba in my caes) only ship their updates for Microsoft Windows. As an alternative they provide a "traditional" update method where you write an image file to a floppy disc, and boot that. This is a good alternative for some non-Microsoft Windows users, but what happens if you don't have a floppy drive?

Bootable CDs

All of us have used these, most modern operating systems comes with a bootable CD which one can use to bootstrap an install. Most bootable CDs are in fact eltorito boot CDs. These CDs emulate booting of a floppy by taking a 1.2MB, 1.44MB or 2.88MB image file and loading that into memory as if it is the "A" drive. Litterally the BIOS takes this image and "connects" it to the floppy drive, any calls to the BIOS now requesting data off the floppy will get this image now instead. Or at least, that is my understanding. Installation CDs usually contains drivers for CD-ROMS in this area and will load the remainder of the installation from the CD. The plan is to use this feature to fool the BIOS upgrade program into thinking it's booting from a floppy disc.

Preparing the image

Toshiba allows one to download the updates as a zip file. Inside this zip file one finds a self-extracting archive. Very nasty, since this self-extracting archive also happens to be a .exe file. Upon closer inspection this turns out to be a self-extracting zip file. Right, so one unzip the exe and end up with a .ima file. Running file on this file informs us that this is what we are looking for (line breaks added for readability):

$ file tbios150.IMA
bios150.IMA: x86 boot sector, code offset 0x3c, OEM-ID "*-v4VIHC",
root entries 224, sectors 2880 (volumes <=32 MB) , sectors/FAT 9,
serial number 0x2a876ce1, label: "           ", FAT (12 bit)

Whilst you may not be using a Toshiba product, other manufacturers may (or may not) have similar misconceptions about their software distribution (meaning they provide an alternative method of updating the BIOS that does not require one to be running Microsoft Windows but yet they rely on having Microsoft Windows to extract these alternative methods...). Either way, whatever it takes, get hold of this image file. It will always be exactly one of the sizes mentioned previously.

How to make an eltorito bootable CD image

I use the "mkisofs" command to do this, it's a very straight forward program to use. One thing to be sure of is that the image file must be included as part of the CD. This is presumably why it's always possible to find some kind of .img (or similar) file on bootable CDs. Also, the path to the eltorito bootable image must be relative to the CD root path. The simplest is to create an empty directory and place the image file in there, from that same directory execute something like:

$ mkisofs -rJ -o bios_update.iso -b imagefile .

More specifically, in my case I used:

$ mkisofs -rJ -o bios_update.iso -b bio150.ima .

Which successfully created a bootable cd image.

Writing the CD and booting it

You can write the CD using any method that supports writing .iso files, I personally use cdrecord, something like:

$ cdrecord dev=0,0,0 -vv -dao bios_update.iso

Note that I use scsi emulation on my cd writer. After this simply boot the CD and your BIOS updates will be performed as if you booted of a floppy disc.