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.

Thank you ++

It works perfect.. ASustek board need MS for Biosupdate, but i use Linux only ..;-)

No love here

The main problem is that vendors are still paying blind homage to Windows.
It's like religious zealots or something. Why are we stuck in this sorry f'ing state?

back to this topic....
Here's what I've tried:

Did the cd burn thing (what a waste of plastic)
the cd booted but said "could not find command interpreter" or close
(sorry it was late last night and I was f'ing fed up)
I looked in config.sys (damn, remember this file?) and there is a line
SHELL=\COMMAND.COM (other shite options here)

Also tried dd if=FDOEM.144 of=/dev/sdc1

Nothing worked, I think my box needs a BIOS update for this to work, oh wait, I am trying to update the BIOS. Gee thanks vendors.

I wish a rich person would start a real OpenHardware initiative, I would buy that stuff. Open video cards, open mobos, open north/southbridge, etc., etc., etc.
It's the year Twenty-Ten and we are stalled.

WILL ALL THESE WORK with

WILL ALL THESE WORK with 64-bit Linux?

open hardware

by computer from china, bios is open source, impossible to install windows. Richard Stallman own one of them.

Worked Like a Charm

Just updated the BIOS on an ASRock 4CoreDual-VSTA (http://tinyurl.com/create.php) with their latest (http://tinyurl.com/ylladky) using my Ubuntu 9.04 machine to create the bootable update CD. Thanks!

good instructions

Very clear instructions: worked fine - updating BIOS for Albatron KI690-AM2 (from 1.00e to 1.07) the BIOS now runs my AMD BE-2400 at the correct frequency now! Many thanks, would've taken ages to figure all this out.

Problem with version?

I tried this, but when I run the software to update te BIOS, it says that "it cannot be run in MS-DOS mode"....

Mi PC is a MSI Wind U120 netbook, the utility for updating the BIOS comes from the vendor itself.

Any ideas?

Thanks in advance.

Cheers!

Your bios utility is Windows

Your bios utility is Windows based, so it can't be used in the procedure described in the article.

Also mine utility.. goddamn

So what can I do now ??

I guess you're out of luck.

I guess you're out of luck. You'll probably need to install Windows, at least temporarily. Or try to find some live bootable windows DVD, I hope something like that does exist?

And don't forget to complain to your MOBO manufacturer... ;)

Success

Worked like charm!
Thanks a million!

question

I need help!!

This worked great for me up until the very end. After generating the ISO image (using genisoimage) and writing it to disk I tried booting and it didn't work (error: command.com not found). After rebooting in Linux I looked at the top directory of the CD and found two files: boot.cat and fdoem.144

I was under the impression that the files should all show up in the top directory the way they did when fdoem.144 was mounted to /tmp/floppy... is that right?

I tried loop mounting bootcd.iso to /tmp/floppy the same way, and found the same two files.

I'm using Ununtu 8.10. My motherboard is almost 10 years old (Asus A7V133), so that may be the issue.

Any help would be appreciated. Thanks.

Check those after writing BIOS

1. If machine trying to start and stop in short intervals, unplug the power, open the case, take out the battery, wait a little bit, then put it in again and start. This way, you can see the newly installed BIOS.
2. Gigabyte owners check owners manual. They have ezflash facility. Download BIOS update files, write them to the vfat formatted flash disk and shutdown. Select at the beginning to enter ezflash. Point flash and you're good to go.

flashROM & friends

I'm sure the (various) posters intension's are well-meaning, but to a **non-expert** the various sets of flashing-instructions are mostly babble.

Given the risk & extreme costs of mobo-BRICKING, only a bullet-proof bios-flashing scheme is of value to the vast majority of those who could profit from a bios update.

How bullet-proof? Say ... a standalone native Ubuntu-app displaying a single GUI-button labeled . Hellesbelles if UBUNTU OS can query-hardware on install and auto-configure the entire OS to function with that hardware it seems plausible < to this longtime, but casual Ubuntu lusr > for firmware BIOS to be treated the same way.

Bulletproof updates are impossible

If power fails during a write or erase, you need a second BIOS chip (DualBIOS etc.) or some other hardware-based recovery technology.

Usually people update their BIOS for fun and they deliberately risk their boards, only to complain if something goes wrong.
However, if an update is made available to fix/supply a feature that was promised on the box, many jurisdictions give you the option of either asking the vendor to do the upgrade for you free of cost (after all, the vendor sold a feature that needed fixing) or updating yourself and having the vendor recover for free if it goes wrong.

But "extreme cost"? Come on. Worst case is you send the mainboard to a specialized flash recovery shop and they repair it for $20 or less. If you live in a poor country, you can probably get that service for $5.

"valuing" failure

I'm afraid you do NOT value bricked_board failure correctly. I start with functioning hardware/software ... and end with nothing. That's a (current) loss of complete system value. What may happen in the obscure future has no-current-value. It's that TOTAL LOSS that inhibits me from flashing. Almost everything vs nothing. Can't get more risky then that!

It's a profound and telling weakness in Linux-as-usrland OS that such a risk has NOT been systematically addressed ... as has OS installation, hardware recognition and update.

The same problem exists on DOS/Windows/Linux/MacOSX/...

The risk of failing flash is not a Linux problem. No flashing software out there can guarantee a working update (regardless of the operating system you use).

Without recovery features in hardware, you can complain as long as you want, but some updates are still going to brick your mainboard. If you want to be 100% sure you don't get a brick, buy a mainboard with two BIOS chips. It's that simple.

You wrote:
"It's a profound and telling weakness in Linux-as-usrland OS"
Well, it is a profound and telling weakness of most mainboards out there. The web is filled with reports about bricked machines, and it happens with all operating systems and all flashing programs.

You wrote:
"It's that TOTAL LOSS that inhibits me from flashing."
Good. If you can't deal with the risk of flashing, just don't flash and let someone else (repair center maybe) perform the BIOS update instead.
I will never understand why people want to update their BIOS if they can't handle the risk. Would you change the settings of the ABS (anti-lock braking system) in your car and accept the risk that braking may fail (total loss) due to your changes? Probably not. Would you drill your own teeth instead of going to a dentist? Probably not. Still, people insist that they should be allowed to do anything with their computers and that it should always work perfectly with no risks.

BIOS update tools are there to make it easier for people to reflash their BIOS, but these tools can't make it 100% safe.

hp laptop bios upgrade

I have sp42153.exe to flash my hp notebook PC. I have only ubuntu. I tried unetbootin to have bootable freedos. But it hangs at initdisk. Also I dont know what files to run from sp42153.exe even if I become successful in booting freedos. Can somebody help me? Thx

You need to use a Windows Based PC

You need to get on a Windows based PC and extract the major files with-in the self extractor. Then you should find HPQRUN.EXE in there along with the other files. Copy those on to your disk and run it in your initdisk.

flashrom

I just tried flashrom on an MSI motherboard, it is just great!

Here is a typical session, back up your current bios:

# flashrom -r current_rom.img

flashrom v0.9.1-r710
No coreboot table found.
Found chipset "Intel ICH7M", enabling flash write... OK.
This chipset supports the following protocols: SPI.
Calibrating delay loop... OK.
Found chip "Macronix MX25L4005" (512 KB, SPI) at physical address 0xfff80000.
Reading flash... done.

You now have 512 KB image of the rom. (BTW the exact same image is suplied by MSI with the DOS based firmware update tools.)

So you once you are confident that the firmware images suplied by your vendor are 1-1 copy of the rom you could use flashrom.

Which is probably safer than these DOS based firmware tools...

Cheers.

You don't mention what

You don't mention what happens when you follow the instructions in the original article?

But, even before that, check that your exe file is a DOS flash program, and not Windows based! Because if it's the latter, I'm afraid it can't possibly work and you'll have to either find a DOS based program for your notebook, or install Windows and flash from Windows.

I didnt complete the steps

I didnt complete the steps mentioned in the original article as I was getting errors in some of the steps. I know the .exe is winflash.exe file. I need to scratch it and install windows vista again as I didn't do dual booting earlier. I thought I can skip that process. So it appears there is no easy way to apply winflash based bios upgrades from linux?
Thx

I'm afraid not, winflash

I'm afraid not, winflash based bios update can only be run from Windows. Sorry...

If your netbook is still under support, you could contact HP and ask for help, I guess. It would be interesting to see their reaction.

I remember having trouble with HP notebook, contacting support, but the guy over there didn't have a clue how to help me. Few days later bloody thing completely died. Fried motherboard they said, and eventually local support replaced it in 7 days. Happy end, I guess. :)

A winflash utility (*.exe)

A winflash utility (*.exe) can usually be extracted like a zip file(in linux).
usually there is the flash (*.fd file) in the mix

You can use a various dos based flash programs to with that file.
hope that helps.

Try UNetbootin using these

Try UNetbootin using these instructions.

out of space cant start over?

I created a boot image and it works.
Now I want to create a separate different boot image and it keeps on telling me I am out of space.
How do you clear out the old to make room for the new??

cp: writing `/tmp/floppy/ep43ds3l.bin': No space left on device

Well, either delete files

Well, either delete files you've added, and put new ones instead, or just start from scratch.

Flash Bios under Linux w/Floppy Drive HP Pavilion ze5400 Laptop

I realize this thread is devoted to flashing the bios on machines w/o floppy drive but I've seen a lot of confusing stuff out there on the topic of flashing a bios under Linux and wanted to say that its an easy process with a floppy.

I downloaded HP's bios flash utility to my HD on a Windows PC, created the flash utility floppy, booted the HP Pavilion ze5400 Laptop with the flash utility floppy and it flashed the bios beautifully.

AND no Windows/DOS

This thread is also about not having Windows/Dos.
It's not all of us who have access to a Windows machine, especially late at night, when (at least I) usually does these kind of things.. ;)

Flashrom, a Linux utility for flashing your BIOS (or NIC, or...)

Hi,

please consider trying/using flashrom for flashing a BIOS next time. This is a native, open-source Linux and BSD command line utility, no need to mess with floppies or CD-ROM drives, or DOS... You can even flash your BIOS via ssh whenever you like. Packages are available for Debian, Ubuntu, Mandriva, Fedora, and some more distros.

Additionally, flashrom also supports a growing number of "external flashers", such as NICs (3Com right now, more will follow), NVIDIA graphics cards (patch is on the mailing list), SATA controller cards, and many more.

The full list of supported devices is available from:
http://www.coreboot.org/Flashrom#Supported_devices

Uwe.

flashrom failure "cost"

What is the "cost" of a failed BIOS_flash using flashrom ? Is the mobo nominally "bricked" ?

Uwe, thank you for your

Uwe, thank you for your contribution.

While flashrom is definitely the future, I think the simple cookbook I provided will still be useful for many years to come. There are two reasons for that. First one is that there's so much bios devices out there that it is close to impossible to support well all of them. Last time I looked at flashrom neither my desktop nor my laptop had support for them. And they're both not so young, especially the laptop. The second reason is even more important IMHO. When you try some unfinished software product, it may segfault, it may corrupt some of your files, it may even crash the OS. But if flashrom fails, well, you'll immediately brick your hardware (motherboard), make it unusable and that costs $$$. So if you make a mistake, you'll have to pay for it, real money (and time).

In that regard, some of the bravest and luckiest (with support for their flash chips already built in flashrom) will have great fun and success using flashrom, but for the others who are either more cautious or don't have a choice really, this page remains the only solution. Looking at the other comments, I'm so glad it helped so much people and worked flawlessly for them.

Additionaly, this flashrom

Additionaly, this flashrom error shows how picky flashrom is even about the kernel it runs on, so the procedure is actually more complicated when using flashrom (I'd need to recompile my kernel first, and I don't like that):

flashrom v0.9.1-r706
Error accessing low megabyte, 0x100000 bytes at 0x00000000
/dev/mem mmap failed: Invalid argument
In Linux this error can be caused by the CONFIG_NONPROMISC_DEVMEM (<2.6.27),
CONFIG_STRICT_DEVMEM (>=2.6.27) and CONFIG_X86_PAT kernel options.
Please check if either is enabled in your kernel before reporting a failure.
You can override CONFIG_X86_PAT at boot with the nopat kernel parameter but
disabling the other option unfortunately requires a kernel recompile. Sorry!

Should work now

The Linux kernel has a memory validation bug which caused these aborts only on some machines. It had nothing to do with DEVMEM or PAT, and it didn't happen on any developer machines even if they had the same mainboards as people who got the error.

Latest flashrom (revision 889 and later) has a workaround and our testers confirm it works fine for them. No kernel recompile necessary. Besides that, there's always the option of using one of the Linux+flashrom Live CDs.

It worked!

It worked! I was able to upgrade the BIOS of my Dell D630 from A15 to A16 (using D630_A16.EXE) from under Ubuntu 9.04. Thank you for your detailed instructions!

no floppy drive

Hi his is almost what I need but I don't have a FDD is there a way to write this to a flash drive.

Thanks
Steve

FDD image on USB stick

I just did that using dd to write the floppy image to the stick. In my case:

sudo dd if=FDOEM.144 of=/dev/sdc

The stick booted fine.

.b.

ASUS P4S8X-MX update successful.

Very good job.

Keep on rockin' !

Thanks.

It has worked!

I did all the steps. I have a pen-driver so the DOS called it C:. using that it was possible to backup the old ROM.

Thank you

Thank you for cutting to the chase with this article and making my bios flash process a seamless one. For my manufacturer, I also had to install wine to get the files out of the self-extracting EXE, but other than that I was able to follow your guide to the letter... this couldn't be easier. Thanks a million!

One more step: clear the cmos

I followed the instructions and everything went perfect: Flash and reboot, linux came right up. Then I turned off the power to install the 1TB disk I needed the upgrade for. 5 beeps when I turned the power back on. (OMG I killed it).
I found that on this computer (tyan k8w) I had to clear the cmos by unplugging the power supply from the mother board and changing a jumper setting for 10 seconds. conclusion: don't panic.

The FDOEM.144 image DOES NOT BOOT

Twice I've created CD's following the original instructions to the letter and the CD won't boot, goes right to the GRUB menu.

I had more success with the more detailed instructions which included SYSLINUX/ISOLINUX on a 2.88 Meg image, but ran into
an error loading boot.img .

To be clear, for some reason

To be clear, for some reason the iso image is larger than 1.44 Meg, even though the contents of the file system with FreeDOS and the BIOS update is about 635K, and I can see it in the image (FDOEM.144).

ll /tmp/floppy
total 645
7 drwxr-xr-x 2 root root 7168 1969-12-31 19:00 ./
0 drwxrwxrwt 13 root root 300 2009-04-16 03:07 ../
1 -rwxr-xr-x 1 root root 67 2004-02-22 09:16 autoexec.bat*
516 -rwxr-xr-x 1 root root 528384 2009-04-16 00:43 BDLCX_14.exe*
65 -r-xr-xr-x 1 root root 66090 2003-12-10 06:49 command.com*
1 -rwxr-xr-x 1 root root 52 2004-02-22 09:17 config.sys*
45 -r-xr-xr-x 1 root root 45562 2005-07-18 19:58 kernel.sys*
2 -rwxr-xr-x 1 root root 1486 2004-02-22 11:50 readme*
10 -rwxr-xr-x 1 root root 9221 2005-07-18 19:58 sys.com*
root@dell566:/opt/BIOS upgrade # du /tmp/floppy
645 /tmp/floppy
root@dell566:/opt/BIOS upgrade # du -h /tmp/floppy
645K /tmp/floppy

/BIOS upgrade # ll
total 3888
4 drwxr-xr-x 3 dbrazziel dbrazziel 4096 2009-04-16 00:52 ./
4 drwxr-xr-x 3 dbrazziel adm 4096 2009-04-16 00:04 ../
520 -rw-r--r-- 1 dbrazziel dbrazziel 528384 2009-04-16 00:04 BDLCX_14.exe
1796 -rw-r--r-- 1 root root 1835008 2009-04-16 00:52 bootcd.iso
1444 -rw-r--r-- 1 dbrazziel dbrazziel 1474560 2005-07-18 19:53 FDOEM.144

fdos.org FDOEM.144 is outdated, from 2007

Hi, the FDOEM.144.gz file you mention is from 2007, better try something newer, like the FreeDOS diskette downloads on rugxulo.googlepages.com ... Or of course try to make the fdos.org people update the file there.

Thanks!

I upgraded the memory on my Dell laptop (Inspiron 5100) but needed to flash a new BIOS version for that. Dell, of course, only provides a MSDOS/Windows exe. Didn't think it safe to do it under Wine. This did the trick. Thanks!

Success with Abit iL-90MV

Brought my Abit iL-90MV from BIOS 1.1 to BIOS 1.4, following your instructions to the letter. Everything went without incident - absolutely foolproof.

Thank you very much!

I didn't use this tutorial -

I didn't use this tutorial - and do it the same way - but if i found it before, it will take me much less time - it's good how-to. I've upgraded bios on my old ASUS P6000 this way - and it works!

it works

I updated the BIOS on my Dell Latitude D630.

It works! I upgrated my Asus

It works! I upgrated my Asus P5B Deluxe without problems!

Thanks!

very good guide

This is a very good guide, thank you. I successfully upgraded the BIOS on my new nVidia motherboard today hoping to resolve some ACPI issues. Your guide is perfect, my bootable CD worked just like a floppy, with the exception that it is read only so that the old BIOS could not be saved to it. The motherboard's ACPI implementation is still non-compliant and annoying :-) But I have a small collection of dos programs intended to run from floppy and a few of them are still useful so this is very useful experience and knowledge.

turn off high memory!

I was having a heck of a time with this. I even gave up about a year ago. Then I came back to it today and finally figured it out.

This is an excellent set of instructions. It all works. My only thing to add - the hitch that held me back - was this:

You have to --in freeDOS-- say NO to all the expanded memory options, 386, all that stuff! This is very important because if you say Yes (which is the default) then you will get a protected mode error and get nowhere with the BIOS flashing.

I think this is a really important point to make and perhaps should even be noted in the main article. A lot of people like me who aren't familiar with the command line and nuances of DOS (or freeDOS) memory management are not going to know that you MUST say NO to the default options presented when you boot this freeDOS image. I am quite relieved now that I've finally figured it out. But I was really banging my head against a wall and giving up hope until I finally decided to look into the "protected mode" error I kept getting.

Thanks for the article! For the record, I agree the title is a little deceiving because the guide requires leaving Linux to flash the BIOS. However, its a very useful guide and there probably isn't any realistic way to flash the BIOS from within Linux (I was really looking hard and tried many other ways that didn't work before I figured out the protected mode problem) so it's a great way to do it with free software and 95% Linux.

abit fatality fp-ing success!

This worked perfectly to upgrade my Abit Fatality FP-ING SLI motherboard from bios 12 to bios 16.
This has now given me 45nm. process technology support and I am now running the Intel Core 2 Duo Wolfdale processor at 2.66GHz.
I have a second Abit motherboard to upgrade soon...
Great work-thanks!

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. :(

The following is a brief

The following is a brief outline of how I created a 4MB CD boot image to update the bios on a motherboard I have been considering buying.
I do not have this motherboard, but I have tested the bootable CD up to the point of actually flashing the bios.
FWIW, my computer runs PATA / IDE HDs and optical drives. Not SATA.

Adjust accordingly to your distro, hardware, etc.
I'm human, and make typos on occasion. So double check your input.
(Also, CD-RWs are great to practice on :D)

This is a compilation of various web pages, including the following:
http://www.tuxrocks.com/Projects/CDProject/
http://members.chello.at/bobby100/ILpart1.htm
http://afs.caspur.it/afs/italia/project/bigbox/e4/x86_64/latest/isolinux/isolinux.cfg
http://ubuntuforums.org/archive/index.php/t-19428.html
And this one, of course :)

1. Create and cd to ~/bootcd

2. Download and gunzip FDOEM.144.gz

3. Create ~/bootcd/floppy

4. Loop mount FDOEM.144 and copy the loop mounted files to ~/bootcd/floppy
# mount -o loop -t vfat FDOEM.144 /mnt/floppy
$ cp -r /mnt/floppy/* ~/bootcd/floppy/

5. Unmount FDOEM.144

6. Create empty 4MB image: (Or whatever size you need.)
$ dd if=/dev/zero of=disk.img bs=1M seek=4 count=0

7. Create a DOS file system on the empty 4MB image
$ mkdosfs disk.img

8. Insert the FDOEM.144 boot sector into the 4MB disk image
(copy the 446 byte boot code from the 1.44MB floppy image.)
$ dd if=FDOEM.144 of=disk.img bs=1 count=446 seek=62 skip=62 conv=notrunc

9. Loop mount the 4MB image:
# mount -o loop -t vfat disk.img /mnt/floppy

10. Copy files from ~/cdboot/floppy to /mnt/floppy
# cp ~/cdboot/floppy/* /mnt/floppy/

11. Copy required BIOS files to /mnt/floppy
# cp DP0507C.BIO /mnt/floppy
# cp IFLASH.EXE /mnt/floppy

12. Unmount the 4MB image

13. You may now need to install the 'SYSLINUX' package for your distro, or download the tarball from:
http://syslinux.zytor.com/wiki/index.php/Download
I used the Ubuntu-8.04.1 package, and it seemed to work OK for this purpose.

14. Copy isolinux.bin to ~/bootcd
$ cp /usr/lib/syslinux/isolinux.bin ~/bootcd/

15. Copy memdisk to ~/bootcd
$ cp /usr/lib/syslinux/memdisk ~/bootcd/

16. Create ~/bootcd/bootmsg.txt
$ nano bootmsg.txt
$ cat bootmsg.txt

BIOS Update

17. Create ~/bootcd/isolinux.cfg
$ nano isolinux.cfg
$ cat isolinux.cfg

default Bios
prompt 1
timeout 1800
display bootmsg.txt

label Bios
kernel memdisk
append initrd=disk.img floppy c=10 h=64 s=32

18. You may now delete or move FDOEM.144 and ~/cdboot/floppy
$ cd ~/cdboot
$ rm FDOEM.144
$ rm -r floppy

19. Your ~/bootcd directory listing should now look something like this:
$ ls -al ~/bootcd
total 7728
drwxr-xr-x 2 username username 4096 2009-01-01 21:25 .
drwxr-xr-x 23 username username 4096 2009-01-01 21:21 ..
-rw-r--r-- 1 username username 12 2009-01-01 21:19 bootmsg.txt
-rw-r--r-- 1 username username 4194304 2009-01-01 21:20 disk.img
-rw-r--r-- 1 username username 14061 2009-01-01 21:25 isolinux.bin
-rw-r--r-- 1 username username 143 2009-01-01 21:20 isolinux.cfg
-rw-r--r-- 1 username username 20068 2009-01-01 21:21 memdisk
$

20. Create ISO image:
$ cd ~/bootcd
$ genisoimage -o cdproject.iso -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table .

21. Burn ~/bootcd/cdproject.iso
(Remember to adjust these options to your distro and hardware accordingly.)
$ wodim -v -dao -eject speed=2 driveropts=burnfree dev=/dev/scd1 -data cdproject.iso

22. Boot from CD and test.

End of proceedure.

HTH

has anyone tried this?

i am having the problem that the upgrade doesn't fit on the small boot image. has anyone tried the method above? does it work?

Use the swap partition

You can temporarily format your swap partition as FAT, place the "big" files there and boot with a plain FreeDOS floppy/DVD...

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.

nice. flashrom worked

nice.

flashrom worked beautifully. i had a similar deal. computers on mountaintops that i needed to flash remotely.

U could just use WINE

U could just use WINE

You CANNOT just use wine (for

You CANNOT just use wine (for now, at least): wine can't access to protected bios area.

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!

perfect howto, and great hint

perfect howto, and great hint with the dd and usb-flash drive!

i have just upgraded my abit a-n78hd bios and am really lucky everything worked fine...

:):):)

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.

"SU -"?

"SU -"?

[~]% SU - zsh: command not

[~]% SU -
zsh: command not found: SU
[~]%

Try this: /sbin/modprobe

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

I think you are totally

I think you are totally right here

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 ?

I tried to do this last

I tried to do this last month : ) It fails for sure.It is better to update via floppy/cdrom/2nd hdd if bios supports that or you could try the author's way.

I also tried it but it does

I also tried it but it does not work.

being specific = being helpful

Did a specific command not work? Did burning the iso not write to the CD? Did it brick your bios? Was it a FreeDOS compatibility issue with your brand of motherboard? Writing "doesn't work", doesn't help.

Note that this is a good article because it's specific and informative, even if it didn't work for *you*. The author did a good job explaining everything. Unlike your comment.

Thank you, Admin, for spending your time to write something that helps people even when they are ungrateful.

good for the technically aware hobbiest

Gents:

For the technical minority this BIOS-flashing discussion evidently is useful. It assumes proficiency & claims nothing else. Fair enough. However for the casual Linux lusr with **no interest or skill** in admin matters the explanations might just as well have been written in CHINESE. Surely it's better to light-one-candle ... just remember the infinite darkness.

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. :)

CD media is read-only, virtual guest environment is not.

Since the bios flash utility, needs to do a write of the saved "actual bios code", maybe a CD is not that suitable.
I was thinking of a host virtual engine on linux, running a dos guest operating system, of course in a small configuration for this purpose.

Did somebody tried to flash the bios using the http://prdownloads.sourceforge.net/dosemu/dosemu-1.4.0-1.i386.rpm from http://dosemu.sourceforge.net?