cheatsheet.zwischenspeicher.info

Some tech documentation and snippets, finally organized.
Posts tagged as firmware

Create a bootable FreeDOS medium from within Linux to flash your BIOS

The quick and dirty way is to simply dd a DOS floppy image to an empty USB drive. I use the FreeDOS FDOEM.288 image from fdos.org, because it contains barely anything but kernel and COMMAND.COM, so there is enough space left for the payload.

Note: All data on the drive will be lost.

$ dd if=/path/to/FDOEM.288 of=/dev/sdX

Now mount the USB drive and add the updater and flashrom binaries. That's it.


If you want to flash a computer that neither has a floppy drive nor can't boot from USB, you can create a CD-ROM from the floppy disk image. Mount the FDOEM.288 image and add the updater and flashrom binaries to the image. Working directory is the directory containing the floppy disk image:

$ mount -o loop -t msdos FDOEM.288 /mnt

$ cp /path/to/updater /path/to/firmware /mnt/

$ umount /mnt

genisoimage creates a bootable ISO9660 image, which will then be burned to CD-ROM with wodim:

$ genisoimage -o fdoem288.iso -b FDOEM.288 FDOEM.288

$ wodim -v dev=/dev/cdrw fdoem288.iso

If you need more space than the approximately 2.5MB available in the FDOEM.288 image, or a MS Windows environment, you might want to boot a copy of BartPE in a virtual machine. From within that, you can easily create a custom BartPE boot CD or even a multi purpose / emergency hard disk.