Sie sind auf Seite 1von 3

BIOS Flashing with a Bootable CD-ROM

13.04.2013. 21:38

BIOS Flashing with a Bootable CD-ROM


Hardware
Submitted by: Kurt Wall Update by: Kurt Wall Date Submitted: 3 Jan 2006 Last Updated: 14 Jan 2007 Document Version: 1.2

I wanted to update the BIOS on my computer but faced a problem: no floppy drive and no DOS or Windows. Most BIOS flashing programs require either a floppy or DOS/Windows or both because the flashing programs run from DOS (Uniflash is a notable exception). Fortunately, smarter people than me worked out the details. Here are the steps, which presume you have boot-capable CDROM.
1. Create a directory in which to work. I'll refer to it as $WORKDIR in this document:
$ mkdir $WORKDIR $ cd $WORKDIR

2. Download your updated BIOS image into $WORKDIR. 3. Obtain a DOS boot image you can probably use one from the FreeDOS project, but I ended up using one from bootdisk.com, boot98sc.exe. Save or copy this file into $WORKDIR. 4. boot98sc.exe is a self-extracting ZIP archive, so unzip it into $WORKDIR:
$ unzip boot98sc.exe Archive: boot98sc.exe warning [boot98sc.exe]: 105508 extra bytes at beginning or within zipfile (attempting to process anyway) file #1: bad zipfile offset (local header sig): 211016 (attempting to re-compensate) inflating: boot98sc.IMA

As you can see in the output, in this case, the bootable image is boot98sc.IMA. 5. Mount the bootable image using the loopback device:
http://www.linux-sxs.org/hardware/flash_boot_cd.html Page 1 of 3

BIOS Flashing with a Bootable CD-ROM

13.04.2013. 21:38

# mount -t vfat boot98sc.IMA /mnt/temp -o loop,rw

You will need to be root to mount the image and you will also need to make sure that your mount point (/mnt/temp, in this case) exists. 6. Delete enough unneeded .exe files from the image to make room in the image for your BIOS update file and flashing program. The bootable image has a fixed size, 1,474,560 bytes, which is precisely the size of a floppy disk. However, while the image is that size, the files it contains do not necessarily use all of that space:
$ du -b /mnt/temp 1453799 .

So, the trick is to figure out how much space you need and delete enough nonessential files from the image to make room for your BIOS image and the flashing program. In my case, the required space was approximately 570,000 bytes:
-rw-r--r--rw-r--r-1 kwall users 46414 2006-01-02 23:34 awflash.exe 1 kwall users 524288 2006-01-02 23:31 w7093ae7.405

So, I deleted the following files:


scanreg.exe scandisk.* extract.exe edit.* drvspace.bin fdisk.exe format.com smartdrv.exe xcopy32.* mem.exe chkdsk.exe move.exe deltree.exe

7. Copy your BIOS update file and flashing program into the mounted boot image:
# cp awflash.exe w7093ae7.405 /mnt/temp

8. Unmount the boot image:


# umount /mnt/temp

9. Create a bootable ISO image. Thus:


http://www.linux-sxs.org/hardware/flash_boot_cd.html Page 2 of 3

BIOS Flashing with a Bootable CD-ROM

13.04.2013. 21:38

$ $ > > >

cd $WORKDIR mkisofs -o bootcd.iso \ -b boot.IMA \ -c boot.cat \ ./boot.IMA -o bootcd.iso tells mkisofs the name of the ISO image. -b boot.IMA tells mkisofs where to find the bootable image to use. -c boot.cat tells mkisofs the name of the boot catalog file that a bootable CD-ROM must have (you don't have to create it because mkisofs creates it for

you).
./boot.IMA tells mkisofs what files to put in the ISO.

10. Burn the ISO image using your preferred burning application. 11. Boot from the CD-ROM and run the flashing program according to the maker's instructions.

Additional Resources
As mentioned at the beginning of this document, I relied on the work other people did before. I've merged and synthesized elements from the pages listed below: Reflashing BIOSes from Linux Flashing PC BIOS under Unix/Linux in Non-Traumatic Fasion (with a CD-ROM or Floppy) Motherboard Flash Boot CD from Linux Mini HOWTO I suggest using a rewritable CD because, at least in my case, it took several tries to find the right boot image. You might not have this problem, but having a few rewritable CD media laying around might prove useful in the general case.
#ifndef DISCLAIMER No guarantees implied or expressed. If it breaks, you get to keep both pieces. #endif /* DISCLAIMER */

http://www.linux-sxs.org/hardware/flash_boot_cd.html

Page 3 of 3