Scott CollierIntroduction

If you find yourself having to update any firmware on your servers via DOS, instead of walking to each server and using a USB drive, or booting to a USB floppy, try it via PXE. In most cases we have a Linux based update package, so you can avoid updating in this manner.

I am assuming that you have a functioning cluster at this point. In this example, we'll take a look at updating CPLD firmware on a PowerEdge M610.






Hardware


  • Frontend: PEM610
  • Compute Nodes: PEM610 x 2

Software

  • Platform Cluster Manager for Dell 1.2a (build 3307)
  • Freedos Image
  • CPLD code for PowerEdge M610
    • It's on the PowerEdge M610 page under "System Firmware"


Process

Get Freedos and customize the image:

1. Go to the freedos site and grab the fdboot.img 1.44MB file here:

http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.0/

2. Create a freedos/fdimg directory and mount the .img file, place the M610 CPLD code in the freedos directory

# mkdir -p freedos/fdimg

Now your directory structure should look like this - after you place the fdboot.img and M610 CPLD code in the right places:

# tree freedos/
freedos/
|-- M610-CPLD-external-release-file.zip
|-- fdboot.img
`-- fdimg

Mount the fdboot.img and make changes

# file fdboot.img
fdboot.img: DOS floppy 1440k, x86 hard disk boot sector
# mount -t msdos -o loop fdboot.img fdimg/
# cd fdimg/; ls
command.com driver fdconfig.sys freedos kernel.sys

Now you are in a state where you can start modifying the image and putting your DOS executables on the image

3. Unzip the M610-CPLD-external-release-file.zip file and copy both M610-PLD.exe and M610-PLD.jed file to the image.

# cd freedos
# unzip M610-CPLD-external-release-file.zip
Archive: M610-CPLD-external-release-file.zip
inflating: M610-PLD.exe
inflating: M610-PLD.jed
extracting: M610-CPLD-ver102-checksum.txt
inflating: M610-CPLD-ver102-release-note.txt
# ls
fdboot.img M610-CPLD-external-release-file.zip M610-CPLD-ver102-release-note.txt M610-PLD.jed
fdimg M610-CPLD-ver102-checksum.txt M610-PLD.exe
# cp -a M610-PLD.exe M610-PLD.jed fdimg/.

4. Modify the fdauto.bat so it calls the CPLD update

# vi fdimg/freedos/fdauto.bat

This is what the last 3 lines will look like

echo.
a:\M610-PLD -force
:END

5. Unmount the image and rename for reference

# umount fdimg/
# mv fdboot.img DELL_CPLD.img

Finish configuring the TFTP server

1. Copy these two files into /tftpboot/kusu/dosUpdates

  • DELL_CPLD.img
  • memdisk
    • You can get memdisk from syslinux

# locate memdisk
/usr/lib/syslinux/memdisk

# mkdir -p /tftpboot/kusu/dosUpdates
# cd /tftpboot/kusu/dosUpdates/.
# ls
DELL_CPLD.img memdisk

2. Change into the /tftpboot/kusu/pxelinux.cfg and move all the config files into a different directory

# cd /tftpboot/kusu/pxelinux.cfg/; mkdir backup; mv 0* backup/.

3. Create a "default" file in the /tftpboot/kusu/pxelinux.cfg/ directory with these contents:

# cat /tftpboot/kusu/pxelinux.cfg/default
default CPLDUpdate
prompt 0

label localdisk
localboot 0
label CPLDUpdate
kernel dosUpdates/memdisk
append initrd=dosUpdates/DELL_CPLD.img

4. Reboot your nodes and they will PXE boot, pull the DELL_CPLD.img file and update automatically and reboot.

5. Once all the nodes are updated, you'll need to put the environment back to the way it was before:

# rm -rf /tftpboot/kusu/pxelinux.cfg/default; cp /tftpboot/kusu/pxelinux.cfg/backup/* /tftpboot/kusu/pxelinux.cfg/.

So, you can add additional firmware and just modify the fdauto.bat file, and re-roll the image and do your updates.

Caveats

  • If you follow this process, by moving all the MAC files in /tftpboot/kusu/pxelinux.cfg directory and putting the default file there, all nodes will boot to the firmware image until you change it back.
  • You can do one node at a time, by not creating a "default" file and just modify the individual "01-00-1e-4f-2c-a8-88" directly, for testing.


-- Scott Collier