Page 1 of 17 12311 ... LastLast
Results 1 to 10 of 167

Thread: HOWTO: Flash BIOS, The Ubuntu Way

  1. #1
    Join Date
    Jun 2006
    Beans
    2,310
    Distro
    Ubuntu 14.04 Trusty Tahr

    Post HOWTO: Flash BIOS, The Ubuntu Way

    HOW TO FLASH YOUR BIOS

    WARNING
    BIOS flashing is destructive. If you don't understand what this means, start reading here and here. Read these documents and all related documents very carefully.

    RELEASE COMPATIBILITY (Ubuntu x86/i386)

    All versions of Ubuntu have been tested using the methods listed below (4.10 - 12.04).

    UPDATE
    Many vendors now include native Linux utilities to assist in a BIOS flash (or replacement). If you fit into this category then it is recommended to use the method provided by them. Another example: Dell has the biosdisk project. You can also try your luck with the flashrom project (more on flashrom below). If you know what you are doing, are feeling daring, or just want to know a little more about this topic, then continue reading.

    BACKGROUND

    Flashing a BIOS typically serves the following functions: to fix specific bugs, to support newer hardware, or to fix a damaged BIOS. Using Ubuntu Linux as our host OS, we will create a bootable floppy disk or CD using FreeDOS as our OS of choice. On this disk we will place a new BIOS image and any related files used for flashing. Once the disk has been created, reboot the system and allow your newly created disk to load automatically and begin the flashing process. See your particular BIOS vendor's web site for these files and for more information on the commands you will to need to use to begin the flashing process. In other words, read what your BIOS vendor has to say about flashing. READ the README file.

    BIOS INFORMATION

    Learn more about your BIOS and its features (e.g., make, vendor, release date).
    Code:
    sudo biosdecode
    sudo hwinfo --bios | less
    sudo dmidecode --type bios
    sudo lshw
    gksudo lshw-gtk
    TIPS & WARNINGS (YOU SHOULD READ THESE)
    Note
    Flashing your BIOS is a potentially dangerous activity that can render your motherboard (and computer, for that matter) inoperable. Proceed with caution and fully understand what you are doing before attempting the commands below! The only way to reverse the commands below is to make a copy of your current BIOS configuration and re-flash or by reinstalling the original BIOS to your motherboard.

    CMOS Jumpers
    Some motherboards have CMOS Jumpers that need to be cleared to perform a successful BIOS flash. More on this topic here & here.

    ACPI-Related Issues
    Sometimes these issues can be fixed by updating your BIOS. If after flashing your BIOS you still encounter power/fan/thermal problems, this thread will describe how to modify your DSDT file in an attempt at fixing common ACPI-related issues. More on ACPI here and here.

    GRUB 2
    The third method uses the GRUB bootloader. It's meant to be used with original GRUB and not with GRUB 2.
    If you need or want to use GRUB 2, check out The GRUB 2 Guide or the GRUB 2 manual for ideas. You can also alter GRUB 2 using Daniel Richter's "Grub Customizer" -- read more about it here, here, and here.

    Flashrom
    This method utilizes an app called flashrom to update your BIOS without having to reboot your system. It is a utility for identifying, reading, writing, verifying, and erasing flash chips (http://www.flashrom.org/Flashrom). It's often used to flash BIOS/EFI/coreboot/firmware images. Read the compatibility chart to see whether your BIOS is supported or if proposed workarounds have been suggested. Check the following links for more information. Pádraig Brady offers up this page as well. More info can be found at the main project site here, on wikipedia here, on apcmag.com here, and on desktoplinux.com here.

    Unetbootin & USB Flash
    Ideas on using unetbootin and/or USB flash drives, thumb drives, sticks, etc., can be found here and here. Some comments here discuss making bootable USB flash drives as well.

    Size Contraints
    In cases where the new BIOS image and related files are larger than 1.44MB, you can go here or here to learn about creating or using customized boot disks of larger sizes to help in flashing your BIOS. As an alternative, you can try the third method listed below that uses GRUB to update your BIOS. See above for ideas on modifying config files if using GRUB 2 as your boot loader.

    Still Not Sure?
    If you don't know what you are doing or feel unsafe at this point, it is highly recommended to ask for help or consult a professional.


    METHODS
    Carefully read through all methods.
    Pick a method that best suits your situation.
    Understand what you are doing before you begin.
    Read the
    TIPS & WARNINGS section above for additional insight.

    YOU WILL NEED THE FOLLOWING:
    1a) FreeDOS, specifically, this image: http://www.fdos.org/bootdisks/autogen/FDOEM.144.gz
    1b) Alternate download location: http://www.mediafire.com/file/26md8h...e/FDOEM.144.gz
    2) New BIOS image + flashing tool to be found at the web site of your motherboard/BIOS/OEM vendor.


    M1: FLOPPY

    Unpack FreeDOS image → copy image to floppy disk → create temp floppy dir → mount floppy copy flashing tool and new BIOS image to /tmp/floppy (see footnotes below) → reboot following vendor instructions

    Note: "NewBiosFiles" listed below is pseudocode for the extracted location of the new BIOS image + related files that you just downloaded
    Code:
    wget http://www.fdos.org/bootdisks/autogen/FDOEM.144.gz
    gunzip FDOEM.144.gz
    dd if=FDOEM.144 of=/dev/fd0
    mkdir /tmp/floppy
    sudo mount /dev/fd0 /tmp/floppy
    sudo cp ~/NewBiosFiles/* /tmp/floppy
    Once the command has finished executing, mount the floppy and copy the new BIOS image + flashing tool onto it. That's all there is to it. Reboot, flash BIOS with commands provided by the BIOS vendor. Check the README file for exact syntax.
    END OF METHOD


    M2: CD
    Unpack FreeDOS image → create temp dir → mount FreeDOS image to /tmp/cdr → copy flashing tool and new BIOS image to /tmp/cdr (see footnotes below) → unmount image → install mkisofs → create ISO → burn ISO to disc → reboot following vendor instructions

    Note: "NewBiosFiles" listed below is pseudocode for the extracted location of the new BIOS image + related files that you just downloaded
    Code:
    wget http://www.fdos.org/bootdisks/autogen/FDOEM.144.gz
    gunzip FDOEM.144.gz
    mkdir /tmp/cdr
    sudo mount -t vfat -o loop FDOEM.144 /tmp/cdr
    sudo cp ~/NewBiosFiles/* /tmp/cdr
    sudo umount /tmp/cdr
    sudo apt-get install mkisofs
    mkisofs -o newBIOS.iso -b FDOEM.144 FDOEM.144
    cdrecord -v newBIOS.iso
    [note: in later releases, /usr/bin/mkisofs symlinks to /usr/bin/genisoimage]
    [note: in later releases, /usr/bin/cdrecord symlinks to /usr/bin/wodim]

    Reboot from the CD and flash your BIOS with the commands provided by the BIOS vendor. Check the README file for exact syntax.
    END OF METHOD


    M3: GRUB (GRUB 2 users, read GRUB 2 links under TIPS & WARNINGS above)
    Download FreeDOS image and unpack → create temp dir → mount image to temp dir extract flashing utility and new BIOS image to temp dir → unmount image, remove temp dir → move image to new file to be used by GRUB → install syslinux to provide memdisk for booting → copy memdisk to /boot dir reboot choosing biosupdate.img option from GRUB menu
    Code:
    wget http://www.fdos.org/bootdisks/autogen/FDOEM.144.gz
    gunzip FDOEM.144.gz
    mkdir /tmp/floppy
    sudo mount -t vfat -o loop,quiet,umask=000 FDOEM.144 /tmp/floppy
    unzip newBIOS.zip -d /tmp/floppy
    sudo umount /tmp/floppy
    rmdir /tmp/floppy
    sudo mv FDOEM.144 /boot/biosupdate.img
    sudo apt-get install syslinux
    sudo cp /usr/lib/syslinux/memdisk /boot/
    Code:
    sudo vim /boot/grub/menu.lst
    Now add the following to your GRUB menu
    Code:
    title       BIOS upgrade
    kernel      /boot/memdisk
    initrd      /boot/biosupdate.img
    END OF METHOD

    INSPIRATION

    HOWTO:Flash Your Bios...
    No DOS/Windows, No floppy...

    FOOTNOTES
    You've likely downloaded an executable file (an .exe file) containing your new BIOS image and flashing utility. There may be other files that you wish to copy over, such as an AUTOEXEC.BAT file to automate the process. In addition, you'll probably find a README file of some sort that will describe the appropriate syntax to use when flashing. To get at these files, use unzip to de-archive the executable file. Install unzip via your favorite package manager.
    Last edited by ciscosurfer; May 11th, 2012 at 03:31 AM. Reason: Release compatibility

  2. #2
    Join Date
    Apr 2006
    Location
    Montana
    Beans
    Hidden!
    Distro
    Kubuntu Development Release

    Re: HOWTO: Flash BIOS, The Ubuntu Way

    Nice How-to

    This thread has been added to the UDSF wiki.

    Flash_Bios

    Thanks Crane
    There are two mistakes one can make along the road to truth...not going all the way, and not starting.
    --Prince Gautama Siddharta

    #ubuntuforums web interface

  3. #3
    Join Date
    May 2006
    Location
    Milwaukee,WI
    Beans
    6,280
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: HOWTO: Flash BIOS, The Ubuntu Way

    i used this to flash my foxconn motherboard and everytime I would get to the part in the award bios flasher it would say, press y to program or n to cancel and I would hit y and it would just sit there????? i di itover and over, made new disks, to no avail, then I thought I recaled reading along time ago about some motherboards having a jumper that is used to clear the cmos ( i believe this is what holds the bios settings) and that if this jumper is in place the bios is unwritable. well, i removed the jumper temporarily and sure enough, my new bios was flashed on the motherboard and I am now not getting the apic errors in my syslog anymore about the cpu error 40 something or other. anyway.

    I think you should FYI people about a possibler jumper preventing them from writing to the cmos or bios or whatver the term is. hope this helps others.

  4. #4
    Join Date
    Jun 2006
    Beans
    2,310
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: HOWTO: Flash BIOS, The Ubuntu Way

    Quote Originally Posted by dannyboy79 View Post
    i used this to flash my foxconn motherboard and everytime I would get to the part in the award bios flasher it would say, press y to program or n to cancel and I would hit y and it would just sit there????? i di itover and over, made new disks, to no avail, then I thought I recaled reading along time ago about some motherboards having a jumper that is used to clear the cmos ( i believe this is what holds the bios settings) and that if this jumper is in place the bios is unwritable. well, i removed the jumper temporarily and sure enough, my new bios was flashed on the motherboard and I am now not getting the apic errors in my syslog anymore about the cpu error 40 something or other. anyway.

    I think you should FYI people about a possibler jumper preventing them from writing to the cmos or bios or whatver the term is. hope this helps others.
    Thanks for the tip. I've added this information into my HOWTO as an "EDIT".

    Glad this HOWTO was helpful for you.

  5. #5
    Join Date
    May 2007
    Beans
    1

    Re: HOWTO: Flash BIOS, The Ubuntu Way

    Hi, I can't be bothered with the hassle to update manually so get a biosflash company to do my work 4 me, got a new chip with latest bios and use the old one as a back up for future failure!!! hope not

  6. #6
    Join Date
    Jun 2006
    Beans
    2,310
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: HOWTO: Flash BIOS, The Ubuntu Way

    Quote Originally Posted by gaxxter View Post
    Hi, I can't be bothered with the hassle to update manually so get a biosflash company to do my work 4 me, got a new chip with latest bios and use the old one as a back up for future failure!!! hope not
    That's definitely one way to do it!

  7. #7
    Join Date
    Aug 2006
    Location
    Australia
    Beans
    1,438

    Re: HOWTO: Flash BIOS, The Ubuntu Way

    This is a great + very important thread.
    Thanks
    Work smart, not hard.

  8. #8
    Join Date
    Mar 2006
    Beans
    80

    Wink Re: HOWTO: Flash BIOS, The Ubuntu Way

    Hi ciscosurfer

    Great Howto, i found it very helpful

  9. #9
    Join Date
    Nov 2006
    Location
    Laredo, Texas
    Beans
    25

    Exclamation There is a MUCH easier way.

    I'm glad you got it to work for you, but it's not a good solution.
    1. Relies on software not tested in Debian or Ubuntu
    2. Not fault tolerant -- too easy to mess up your system.
    3. There is a much better way.


    Here's the RIGHT way to do it:

    (I am assuming you have obtained the BIOS update files from a reliable source, that they are unzipped and stored in a separate directory in your home directory, and no other files are in that directory.)

    1. Use your favorite package manager (Synaptic, Adept, aptitude, etc.) to install the dosemu package and the packages it recommends and suggests.

    2. Open Konsole.

    3. At the command prompt, type:
    Code:
    user@localhost:~$ xdosemu
    4. Read the warnings. When you understand them, type "yes" (no quotes) where prompted.

    5. A DOS window will open.

    6. Insert a floppy in your floppy drive. Note the capacity of the disk you are using. Most are 1.44MB, but there are others floating around.

    7. At the C:\ prompt, type:
    Code:
    C:\ format a: /S /F:[number of KILOBYTES of your disk] /V:[SOMENAME]
    and press Enter on your keyboard. You need to replace "[number of KILOBYTES of your disk]" with the size of your disk, in kB. For instance, if your floppy is a 1.44MB, you would use 1440. For 720kB, use 720, etc. Replace "[SOMENAME]" with a name that helps you remember what the disk is. In my case, I typed:
    Code:
    C:\ format a: /S /F:1440 /V:BIOS-UPDATE
    8. To find your files:
    Code:
    C:\ d:
    D:\ ls
    This will give you a directory list of your home directory. Dosemu maps your home directory to the DOS D: drive. You will note that Dosemu mangles the filenames in order to make them 8.3 filename compliant. Not to worry, it hasn't done anything to them; you'll just have to decide based on the first few characters of the actual file name. The commands "cd" (change directory") and "ls" (list) are your friends.

    9. Copy your BIOS files from their directory (we'll call it "STOREDIR" as an example) to the floppy:
    Code:
    D:\ copy BIOSDIR\* a:\
    XYZ123.BIN => a:\XYZ123.BIN
    AUTOEXEC.BIN => a:\AUTOEXEC.BIN
    BFLASH.EXE => a:\BFLASH.EXE
    OTHERFILE.COM => OTHERFILE.COM
    D:\
    10. Exit Dosemu:
    Code:
    D:\ exitemu
    11 Now, back at the Konsole terminal, unmount the floppy and exit:
    Code:
    user@localhost:~$ umount /dev/fd0
    user@localhost:~$ exit
    12. Follow the instructions of the BIOS vendor.

    Happy Trails,

    Loye Young
    http://www.iycc.net
    Laredo, Texas
    Last edited by loyeyoung; May 10th, 2007 at 02:50 AM.

  10. #10
    Join Date
    Mar 2006
    Beans
    80

    Re: There is a MUCH easier way.

    Quote Originally Posted by loyeyoung View Post
    I'm glad you got it to work for you, but it's not a good solution.
    1. Relies on software not tested in Debian or Ubuntu
    2. Not fault tolerant -- too easy to mess up your system.
    3. There is a much better way.


    Here's the RIGHT way to do it:

    (I am assuming you have obtained the BIOS update files from a reliable source, that they are unzipped and stored in a separate directory in your home directory, and no other files are in that directory.)

    1. Use your favorite package manager (Synaptic, Adept, aptitude, etc.) to install the dosemu package and the packages it recommends and suggests.

    2. Open Konsole.

    3. At the command prompt, type:
    Code:
    user@localhost:~$ xdosemu
    4. Read the warnings. When you understand them, type "yes" (no quotes) where prompted.

    5. A DOS window will open.

    6. Insert a floppy in your floppy drive. Note the capacity of the disk you are using. Most are 1.44MB, but there are others floating around.

    7. At the C:\ prompt, type:
    Code:
    C:\ format a: /S /F:[number of KILOBYTES of your disk] /V:[SOMENAME]
    and press Enter on your keyboard. You need to replace "[number of KILOBYTES of your disk]" with the size of your disk, in kB. For instance, if your floppy is a 1.44MB, you would use 1440. For 720kB, use 720, etc. Replace "[SOMENAME]" with a name that helps you remember what the disk is. In my case, I typed:
    Code:
    C:\ format a: /S /F:1440 /V:BIOS-UPDATE
    8. To find your files:
    Code:
    C:\ d:
    D:\ ls
    This will give you a directory list of your home directory. Dosemu maps your home directory to the DOS D: drive. You will note that Dosemu mangles the filenames in order to make them 8.3 filename compliant. Not to worry, it hasn't done anything to them; you'll just have to decide based on the first few characters of the actual file name. The commands "cd" (change directory") and "ls" (list) are your friends.

    9. Copy your BIOS files from their directory (we'll call it "STOREDIR" as an example) to the floppy:
    Code:
    D:\ copy BIOSDIR\* a:\
    XYZ123.BIN => a:\XYZ123.BIN
    AUTOEXEC.BIN => a:\AUTOEXEC.BIN
    BFLASH.EXE => a:\BFLASH.EXE
    OTHERFILE.COM => OTHERFILE.COM
    D:\
    10. Exit Dosemu:
    Code:
    D:\ exitemu
    11 Now, back at the Konsole terminal, unmount the floppy and exit:
    Code:
    user@localhost:~$ umount /dev/fd0
    user@localhost:~$ exit
    12. Follow the instructions of the BIOS vendor.

    Happy Trails,

    Loye Young
    http://www.iycc.net
    Laredo, Texas

    That is another way to do it, but if you have no floppy drive the freedos on a cd-rw with the bios update and the flash program is an option to get the job done. I upgraded the bios in my laptop with a bootable cd-rw with my bios tool and update with no problems.

Page 1 of 17 12311 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •