Saturday, November 21, 2009

Flashing BIOS in Ubuntu Linux without floppy

I was trying to update the flash BIOS of an old ECS K7SOM+, a 1 Ghz-era AMD Athlon motherboard. The problem is that most older motherboard flash upgrades are designed with a DOS bootable floppy in mind. I have no DOS, no Windows, no floppy drive, and no floppy disks. Fortunately, there's UNetbootin, a tool design specifically to make bootable USB flash drives from Linux. Here are the general instructions for Ubuntu Linux users:
  1. Use gparted to create a single FAT16 formatted partition on the flash drive.
    • You can install gparted using apt-get install gparted
    • You may need to first umount the USB flash drive before you can partition and format it.
    1. Use unetbootin to install a bootable FreeDOS onto the flash drive.
      • Install unetbootin using apt-get install unetbootin or read WestCoastSuccess' comment.
      • Run unetbootin and:
        • Select the distribution FreeDOS.
        • Select your USB flash drive
        • Click OK. This will download FreeDOS to create a DOS bootable flash drive.
    2. Copy your motherboard's BIOS update and flashing utility files into the root of flash drive. These files will be located in B: or C: drive when you boot into FreeDOS.
    That's it. Boot off your flash drive -- you may need to configure your CMOS setup to do so.

    Update 2010/01/02: Updated instruction as per WestCoastSuccess.

    18 comments:

    1. Thank you very much. Just what I was looking for.
      ..espen..

      ReplyDelete
    2. Many, many thanks for posting these instructions!

      A couple of things I suggest:

      - the USB drive must be unmounted prior to using gparted to reformat it (at least on my Ubuntu system, HAL automatically mounts USB drives upon insertion).

      - "sudo apt-get install unetbootin" did not work for me; nor did Synaptic list it in the repositories. Instead, I downloaded it from here:

      http://unetbootin.sourceforge.net/unetbootin-linux-latest

      - At this point, the USB drive needs to be mounted again. Simplest way is to remove and reinsert - that should automatically mount it.

      - Permissions need to be changed on unetbootin to allow execution:

      #sudo chmod a+x unetbootin

      - To run unetbootin, simply double-click its icon.

      Again, thanks - there are a ton of methods I found via Google, all different, some of which flat-out won't work with today's larger BIOS updates (ie creating a floppy image and burning to a CD - you're left with only 1.44MB, and a lot less after making it bootable - my BIOS update of my MSI CR600 laptop is 2.1MB alone!).

      ReplyDelete
    3. Wow I didn't know BIOS updates can be that huge! I updated the instructions as you suggested. Thanks for the comment!

      ReplyDelete
    4. Linux flash drive can provide a communication channel that is safe from a possibly compromised computer. linux flash drive

      ReplyDelete
    5. Kindly add a little bit more to your directions...

      I have a Toshiba NB205, and I am trying to update the BIOS. I have formatted a 4GB SanDisk Cruzer, used Unetbootin to install FreeDOS, and rebooted into the USB drive by resetting the boot sequence via F2. The FreeDOS menu comes up--but I don't know which of the six options to choose. The first option looks wrong, because if it starts to install FreeDOS, does that mean it will overwrite something on my hard drive? I have looked through the FreeDOS site, and I cannot find a place where it describes the boot options.

      I took a risk and chose option #1 (install FreeDOS) and arrived at an A:\ prompt. What then? How to I execute the NB200-210-WIN.exe file?

      ReplyDelete
    6. Pietro, did you try going to your B: or C: drive? That's where my flash bios was located.

      ReplyDelete
    7. Hi everyone.. I have the same problem. I need to update my BIOS in my dell mini 9, because I am having some troubles with my battery.
      I created my USB as you indicated. When I rebooted, there are 4 options available. The first one is to install FreeDOS in my computer and the other 3 are to run as Live Session.
      Which one should I run?
      I tried with the Live ones, but there is no B: or C: drives. I am localized in drive A: where there is a DRIVE folder, when I get in, there is not my BIOS file.
      Any suggestions??

      ReplyDelete
    8. Use FreeDOS. Then copy your flash BIOS into the thumbdrive. You should be able to access your flash drive as a B: or C: drive after you boot off of it.

      ReplyDelete
    9. How to use gparted to create a FAT16 partition ?
      I have installed it but I am not able to use it?

      ReplyDelete
    10. You can find more information on GParted on the project's website:

      http://gparted.sourceforge.net/

      If you're using Ubuntu, you can find it in System Menu --> Administration Menu or type 'gparted' in the command line.

      ReplyDelete
    11. I didn't quite get what I have to do after I've created the bootable flash drive with unetbootin: it tells me to reboot the pc, do I have to do that? And after that?

      ReplyDelete
    12. As per step #3, you need to copy your flash bios and flash utility onto the flash drive. Then you would need to reboot off the flash drive and run the flash utility command. If all of this sounds foreign, then please read up on flash bios else where on the Internet. These instructions were meant for folks who have flash their bios in the past with floppy disks but no longer have a floppy drive.

      ReplyDelete
    13. I am also having some issues, I have tried with the flash util on the same key and a separate one with the same result. I am sure this is just my lack of DOS know how.

      Once FreeDOS boots I am presented with a command prompt:-

      A:\>

      I have done 'dir' and get:-

      Volume in drive A has no label
      Volume Serial Number is 44FA-7FE3
      Directory of A:\

      DRIVER < DIR> 09-03-2006 12:11a
      FREEDOS < DIR> 09-03-2006 12:11a
      COMMAND COM 66,945 09-03-2006 12:11a
      FDCONFIG SYS 1,768 09-03-2006 12:11a
      KERNEL SYS 45,341 09-03-2006 12:11a

      Then I try:-

      A:\> B:
      B:\ Remove diskette in drive A:
      Insert diskette in drive B:
      Press the any key to continue...

      I do 'dir' and get:-

      Volume in drive B has no label
      Volume Serial Number is 44FA-7FE3
      Directory of B:\

      DRIVER < DIR> 09-03-2006 12:11a
      FREEDOS < DIR> 09-03-2006 12:11a
      COMMAND COM 66,945 09-03-2006 12:11a
      FDCONFIG SYS 1,768 09-03-2006 12:11a
      KERNEL SYS 45,341 09-03-2006 12:11a

      I then try C: and get:-

      Volume in drive A has no label
      Volume Serial Number is 00AA-9XX9

      I made the serial number up on the last one as I did not write that down, basically it shows there is a C: present but it appears to be blank.

      Can you tell be how to find and execute my update.bat file!!

      ReplyDelete
    14. Finally have it all sorted, the update files were in the C: but the USB stick was formatted as FAT32 not FAT16. After a re-format all is now well and I finally have VT-x enabled.

      Thanks all.

      ReplyDelete
    15. For some reason it would immediately drop back into the A:\ directory after I did CD C:\, so I had to run the bios update from A: prompt with the command C:\biosupdate.exe (made up bios update name...too lazy to type the odd Dell one). And I did choose the first option, to install freedos, which is counterintuitive.
      And it worked perfectly, thank you!
      Nick

      ReplyDelete
      Replies
      1. This is DOS... CD C:\ doesn't make sense to DOS. You have to type 'C:' to, as they called it, "log into the C drive". CD only moves you around the device you are on. It can't be used to change which device you are on.

        This and more is why DOS sucked.

        Delete
    16. A range of file recovery apps are already developed by the experts, guaranteeing that an individual may easily retrieve the damaged files.
      In case of removal of data problem, a person must have a preliminary understanding of suited computer data recovery software.
      Toshiba Hard Drive Data Recovery

      ReplyDelete