BIOS flash upgrades on Linux
To upgrade your system BIOS you normally need to run a piece of software from the system manufacturer which loads an updated copy of the BIOS into the EPROM chip on your system motherboard – a process known as flashing your BIOS. Most system manufacturers supply BIOS upgrades in a form that will run under DOS or, occasionally, Windows. It is rare to find a BIOS upgrade program that runs under Linux (I’d love to hear about one). Recognising that not all of their customers are necessarily running a 28 year old, 16-bit operating system – some system manufacturers supply their BIOS upgrades in the form of an image which you can burn to a CDROM and boot from (making the question of what OS you are running irrelevant).
I recently had to upgrade the BIOS on one of our Supermicro systems (an X7DVL-E system). Supermicro provide their BIOS upgrades as a ZIP file containing the actual BIOS and a DOS flash program. They also seem to provide some software which you can run on Windows to create a BIOS flash floppy disk (for the younger readers in the audience, that’s another wonderful technology from the 80s, and I’m talking about the super-modern 3.5″ floppy there). I’m not singling out Supermicro for particular criticism here, a lot of the system manufacturers seem to work on the assumption we’re still running PCs with Windows and a floppy drive (to be fair, if you have the optional IPMI management card installed, you can normally upload your firmware through that, but we don’t) – but for those of us running Linux servers, upgrading the BIOS can be a painful process.
There is a work-around for this problem. Thanks to the Linux boot-loader, GRUB – you can boot from a DOS disk image containing your BIOS upgrade program and run the program from within that booted image without ever actually installing DOS or a floppy drive in your system. The following procedure worked well for me on an Ubuntu 9.04 system (with thanks to this OpenSUSE page and and this Ubuntu forums posting for some assistance along the way) and the same approach should work on other distributions.
WARNING: Upgrading your system BIOS is an inherently risky process – with the primary risk being that if things go wrong you can brick your system. Things that can go wrong include flashing your system with a BIOS upgrade for a different system or the power getting interrupted while you are in the middle of a BIOS upgrade. In some cases, you may be able to reflash the BIOS using some emergency procedure but with most systems, you may be looking at a motherboard replacement. So proceed with caution and only upgrade your BIOS if you have a specific problem which the upgrade fixes.
- Download a bootable DOS disk image from the FreeDOS distribution site (FreeDOS is an excellent open source version of DOS. It is widely used by hobbyists and companies including Dell, HP and Seagate).
wget http://www.fdos.org/bootdisks/autogen/FDOEM.144.gz
- Download your system manufacturers BIOS upgrade
wget http://www.example.com/bios/version2.zip
- Place the downloaded BIOS upgrade program and files into the downloaded bootable DOS image.
gunzip FDOEM.144.gz sudo mount -o loop FDOEM.144 /mnt sudo mkdir /mnt/bios cd /mnt/bios unzip <path to download BIOS upgrade file>/version2.zip umount /mnt
- Add the bootable DOS image (with the bios upgrade software) to your Linux bootloader (this requires a file from the syslinux package),
sudo aptitude install syslinux sudo mkdir /boot/dos sudo cp /usr/lib/syslinux/memdisk /boot/dos sudo cp FDOEM.144 /boot/dos sudo vi /boot/grub/menu.lst
and add the following section to the end of the file
title DOS BIOS upgrade kernel /boot/dos/memdisk initrd /boot/dos/FDOEM.144
- Reboot your system and choose the DOS BIOS upgrade boot option. If the boot is successful you should shortly be presented with the A:\ DOS boot prompt. At this point you can run the BIOS upgrade software, for example,
A:\CD BIOS A:\FLASH V2BIOS.ROM
- Once the upgrade finishes, reboot and enjoy your upgraded system.
4 Comments to BIOS flash upgrades on Linux
Seeing as you’d love to hear about a BIOS flash utility that runs under linux, look no further than the section on Dell’s site for their PowerEdge servers. (http://support.dell.com/support/downloads/ and then select Servers -> PowerEdge -> any model number -> Linux OS -> BIOS. Adn you’ll find .BIN files that are runnable directly on the command-line. They also have a tool for automating the creation of FreeDOS images for their desktops and laptops (http://linux.dell.com/projects.shtml#biosdisk)
September 24, 2009
Hi Daniel,
It’s great to see Dell doing the right thing in this regard. I see it’s flagged as an Update Package for Red Hat Linux
. How well does it work on other distributions? Good to see anyways, it’s a definite improvement.
-stephen
September 13, 2011
Great article, but do you happen to know how to make the disk image bigger? The disx image 1.44 megs and the bios I need to flash is over 4 megs, so its giving me a disk full error.
September 14, 2011
Hi Adam,
I think you’re constained to a maximum size of 2.88 MB for floppy images – I’m not sure how the BIOS would behave with a larger image. So I think you should look at creating a bootable iso (cdrom) image instead. http://www.syslinux.org/wiki/index.php/ISOLINUX contains some instructuions on how to use syslinux to boot a DOS floppy image although I haven’t tried them. On Windows, there are lots of different tools for creating DOS bootable ISO images – http://www.nu2.nu/bootcd/ has one approach but Google should turn up plenty more.
September 24, 2009