How to flash motherboard BIOS from Linux (no DOS/Windows, no floppy drive)?

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's 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...

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 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

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!

AttachmentSize
FDOEM.144.gz107.22 KB

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Thanks!

You rock!

This procedure saved me a ton of time. Fantastic!

Two questions

1. My files doesn't fit within 1440kB. Can I make the image larger?
2. Is it possible to make a bootable usb by do a "dd if=bootcd.iso of=/dev/sdb"? (/dev/sdb is my usb stick)

Thanks in advance
Mats

You can try with 2880kb,

You can try with 2880kb, depending on your DVD device and/or BIOS, it just might work.

Thanks, but 2880k is also

Thanks, but 2880k is also too small. :(

Wow, thank you. This was

Wow, thank you. This was really helpful! I didn't really fancy having to install windows to upgrade.

I have followed your instructions and all went well.

Thank you again.

how do you do this???? it doesnt say?

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

how do we get that information? what command do we need?

df /tmp/floppy is the magic

df /tmp/floppy is the magic incantation. Check that it isn't at 100%. Also be sure that you haven't got any errors in the process (disk full or similar).

This is important because you don't want flashing process to stop because your bios update is not fully written on the floppy. Most flash programs nowadays are clever to avoid that mistake, but you can never be too much cautious.

Every time I decide to update my BIOS, first thing I do is try to remember how much my MOBO cost, then check if I have enough money on hand to go buy another MOBO right away if something goes wrong. ;)

flashing BIOS directly from linux

I've written notes on flashing the BIOS directly from linux.
This has the large advantage of being able to update the BIOS remotely,
and not mess around with boot media.

U could just use WINE

U could just use WINE

Instad of writting to CD,

Instad of writting to CD, image can also be written to USB flash drive with "dd if=FDOEM.144 of=/dev/MyUsbDevice". Set BIOS to boot from USB (USB-ZIP) and You will be able to backup Your existing BIOS to disk.
WARNING - dd will erase ALL data on target device! Double check of= parameter before running it!

Can't Get past Step 2

Currently running Fedora 8. I performed step 1 and got the file unzipped but could not get the "modprobe" command to work in Step 2. Message shows "command not found" The ETC directory shows two relevant files: modprobe.d and modprobe.conf but modprobe isn't there. How can I run the modprobe command to load vfat and loop into my kernel? Your help is greatly appreciated.

John D.

Try this: /sbin/modprobe

If it works, it means you just don't have /sbin in your $PATH.

I just want to add to the

I just want to add to the comments. A really clear (can't understate how valuable that is) how-to for helping people get out of the problem of bios flashing. Works really well. However, you may want to save a copy of "FDOEM.144" if you intent to do some more flashing.

excellent !!! thanks a

excellent !!!
thanks a lot

Dimitri
Greece

Thanks !

Thank you, this page is exactly what I needed. I knew about freedos but did not know how to make it into a bootable CD.

In the past I've booted freedos images using either syslinux (on USB sticks) or pxelinux (booting from network). In both cases this used 'memdisk', which is shipped with isolinux and provides a virtual floppy drives from the image contents. But on that one machine, the bios did not know how to boot from USB and the flash program was somehow incompatible with memdisk... I got stuck for a couple hours until I found your page.

Thanks !

Consider using LinuxBios

Consider replacing completely the bios with free software, and using LinuxBios. See http://www.linuxbios.org/.

My BIOS updater said it

My BIOS updater said it needed MS-DOS ;_;

Lifesaver

Can't thank you enough for writing this page. Cheers!

And windows only firmware updates, e.g. from LG?

LG ships windows only firmware updates for their CD/DVD drives -
despite of selling an ATA drive with no mention of any requirement for M$ crap!

A case for a consumer class action?

I agree, this is a very very

I agree, this is a very very useful utility.

The title is not at all misleading - Most of the folks search for a way to update BIOS when they are running *nix.

Thanks

This is a VERY useful utility. If it wasn't for this post, I wouldn't have known about it otherwise, thanks much for this.

If I update BIOS does it wipe my HDD too?

If I go ahead and update my laptop's BIOS, will I have to do an OS re-install too? (Ubuntu Linux, fyi).

BIOS update

No, installed OS is not affected with a BIOS update. Well, you theoretically could have some trouble after the BIOS update if some feature in the new BIOS is incompatible with your setup. But that is VERY unlikely, so IMHO you can effectively ignore that outcome.

OTOH, BIOS update is dangerous because of some other things. Namely, if anything goes wrong during the update process (you lose power or similar) you will finish with a broken motherboard, and thus your computer will become completely inoperable (even though the OS itself is not affected). Same thing would happened if you flashed the wrong BIOS file (I did that once, and yes, the next thing I was doing was searching for the new motherboard :)).

Finally, this whole procedure is dangerous because FreeDOS is used instead of the "official" DOS OS. While FreeDOS is highly compatible, there's still a slight possibility of a bug that would make lots of trouble if it triggers during the update. So, use at your own risk!

And one other thing, because replacement of a broken laptop motherboard is few times more expensive than replacement of a typical desktop motherboard, you should be even more worried when you plan to flash your laptop.

But what do I do if I'm

But what do I do if I'm flashing to fix my keyboard? Can I automate this so that it runs the flash program on boot?

Hook up a keyboard that

Hook up a keyboard that works to do the flashing. Not that difficult of a problem.

Great mini-howto! I don't

Great mini-howto! I don't understand why others bash it -
while you are technically not flashing from linux, the target audience is those who run linux or some other unixlike os. I was just in this audience: no windows, no dos, no floppy drive. I roughly knew what to do, but did not know where to find freedos, rarely edited iso images, never burnt a bootable cdrom before, this article saved me a few hours of research and trial/error. Thanks very much!

Thank you very much!

This was a great article! It was exactly what I needed. I had to upgrade an old machine that did not have Windoze or a floppy disk. The information you provided saved me a trip to the computer store to buy the floppy, and a trip to a friend's house to make a Windoze boot floppy.

Linux is truly a great system. It is amazing what you can do if you have the know-how!

Another great tool for my Linux toolbox. Thanks again.

DB

Thanks!

Hey, DiscoBay, thanks for your comment. I'm very happy that the article helped you to do your job. That's exactly what I tried to accomplish when I decided to write on the subject.

As Linux gets more popular, more and more people will need tricks like this. At least until we achieve the World Domination(tm) and thus get to compile our own BIOS-es from source. ;)

Keep up the good work!

So FreeDOS is Linux?

So FreeDOS is Linux?

Of course it's not!

Like other people already noticed, why are some of you so picky about the correct wording? It's true that english is not my mother tongue, so it's slightly harder for me to compose completely correct sentences. I only tried to reflect my situation where I had linux (and only linux), had no floppy, and still wanted to flash my bios, nevertheless.

Yes, it's true that in the end you flash the BIOS from the FreeDOS, but why's that so important? Tell me, would people in my situation search Google for "freedos flash bios" or "linux flash bios floppy" instead? Also, if you look more closely, the whole procedure - except the very final step - happens at the linux prompt.

My sincere apologies if some of you were mislead thinking that you could flash your BIOS from a running Linux, I'm really sorry, this article is not about that. It should've been titled "How to flash motherboard BIOS when only OS you have installed is Linux (no DOS/Windows), and you don't even have floppy drive?", but I decided that it would be too long so I shortened it and made a mistake(?) along the way.

OK? Friends? ;)

I am not being picky about

I am not being picky about the correct words, I'm being picky about the things as they are.

Why it's that so important that in the end you flash the BIOS from FreeDOS? Because FreeDOS does all the work of flashing with the BIOS vendor flash utility, you didn't show us how to do it directly from linux.

If you read something like this "Build a High Performance Cluster with Windows (no UNIX/Linux)" and in the article it says download ClusterKnoppix or some other livecd cluster oriented distro. What will you think?

And english is not my mother tongue, as you may noticed.

Title is perfect! easy to do & well commented

Thank you very much - useful and informative

I just updated a Dell Dimension 4300 bios using a CD, and I learned a bit more command line stuff. The article helped me - it worked perfectly!

I'd like info re: usb stick booting.

David
*I only needed to change paths and sudo some commands. I am a linux novice, and this was very helpful.

THANKS! You can also use the 2.88Mb version

If you're making a CD ISO and have no need to "limit yourself" to the standard formatted floppy size of 1.44Mb, you'll have room for bigger files and/or more tools if you use the 2.88 version of FDOEM:

http://www.fdos.org/bootdisks/autogen/FDSTD.288.gz

BUT: be sure to disable UMB stuff on the 2.88Mb image

The FDSTD.288.gz "standard" image has a bunch of irrelevant (for THIS purpose) utilities, and IMPORTANT! uses UMB for lots of stuff, which you MUST NOT DO when updating BIOS.

Replace the config.sys on the "standard" 2.88 image with the 3-liner from the "oem" 1.44 image:

?DOS=HIGH
?DEVICE=\FDOS\HIMEM.EXE /VERBOSE
?DEVICE=\FDOS\EMM386.EXE /VERBOSE
?DEVICE=\UMBPCI.SYS
FILES=20
BUFFERS=20
!rem SHELL=A:\COMMAND.COM /E:512 /MSG /P
SHELLHIGH=\COMMAND.COM /E:256 /P

should become just:

FILES=20
BUFFERS=20
SHELL=\COMMAND.COM /E:256 /P

