Updating BIOS in FreeBSD (without Windows or a floppy drive)
I had strange happenings with the server, and figured a bios version upgrade might help out. After all, I was using a newer processor on an older motherboard, with newer ram. The BIOS version I had was A02, where the latest version was A10.
Most BIOS manufacturers provide free updates to patch their BIOS code. Unfortunately, often times these updates are:
- Designed for Windows – i.e. they include “dummy” – type updaters for users who don’t know how to use a boot disk.
- Designed for machines with floppy drives. Who uses floppy drives – what is this, 1985? Why not make me boot off punch cards or something?
Anyway, there are several ways around these two issues; like most modern low-level PC troubleshooting, a CD-based boot disk is involved.
Ingredients:
One DOS boot disk iso file – FreeDOS works pretty well. I used this one: http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.0/fdbasecd.iso but any of the iso-based ones ought to work OK.
One PC running your favorite OS, FreeBSD.
Working installation of cdrtools (installable from /usr/ports/sysutils/cdrtools). To check if you already have this, you can try typing “which mkisofs” on the FreeBSD command line. If you get a “Command not found,” you need to install it. If it comes back telling you where it’s located (e.g. /usr/local/bin/mkisofs, lucky you – you have it.
You’ll need the standalone executable for your BIOS upgrade… For my Dell, this was located on Dell’s support site. What you’re looking for is just the executable file that does the actual BIOS update. You may have to hunt around a little or find a way to extract the .exe from your manufacturer’s disk image. Some of the images available are self-extracting exes. Again, the one you want is just the executable dos-based updater.
Procedure:
What we want to do is edit the FreeDOS ISO image file to add the BIOS manufacturer’s executable file, then burn that new CD. Easy enough? You’d think so – but actually this is much easier on FreeBSD than you might think, and you don’t need expensive software to make it happen.
Here’s how:
Get your BIOS upgrade and your FreeDOS CD image (ISO) onto the FreeBSD computer.
I did this by using the fetch command, for example:
#fetch http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.0/fdbasecd.iso
Mount your FreeDOS ISO file: this will allow you to access all the FreeDOS files:
First, we need to create a device node in /dev
#mdconfig –a –t vnode –f iso_filename.iso –u 0
Next, we mount our newly created device:
#mount_cd9660 /dev/iso9660/FreeDOS\ 1.0 /mnt/freedos
Note that in the example above, I called the iso file iso_filename.iso, and mounted it to /mnt/freedos. You will of course have to create whatever directory you want to mount to ahead of time. No problem, right?
Great, so now, we can browse that ISO if we want to, just to check it out:
#cd /mnt/freedos
#ls
Now, I have an autorun.inf file, boot.catalog, freedos, isolinux, and setup.bat.
OK. One thing about our mounted ISO is it’s read-only, so in order to add more to it, we can just copy it to another directory (I used /tmp/bios_cd). Maybe there is a way to mount the ISO so it’s not read-only, but it seemed easier just to copy to a temporary location:
#cp –R /mnt/freedos /tmp/bios_cd
So now we can add our bios executable to the directory, create a new iso image, and burn it to disc.
#mkisofs -o /tmp/freedos_biosupdate.iso -q -l -N \
-boot-info-table -iso-level 4 -no-emul-boot \
-b isolinux/isolinux.bin \
-publisher “FreeDOS – www.freedos.org” \
-A “FreeDOS beta9 Distribution” -V FDOS_BETA9 -v .
Those commands will give us our new iso file, “/tmp/freedos_biosupdate.iso”
Note that the period at the end of the mkisofs command is required.
Pages that helped:
Mkisofs procedure graciously provided from this site: http://www.tummy.com/journals/entries/jafo_20080920_234755
Image mounting info for FreeBSD from here:
http://www.bsdguides.org/guides/freebsd/beginners/mdconfig_mount_images
This ended up working great, with one minor snag: as mentioned on the tummy.com page, I did have to escape out of the SETUP procedure for FreeDOS to avoid having it install FreeDOS as my OS on the hard drive. Why this is the default for FreeDOS, I have no idea. In retrospect, it may have been easier just to attach a floppy drive, but this worked out, and I didn’t have to order software.
