BIOS Flashing From Linux

From Hack Sphere Labs Wiki
Revision as of 19:11, 19 January 2012 by Webdawg (talk | contribs) (Created page with "Step 1: Download FreeDOS boot disk floppy image We are fortunate that guys at FDOS site have prepared one suitable for us. Use the OEM Bootdisk version, the one with just kernel ...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Step 1: Download FreeDOS boot disk floppy image We are fortunate that guys at FDOS site have prepared one suitable for us. Use the OEM Bootdisk version, the one with just kernel and command.com, because it leaves more free space on disk for the flash utility and new BIOS image. After you download the image, you need to decompress it. In other words:

wget http://www.fdos.org/bootdisks/autogen/FDOEM.144.gz
gunzip FDOEM.144.gz

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

Requirement for this step is that you have support for the vfat and loop file systems in the kernel. Or you can have those features compiled as modules. In the latter case, load the modules before the next step, like this.

modprobe vfat
modprobe loop

Consult /proc/fileystems to see if you have the needed file systems supported. If you do, you should be able to "loop mount" the floppy disk image to some temporary path:

mkdir /tmp/floppy
mount -t vfat -o loop FDOEM.144 /tmp/floppy

If the mount went without errors, copy BIOS flash utility and new BIOS image to the mounted floppy disk image. You'll probably have to unzip the archive you downloaded from your motherboard vendor site, to get to those two files. Here's just an example for my motherboard (in your case, files will have different names, of course):

# unzip 775Dual-VSTA\(2.60\).zip
Archive: 775Dual-VSTA(2.60).zip
 inflating: 75DVSTA2.60
 inflating: ASRflash.exe
# cp 75DVSTA2.60 ASRflash.exe /tmp/floppy

Doublecheck that everything went OK, that those two files weren't too big for the floppy:

Filesystem           1K-blocks      Used Available Use% Mounted on
/tmp/FDOEM.144
                         1424       990       434  70% /tmp/floppy

Finally, unmount the floppy disk image:

umount /tmp/floppy

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

Next step is to burn the floppy image to a CD/DVD-RW media, but in a way that it can be booted afterwards. First we need to make a bootable CD image, and then burn it. Notice that on some modern distributions, cdrecord is renamed to wodim, and mkisofs to genisoimage, but the parameters below should be the same.

mkisofs -o bootcd.iso -b FDOEM.144 FDOEM.144
cdrecord -v bootcd.iso