Flash PERC H310 to IT mode for use with FreeNAS, UnRAID, etc.

The PERC H310 is a pretty standard and widely available PCI express RAID controller. A few of my servers have come with them, and I never really ended up using them. It would appear as though this piece-of-crap RAID controller might actually be of some use after all!

For those who stumbled upon this article by some mythical way with no knowledge of why you would want to do this to your PERC H310, well, the goal here is to present all the physical disks, which are connected to the RAID controller, individually to the operating system of choice (for creating software RAID, ZFS, etc) which would normally require a host bus adapter. It’s sometimes cheaper (and questionably easier) to flash a PERC to LSI FW rather than buy an HBA for your storage appliance.

Since I use FreeNAS, Xpenology, and other HBA-backed systems of software-defined storage, conventional server configurations or stock firmware don’t always make the cut.


How to flash H310 to IT mode

For this guide I am using FreeDOS to perform the necessary commands.

  • You can easily create a bootable FreeDOS USB with Rufus. I recommend doing that now.

Requirements:

  • USB stick
  • FreeDOS
  • LSI Firmware, tools, etc. (Packaged ZIP)

Once you have your FreeDOS bootable USB, download and extract the LSI Firmware files to the root of the USB drive, overwriting any files from the FreeDOS Rufus provided.

Boot from the USB.

  • Insert the USB in your server and boot from it
  • I hit dir in the DOS prompt to check that I could see the contents of the flash drive.

Overview:

Here I will  provide a high-level overview of the steps I am going to perform below in the DOS prompt with my prepared USB drive.

  • megacli.exe -AdpAllInfo -aAll -page 20
  • Write down sas address (hit enter until you see it)
  • megarec.exe -writesbr 0 sbrempty.bin (will output fail)
  • megarec.exe -cleanflash 0
  • Reboot the computer and boot back into the USB drive.
  • sas2flsh.exe -o -f 6GBPSAS.fw
  • s2fp19.exe -o -sasadd 500xxxxxxxxxxxxx(insert your SAS address)
  • Reboot the computer and boot back into the USB drive.
  • sas2flsh.exe -o -f 2118it.bin
  • Answer yes to the prompt
  • Reboot back to OS, you are done.

Step-by-step:

The first thing you’ll need to do is write down your SAS address of the PERC H310 card. You will need this later during flashing, so this is crucial.

Run this command and hit enter until you see your SAS address.

  • megacli.exe -AdpAllInfo -aAll -page 20

Write it down, take a photo, remember it, whatever!


Run this command before we flash the DELL 6GBPS SAS HBA firmware.

  • megarec.exe -writesbr 0 sbrempty.bin

If the result is a fail, you can move on to the next step.

Since it failed, we will prep the card for the Dell HBA firmware. We will be overwriting this later with the LSI firmware.

  • megarec.exe -cleanflash 0


 

Reboot your server and boot back into the FreeDOS USB.

  • This is the part where we flash the Dell HBA firmware.

We are going to run the following command to flash Dell HBA FW:

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


Next, you need to run this command and append the SAS address you wrote down earlier.

  • s2fp19.exe -o -sasadd 500xxxxxxxxxxxxx (replace this address with the one you wrote down in the first steps).

Reboot

  • This is the part where we replace the Dell HBA FW with LSI 9211-8i FW

Boot from USB and run the following command to flash the LSI firmware:

  • sas2flsh.exe -o -f 2118it.bin

It will interrupt you to ask you a question.

  • Would you like to flash anyways? Hit y for yes

Here is the rest of the output:

 

Let’s see what FreeNAS has to say about my disks:

I populated three of the drive bays of my PowerEdge R515:

  • 1x 3TB Dell SAS
  • 2x 1TB Dell SAS


Pics or it didn’t happen:

Here FreeNAS shows me each disk individually, and not as Dell Virtual Disks presented by the RAID controller.


I hope this helps you!

This guide is a visual instruction of the DOS / BIOS based flashing PERC H310 method from MattR’s original article

Thank you


6 Comments

Chris Holzer · November 17, 2017 at 3:47 am

Hi Tyler, I have a big problem. I followed your description to the letter, but when I enter “sas2flsh.exe -o -f 6GBPSAS.fw” after I did the reboot, I get “failed to initialize PAL”. What can I do?

horizonbrave · November 13, 2017 at 12:46 am

Hi, I wonder please if anyone had luck flashing the H310 inside a R710 Dell server.. unfortunately I don’t have any other machine/motherboard where I could install the card 🙁 I can’t even manage to boot freeDOS through a USB thumb drive (it’s a 3.0 model). Many thanks for any suggestion!

Giz Manning · September 7, 2017 at 6:41 pm

Run this command before we flash the DELL 6GBPS SAS HBA firmware.

megarec.exe -writesbr 0 sbrempty.bin
If the result is a fail, you can move on to the next step.

But what if result is Success????

    Tyler Woods · September 8, 2017 at 4:57 am

    It is poorly worded, my apologies; when you overwrite the flash with sbrempty you will either get success or fail. This is to say that if you get a fail, you may still proceed.

Leave a Reply