I’ve recently bought hardware for a new NAS server build. Some of that is still in the throes of shipping (postal services have been pretty unreliable as of late), but most of it has arrived: A Supermicro mainboard, case, M.2 SSD and a PSU allows me to get started on the build.

As I like to live dangerously, I also upgraded the BIOS on the mainboard1. Since the process was somewhat involved, I’m documenting it here. Also note: As alluded to by the subtitle, you could always buy a license from Supermicro to install a BIOS update via the out-of-band management engine. I didn’t want to spend another 30 bucks on a license, so I did it the cheap/hard way.

The instructions from Supermicro say: “Take a FreeDOS thumbdrive, copy the BIOS update to it, boot FreeDOS and run FLASH.BAT <BIOS FILE>. That’s easier said than done, so I’ll try and help with the doing.

You’ll need

There’s some things you’ll need:

  • The BIOS update package from Supermicro
  • An empty thumbdrive (size should be at least one gigabyte, which is to say it doesn’t really matter)
  • Access to either the management controller, or a connected keyboard and screen
  • A FreeDOS LiveCD image
  • QEMU
  • Optional: A labelmaker to label your thumbdrive

The BIOS update file should be easy to find, just search the Supermicro website for your mainboard, and download the correct BIOS file. It’s a zip file that you can extract to a convenient folder.

The thumbdrive should not contain any partitions. Make sure you’ve copied any data that you care about. We’ll remove the partition table soonish.

Finally, you need to be able to see what you’re doing. For that, you can either connect a screen and a keyboard to the mainboard, or connect to the management controller and start the IPKVM. I’ll write a post on how to do that shortly.

Download the FreeDOS image and unpack it, so you’ve got the ISO file available.

Install QEMU in the x86_64 variant.

If you’ve got those things, you’re all set!

Prepare the thumbdrive

First, prepare the thumbdrive by copying off any precious (to you) data, and remove the partitition table. This can also be done during the FreeDOS installation, but it requires a restart, and the FreeDOS installation interface is as archaic as you’d expect.

I like cfdisk for this, as it keeps me from making dumb mistakes. Note down the device node for your drive (I’m going to be using /dev/sda from now on), and run cfdisk on it via cfdisk /dev/sda (not sda1!). Delete all partitions by selecting them and pressing d. Finally, write the changes back to the thumbdrive with w.

Install FreeDOS

So, you’d expect there to be some bootable USB version of FreeDOS that you can just use. You’d maybe be right — I couldn’t get the USB version to boot (which might be because of incompatible BIOS settings described below). If you want to try, download or install UNetbootin, select “FreeDOS” in the distribution dropdown list, select your thumbdrive, and press Go. You can try booting from that.

If that doesn’t work, or if you don’t feel like installing Unetbootin, there’s another way: Install FreeDOS on the thumbdrive via QEMU. This is quite a bit slower than the UNetbootin method above, but it’s what I did.

Make sure your thumbdrive is not mounted any more and that it’s still at /dev/sda1. Then, run the FreeDOS installer with the thumbdrive as a hard disk with qemu-system-x86_64 -hda /dev/sda -cdrom FD13LIVE.iso -boot d. This will boot FreeDOS and start the installer. Now, install FreeDOS on the “hard disk” which is really a thumbdrive. This will take some time, as the install includes lots of utilities. It’s a real operating system, don’tcha know?

After the install has finished, you can close QEMU, and try booting the USB stick via qemu-system-x86_64 -hda /dev/sda. You should get a DOS system.

Don’t forget to modify the commands for the correct QEMU command (it’s named differently on different systems).

Finally, copy the BIOS update files to the thumbdrive.

You should now have a bootable FreeDOS thumbdrive, which is what Supermicro wants.

Configuring your BIOS

FreeDOS does not speak EFI. You can’t boot FreeDOS with EFI, and you need to enable certain BIOS settings in the mainboard BIOS configuration to make FreeDOS boot correctly. This delayed me for quite some time ­- I think it’s also why my FreeDOS installation via UNetbootin didn’t work.

The BIOS options you need to configure have to do with “Legacy” boot: First, the boot method needs to be set to either “Dual” or “Legacy” in the “Boot” tab. Additionally, you need to set the “Legacy Option ROM” for the video adapter, or FreeDOS will be unable to display anything.

Once you’ve done that, you’re mostly set.

Installing the BIOS update

We’re almost there. Just save the changes you’ve made in your BIOS (press F4), connect your thumbdrive, press F11 to get to choose a boot device, and select the thumbdrive as boot device.

FreeDOS should boot, and ask you for a mode. It’s imperative that you select “Safe mode” here, otherwise, updating the BIOS will fail with a scary error (I think it was a null pointer exception, because the updating code tried to read memory that was used for other things).

After booting, do what Supermicro tells you, and run FLASH.BAT <BIOS FILE NAME>. Hopefully, you’ll get some output and progress indicators showing the update progress. It’ll take some time. Afterwards, you can reboot and reconfigure your BIOS (the update reset the configuration) to boot, and you’re done.

That was a process and a half.

Conclusion

It’s actually not that difficult, when you know to set the correct BIOS options. On a factory-default configuration, I think my UNetbootin stick would have booted as well. Searching some forum threads, I found the correct legacy options to enable to do a BIOS update.

It’s really a bummer you have to change the BIOS configuration for updating it. I know that boot software (like BIOS or EFI) is tricky to write, but in a few years, there’s not going to be a lot of boards that have a legacy boot option available. When secure boot is enabled, you’re basically out of luck: Secure boot needs EFI, and I’m pretty sure that switching to legacy boot clears the stored keys. So you can’t do the BIOS update via a FreeDOS boot, and need to pony up the money for an extra license for updating the BIOS via IPMI.

It would be much more comfortable to provide BIOS updates as EFI applications (as well), so you can run them from the EFI shell. Then again, it worked, and BIOS updates aren’t necessary most of the time. Who am I to complain?


  1. It’s an X11SSH-F, how can you not buy a mainboard with a name like that? ↩︎