home projects speaker

how to flash your bios from linux with no dos/windows or no floppy drive

Note

Please note that this is an archived post, so links, code and the communicated message might be outdated. YMMV

This is a simple how to that I picked from the web, I take no credit from this guide, give the credit to the guys from LinuxInsight.com that wrote it!

Step 1: Download FreeDOS boot disk floppy image

FreeDOS, a free DOS-compatible operating system, is up to the challenge, no need for proprietary DOS versions. So, all you need is a bootable floppy disk image with FreeDOS kernel on it. 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. You can also find a local copy of this image attached at the end of this article. 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 a random 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

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

Finally reboot your machine, make sure that your CD drive is first in the boot sequence, and then run your BIOS upgrade procedure when the CD boots.

WARNING: Flashing motherboard BIOS is a dangerous activity that can render your motherboard inoperable! While the author of this article has successfully run this procedure many times, your mileage may vary. Be careful!


About the author

Hi! My name is Alexander, and I am a creative frontender, specializing in UX, accessibility, universal design, frontend-architecture, node and design systems. I am passionate with open source projects and love to dabble with new emerging technologies related to frontend. With over 24 years of frontend experience, I have earned the right to be called a veteran. I am a lover of life, technologist at heart. If I am not coding, I am cooking and I love whisky and cigars. Oh, and coffee, I LOVE coffee!

If you want to know more about me, here is some links you might want to check out: GitHub, Instagram, Twitter, LinkedIn, CodePen, Slides.com, npm,

Speaker

I am also an avid speaker on several topics! Check out some of the things I speak about, and contact me if you are interested in having me at your next event!