how to add ramdisk support?

how to enable ramdisk?
my flash program required writeable medium and i dont have fat/fat32 partition.

flashing bios with freedos

I used the "flash bios - the ubuntu way" howto that was based based on this page (hope i got it the right way round!) with my shuttle xpc and it worked perfectly. tried to do the same with my HP zv5000 BUT the bios file (with installer) was over 2.5m. tried with the 2.88 freedos but still not big enough seems i might have to extract the bits from the .exe or just make a bootable rom, anyway still can't flash.
Oh, did the UMB bit as well

any ideas?
cheers

btw may have used a derivative of this page but thanks anyway (for the xpc, at least)

If that's the case and you

If that's the case and you do have a floppy another way of doing this would be to use dosemu for creating boot floppy with bios update. A lot of vendors ship compressed floppy images as exe file (how to extract bios upgrade from there if not by using dosemu).

What I wanna know, would it be possible to create floppy image, insert boot menu to grub/lilo to boot from it and then flash bios? I mean, it can be done, but would it work?

Either way, there just isn't a way of upgrading bios without at least some kind of dos, whether it's M$ or some free version...

It's working but it's not a LINUX OS !!!!

A lot of people said yet this is a wrong way to say right things !!!
All the procedure is right and full functionally but it's not in LINUX OS but in FreeDos !!
Well Done surely !!!
Ciao !!!

funciona

si funciona, aunque tenia miedo al principio, pero todo resultó muy bien

gracias

It works

I don't own a floppy and haven't used Windows for several years. Thanks for the tutorial.

Many times over the years

Many times over the years I've gone to freedos.org looking to d/l a boot disk but for some reason they don't provide one even though for most people bios flashing is the only reason they'd need the project. I didn't know about fdos.org. Great tutorial! You might want to add something about doing this from a usb drive since it's a waste to use a cd for this (and I don't have cdrw discs).

Or use GRUB to boot floppy disk image

Don't know about USB sticks, but you can use GRUB to boot a floppy disk image from the hard disk.

very stupid

i wanna see how many morons bricks their machines...

An Observation

"..morons bricks..."

Anybody that would use such language and terminology are themselves most likely a moron.

Don't think so

I've just tested the procedure and updated my BIOS successfully - no problem at all. So, it actually works.

I've found elsewhere that the magic incantation to find your current BIOS version (without rebooting) is: dmidecode -s bios-version

Your comment is very childish, how old are you?

Thank you very much! I

Thank you very much! I purchased an Asus a8js yesterday, wiped off the Vista and linux. One of the things I wanted to do was update the BIOS but was having a hard time figuring out how. Your timely article helped immensely!

Wrong Topic

This is not flashing from Linux it is flashing from DOS without a floppydrive. The difference is that it's FreeDOS not MSDOS. Totally missleading topic.

Good enough for me

The title was misleading only to those who look for problems. I have Linux and I cannot flash my BIOS via conventional methods. The title of this article led me to it, and solved my problem. Any title that did not contain the term Linux would not have been found. You should be thanking the author, not crying about his title.

The title is NOT misleading,

The title is NOT misleading, to a Linux user. If you are a Linux user, the title communicates to you exactly what you need to know.

The author didn't focus on the details of the procedure steps when formulating the well-chosen title.

Yeah, I guess if you run a FreeDOS system (who does?), then you would have a right to complain that the title is totally misleading!

Topic just fine

It helped me find what I needed.

Total bullshit subject Title

I Agree!!!

Lame strategy to get digged!

What a moron!

anonymous cowards

Anonymous Cowards who blast this method should be shot.

this is a perfect resolution to people who aren't trapped in windows hell.

you can flash a motherboard from linux, without using your stupid windows tools, jerks.

he didn't do this to get dugg, he did it to help people.

Stop picking at semantics,

Stop picking at semantics, the topic was informative enough for me to understand what he was implying and direct me to his article. I found it informative and very helpful.

What's important is the fact

What's important is the fact that it helped me and I understood what to do. Not everybody is born is a native english speaker.

Thank you for this information.

This was something I hadn't thought about recently with updating one of my machines.It worked great! Thanks

Would anyone know what I should do about putting a BIOS update on a floppy that requires XP without using XP .Its for a HP 751n I only have access to Linux boxes.I dont know anyone with Windows anymore and if I asked I might get spit at.So,........?Anyone?

Or maybe a bunch or people could post irrelevant comments that are amusing to smirk at.Any idiots care to take me up on that offer possibly?

by Virtual machine ?

Is it possible to make the BIOS-update with a Virtual machine in Linux ?

Nope

It's a common misconception. All hardware in your virtual machine, including BIOS, is virtualized. So, you could only update your virtual BIOS that way, theoretically. But, I'm quite sure it's pointless and wouldn't work. :)