How to upgrade your server BIOS on Linux without a floppy drive

This is another thing I just couldn’t find no matter how hard I googled. Here’s the story behind this post. Scroll down if you want to get at the useful stuff.

I run a cluster of Dell 2950’s and I just ordered second CPU’s (Intel XEON E5410 64 bit) for all the machines. I test upgraded one of them and the LCD on the front came up orange with an error message and the chassis cooling fan cranked all the way up to high. Of course I ignored the instructions that came with the CPU’s that said UPGRADE THE BIOS AND BMC BEFORE YOU INSTALL THIS.

ATTEMPT #1: I tried to create a Bootable USB flash (pen) drive using various utilities from HP and elsewhere but I couldn’t get my Dell 2950’s to boot into the drive. I even bought an HP Flash Floppy Key and I couldn’t get my workstations to boot into it when switched into floppy mode. I didn’t try it on the Dells because by then I’d discovered the method below. Interestingly, once I upgrade my Dell 2950 Bios’s I noticed it actually REMOVES the option to boot into a USB device from the BIOS menu. So using the method below with Linux and Grub is definitelly preferable – and it probably boots slightly faster because hard-drives are faster than USB 2.0.

ATTEMPT #2: I got hold of a USB floppy drive, made a DOS bootable disk and upgraded the BIOS and BMC. A week earlier I was in Fry’s joking with my wife holding up a box of 1.44″ disks saying “Who uses these?!” Now I know. The problem was the BIOS upgrade and BMC upgrade was very very slow from a floppy disk. It took forever to load the BIOS upgrade software into memory. And that meant a lot of down-time for our users while I upgrade the whole cluster.

Here’s the solution:

–USEFUL STUFF–

If you’re running any flavour of Linux using Grub as your boot loader and you need to upgrade your BIOS from a floppy drive, and you don’t have a USB floppy drive or you don’t want to use one because they’re so damn slow, then here’s the trick. This is taken from David Backeberg’s page at MIT which seems to be offline at the moment. I had a very hard time finding his advice so I’m echoing much of it here. I’ve removed steps to compile memdisk because they’re unneccesary and I also don’t use autoexec.bat because I prefer to manually launch the bios upgrade on each machine so that I can shut it down immediatelly afterwards in order to upgrade the hardware.

  1. Go to FreeDOS floppies and download the OEM bootdisk. (NOTE: I’ve tried to use the 2.88 Disk that FreeDOS provides but it doesn’t mount with dosemu)
  2. Unzip the file you downloaded: unzip FDOEM.144.imz
  3. Rename the image to something useful: mv FDOEM.144.img dell_bios_floppy.img
  4. Setup the loopback device (Try /dev/loop0 if loop2 doesn’t exist): losetup /dev/loop2 dell_bios_floppy.img
  5. Install dosemu. Instructions for Ubuntu: (apt-get install dosemu)
  6. Edit /etc/dosemu/dosemu.conf and add (or edit the floppy_a line) to say: $_floppy_a = “threeinch:/dev/loop2″
  7. Check where the c_drive is in your dosemu.conf. It’s usually at /root/.dosemu/c_drive
  8. Copy your BIOS flash executable to the fake C Drive and give it a 8.3 style name: cp PE123456789.EXE /root/.dosemu/c_drive/BIOSUP.EXE
  9. Start dosemu: dosemu
  10. If you start Dosemu and you see a blank screen, try typing ‘cls’ and hit enter.
  11. Feels good being in a DOS shell on linux doesn’t it? Don’t ask me why – nostalgia maybe.
  12. Copy your BIOS exe from C drive to your A drive image: copy C:\BIOSUP.EXE a:\
  13. Type exitemu to exit dosemu
  14. Unloop your loopback device: losetup -d /dev/loop2 (or loop0 if you used that)

You now have a floppy image you can boot into that contains your BIOS exe file. If you are also upgrading your BMC or other components that require booting into a floppy and executing files, you can try to fit those files on the floppy using the above steps. If they don’t fit then you need to create a second floppy image using the above steps and add a second entry to your menu.lst file in the steps below.

Now you need to set up Grub to give you the option to boot into your new floppy image when you reboot your machine:

  1. First install memdisk. If you’re running Ubuntu, memdisk is in the syslinux package: apt-get install syslinux
  2. Copy your dell BIOS floppy into /boot: cp /root/dell_bios_floppy.img /boot/
  3. I like to put a copy of memdisk into /boot:  cp /usr/lib/syslinux/memdisk /boot/
  4. Edit Grub’s menu.lst file. On Ubuntu it’s in /boot/grub/menu.lst. Add the following lines – and change (hd0,4) to whatever your harddrive setting is – look at other entries in menu.lst to figure it out.

title DELL Bios flash 1
root (hd0,4)
kernel /boot/memdisk
initrd /boot/dell_bios_floppy.img

That’s it! Reboot. Hit ESC when you see the grub menu. There should be a new option labled “DELL Bios flash 1″. Select it and boot into FreeDOS. Run your bios update.

Please add comments if you have any tips for other flavors of Linux.

13 thoughts on “How to upgrade your server BIOS on Linux without a floppy drive

  1. Please answer my question:
    How can we install/insert the low volume boot floppy files on the BIOS so that we can boot just by BIOS and without a floppy, hard or CD.

    Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Notify me of followup comments via e-mail. You can also subscribe without commenting.