How to flash a Dell Perc H310 HBA card

Cover Image for How to flash a Dell Perc H310 HBA card

How to flash a Dell Perc H310 HBA card

How-to written and screenshots taken on 2021 October 36 min read

Introduction

What started as a project to run "some crypto applications" grew into something much bigger, but also more useful. I learned a tremendous amount about virtual machines, lxc containers and Proxmox. And although I'm just scratching the surface and I don't actually understand it, I know how to do some things. I'll write them down here, partly for myself, but also for you in hopes it will save one of us a lot of time and frustration.

If you want to use a software RAID solution for your storage or pass it to a VM, you (probably) need a HBA card. Sometimes they come with the server, but mostly you have (or want) to buy and add them yourself. In my VM server (HP) I added a HP H220 to combine 6 SSD's into a ZFS RAID-Z2 array for the OS and VM disks. In my storage server (Dell) I pass the Dell Perc H310, that came with it, straight to the TrueNas VM that takes care of my storage disks.

When I started doing this -working with ZFS and FreeNas- popular ones were the IBM M1015 or M1115, because you could buy used ones cheaply on Ebay. You still can, but technology has evolved, SSD's are cheaper and SATA/SAS3 has become mainstream. Servethehome.com has written an excellent guide Top Picks for FreeNAS HBAs to help you find the best HBA for your application.

Why crossflashing a HBA?

Most HBA cards you can buy are configured with IR firmware by default. In this mode the card will take care of the RAID functionality. If you want to use software RAID (or ZFS) you don't want that. You want your OS to take care of that. Therefor you have to (cross)flash most cards to IT mode (some have native IT mode capability, like the earlier mentioned HP H220). I've done this with the Dell Perc H310 in my Dell server and with the earlier mentioned IBM M1115. The process is basically the same for all cards. I also flashed my HP H220, but for different reasons as mentioned in the warning below.

HP(E) branded hardware requirement

HP, now HPE, is notorious for being very picky about the hardware you install. If it is not HP(E) labeled/branded, the server doesn't recognize the sensor data and assumes the worst. This results in very high fan speeds and thus an unbearable amount of noise. So in the HP server I had to install an HP branded HBA: the HP H220.

Crossflashing the HBA

This guide is a compilation of multiple guides that are available online. If you search for crossflash lsi it <your card here> you will probably find the perfect one for you. At the end of this guide I have listed the ones that helped me most. The first one has excellent screenshots for doing this on a Dell server. The second if you have a (consumer) UEFI mainboard.

  1. Prepare a DOS bootable USB stick. I use Rufus for that.

    'Rufus FreeDos bootable usb drive'

    Rebranded cards
    • Dell Perc H310 = LSI 9205-8i
    • HP H220 = LSI 9205-8i
    • IBM M1015 = LSI 9220-8i
    • IBM M1115 = LSI 9211-8i

    I'm not quite sure if you really "have to" use the exact firmware from broadcom. If I understand correctly, all these cards are based on the LSI SAS2008 chip and thus can be flashed with the same firmware.

    • Extract and copy Firmware\HBA_9205_8e_IT\9205-8e.bin, sasbios_rel\mptsas2.rom and sas2flash_dos_rel\sas2flsh.exe to the USB drive.
  2. Find the SAS address of your card. This is very important!!

    • Copy it from the label on the card. It should be something like "500605Bxxxxxxxxx".

      'SAS address on card'

    • Or find it during the flashing procedure.

  3. When booting in BIOS mode:

    • Boot the server from USB. You should now see a DOS command line.

      C:\>_
    • Type and run the following command to find the SAS number if you haven't done so in step 2.

      megacli.exe -AdpAllInfo -aAll -page 20

      Hit enter to scroll through the screens until the SAS address is shown. Write it down. This is very important!!

    • Run the next commands one by one to wipe the existing firmware:

      megarec.exe -writesbr 0 sbrempty.bin
      megarec.exe -cleanflash 0
    • Reboot back to USB and flash with the Dell HBA firmware

      sas2flsh.exe -o -f 6GBPSAS.fw
    note

    If you get "ERROR: Failed to initialize PAL. Exiting program.", your motherboard is set to use UEFI and you have to flash using the EFI shell: see step 4.

    • Enter the SAS number (change to the number -without spaces and dashes- you wrote down in step 2):

      s2fp19.exe -o -sasadd 500605Bxxxxxxxxx
    • Reboot back to USB and flash the LSI firmware

      sas2flsh.exe -o -f 2118it.bin
    • You are done. Reboot.

  4. When booting in UEFI mode:

    • Copy bootx64.efi from the full archive to the USB stick.

    • Boot the server from USB. You should now see a DOS command line.

      C:\>_
    • Type and run the following command to find the SAS number if you haven't done so in step 2.

      megacli.exe -AdpAllInfo -aAll -page 20

      Hit enter to scroll through the screens until the SAS address is shown. Write it down. This is very important!!

    • Run the next commands one by one to wipe the existing firmware:

      megarec.exe -writesbr 0 sbrempty.bin
      megarec.exe -cleanflash 0
    • Reboot the server to EFI shell. This should be a setting in the BIOS of your motherboard.

      'EFI shell'

    • Select the USB drive by typing, in my case, fs0:. Type map -b to get a list of devices if you don't see them.

    • Flash the Dell HBA firmware:

      sas2flash.efi -o -f 6GBPSAS.FW
    • Enter the SAS number (change to the number -without spaces and dashes- you wrote down in step 2):

      sas2flash_p19.efi -o -sasadd 500605Bxxxxxxxxx
    • Reboot again back to EFI shell and flash the new firmware:

      sas2flash.efi -o -f 2118it.bin
    • You are done. Reboot.