Admin Spotting for Fun and Profit

firmware without the floppy

December 18th, 2008 Posted in Linux

In recent years I’ve been able to rid myself of floppy drives entirely.  The problem that I run into however is that occasionally my beloved hardware manufacturers still ship firmware or bios updates on a floppy for some insane reason.

Luckily the syslinux people are aware of this vendor oversight, and have a solution. Enter ‘memdisk’. Memdisk allows you to use grub or other bootloader of your choice to boot to your floppy image file, without actually using a floppy.  To do this,  there are a few simple steps you’ll need to perform.  I’ll assume for the sake of argument that your hardware vendor provides you the .img file for the floppy image.

  • Create a directory inside /boot called firmware
  • Copy the memdisk binary to /boot
  • Copy the vendor’s .img file containing your update to /boot/firmware
  • Edit grub and add the appropriate entries for memdisk. A sample is below.
title Firmware Update
        root(hd0,0)
        kernel /memdisk
        initrd /firmware/vendor-file.img

The root values for grub will depend on your setup. You’ll have to salt to taste, but you should be able to copy from existing entries in grub. The only limitation I’ve run into with this update style are multi-floppy updates. You can’t really use them with memdisk that I’m aware of. If anyone’s aware of a way to use multiple img files with memdisk, I’ll happily update with new information!

  1. 8 Responses to “firmware without the floppy”

  2. By evil_steve on Dec 19, 2008

    For multiple disks you could try putting them into one “super” image with weird-arse geometry, then tell memdisk about the geometry.

    I don’t know of many multi-disk images, but the one or two I’ve seen have a zero-byte file called “disk-1″ or “disk-7″, which is how they know what disk it is, so you could try to fake it with one huge image with all the .img files and all the zerobyte files.

    Of course, this could lead to something out of L4d..

  3. By ajay on Dec 22, 2008

    What if you don’t have an image? Can you post some instructions on creating a simple DOS boot image to use with memdisk. Actually, I found a blog post that could help with the image stuff:

    http://www.terryburton.co.uk/blog/2007/08/pxe-boot-freedos-with-memdisk-to-flash.html

    Thanks for the post though, I didn’t know about memdisk!

  4. By Allan on Dec 22, 2008

    Hey thanks for this post. I have used pxelinux and memdisk a lot together but never thought of using memdisk with good ol’ grub. Now it makes updating my server SOOOOOO much easier – I don’t have a floppy drive installed and using a CD seemed a waste. I’ve created a nice big 10 Mb ‘floppy’ image and use that – Intel-based BIOS updates are quite big nowadays!

  5. By Jim Perrin on Dec 23, 2008

    Are you combining pre-existing floppy images to create your 10MB image? I’m a little interested in doing something similar for some of my ibm firmwares, which are spread across 5-6 floppies.

  6. By Allan on Dec 23, 2008

    To be honest, I can’t remember how I created the original 10Mb image (I might have even downloaded a ‘blank’ image from the web somewhere!) But it has Win98SE DOS on it and I just load memdisk with the ‘floppy’ parameter and also ‘c=10 h=64 s=32′.

    Then when I need to update the firmware I just extract the contents of the vendor-supplied image/zip file and put it in the 10Mb image – normally a Flash.exe and BIOS update file.

    Perhaps your IBM firmware updates may be a little too elaborate/complicated to do this way but it works for my Intel updates.

  7. By John on Jan 24, 2009

    A problem that has cropped up with this is that some flashutilities, like afudos, and aflash croak when trying to read a romfile from the fake floppy. Tried a few variants and found one aflash or afudos.exe that worked fine. If anyone have any other good suggestions I’d be interested. I guess testing if uniflash works with memdisk could be worthwhile as well.

  8. By Jim Perrin on May 8, 2009

    Turns out there’s a nice little script for creating insanely large floppy images if you need them. ‘e_’ from #rhel on freenode was kind enough to point out a syslinux mailing list post from 2004, which outlines building an 8MB (or other size) floppy image. You can find that link here -> http://syslinux.zytor.com/archives/2004-February/003183.html

    Thanks e_ for pointing this out.

  1. 1 Trackback(s)

  2. Dec 28, 2008: Firmwareupdate ohne Floppy | Gerds Blog

Post a Comment