BIOS Flashing under Linux

From CLUG Wiki

Jump to: navigation, search

Need to re-flash a BIOS without Windows / DOS?

There are several options:

Contents

Floppy Flash

There are several boot floppies you can use:

Mount the image:

mount floppy.img /mnt/tmp -o loop,uid=myusername

and remove junk you don't need, and copy in the BIOS image and flashing utility.

Unmount it:

umount /mnt/tmp

Copy it to a floppy:

fdformat /dev/fd0                # Just so we know it doesn't have bad sectors
cat floppy.img > /dev/fd0
rm floppy.img                    # We are done with you.

reboot and flash.

CD-R Flash

As above, but instead of copying it to a floppy, make an iso image and burn it to CD-R(W):

mkisofs -r -b floppy.img -c boot.cat -o floppy.iso floppy.img
cdrecord dev=/dev/cdrw -dao floppy.iso
rm floppy.img floppy.iso          # We are done with you.

reboot and flash.

Netboot Flash

You can use memdisk to boot to an emulated a floppy disk (using an image) from grub or pxelinux. It’s part of the syslinux package on Debian/Ubuntu, and hides in /usr/lib/syslinux/memdisk.

In PXELINUX, the config file would look like this:

DEFAULT memdisk initrd=FILENAME.img

In Grub, like this:

title     Bios Flash
kernel    /boot/memdisk
initrd    /boot/FILENAME.img

Caveat emptor: apparently some flash tools don’t like memdisk, so YMMV

Risky: Native Linux Flash

FreeBIOS has a flashing utility in it. Use that under Linux. The utility is called flash_rom.

Enjoy.