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


24 Comments

John M · September 1, 2018 at 1:10 pm

May I ask why you call the H310 a piece of crap in the opening paragraph? In IT mode – which is the whole point of this article – it does what it does extremely well and at a bargain price. Is that why you struck out your original assessment of the card but left it there for people to see? Do you actually quite like it now? If not, and it’s some form of irony, then it’s lost on me.

    Tyler Woods · September 1, 2018 at 1:17 pm

    Great question!
    It was a crap RAID controller specifically with write speeds in a RAID 5.About four years ago we were replacing those after figuring out that facilities with those raid controllers had significant performance issues.

    In IT mode it works wonderfully, yes, that’s indeed why I crossed it out but left it there.

    It’s cheap, by comparison the good RAID controller is the H710 which can have great specs but is much more expensive iirc.

    Thanks!
    – Tyler

Jlomaga · August 2, 2018 at 10:41 pm

Hello, hopefully this is seen. I completed the clean flash step and rebooted, now I get a System Halted error because of invalid PCIe card found. I can’t get around it. Any suggestions?

    Tyler Woods · August 2, 2018 at 10:47 pm

    You will need to move this to a different PCI lane. I’m assuming that it’s in the default storage card slot in a dell power edge. That will work up until the firmware is no longer dell. Then it will need to be in a standard PCI slot in your server

TobiasDax · July 22, 2018 at 5:19 am

ok, three things failed for me:
1. I had only a Mac and some Ubuntu/ Debian machines and creating a freeDOS stick with UNetbootin did NOT work at all. Had to borrow a windows machine and use rufus… did not expect that.
2. On the first try i got a 4003 error about not enough memory. this was fixed with downloading http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/repos/pkg-html/himemx.html and adding “DEVICE=himemx.exe” to the front of the config.sys file
3. the “megarec.exe -writesbr 0 sbrempty.bin” command was a success, but just following all the other steps seemed to work for me.

Everything is working now. Thanks for the help

Denver · May 31, 2018 at 7:40 am

Works perfectly! exactly with the description, step by step; the config is a H310 PERC with DELL PowerEdge R320;
Thank you

Mark · May 14, 2018 at 4:42 am

Many thanks for posting this. After several failed attempts to flash this card in the UEFI shell using the instructions on the unRAID fourm, this worked for me 100%. Now if I could only find a pair of M246M cables…

Insomniac · April 19, 2018 at 1:16 am

This worked perfectly. Much Thanks!

Jaykant Singh · April 10, 2018 at 6:05 am

I have performed given POA for H 310 to IT mode and all command gets successfully but after rebooting server, found controller is failed.

Luc · March 10, 2018 at 7:46 am

Hi guyz,
i have problem wiith h310 maybe some here will help me 🙂
no disk is seen after i’ve connected them to the controller. I’ve do flash to it mode and .. the same

disk i got hp 900gb sas 10k

Simon · January 29, 2018 at 4:50 pm

Worked for me, however I faced issue that half of RAM was detected by motherboard. This article helped fix the issue: http://yannickdekoeijer.blogspot.com/2012/04/modding-dell-perc-6-sas-raidcontroller.html

Thanks.

Johannes Casteels · January 4, 2018 at 3:53 am

Concerning the “staggered spinup” capability of this card, the default settings of the card in raid mode are:
Max Drives to Spinup at One Time : 4
Delay Among Spinup Groups : 12s

When flashing the card to IT mode, are these variables/values still used or configurable? Or does the card turn into a dumb HBA card also losing any staggered spinup capability?

Bill · November 28, 2017 at 11:34 am

I have a dell perc h310 and an old ga ep45 ud2h motherboard. The board would not boot gave this error message: No physical memory available at the location required for the windows boot manager. The system can not continue.
Tried flashing board while in the EP45 mb. Kept hanging after megarec.exe -writesbr 0 sbrempty.bin command.
Moved the board to an HP g1 800 sff and successfully flash the board. Reinstalled into the ep45 ud2h and now it boots and recognizes sas drives attached.
Thanks:)

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?

    Chris Holzer · November 17, 2017 at 4:11 am

    This article saved my a$$. I had to do it inside UEFI shell. 😀
    https://ciamician.wordpress.com/2015/03/06/flashing-your-dell-perc-h310-to-it-firmware-uefi/

    Tyler Woods · November 17, 2017 at 4:12 am

    Are you using a UEFI based system? You will have to boot to the freedos in UEFI mode and use the sas2flash.efi utility in the EFI Shell to flash the card.

      Rob · November 19, 2017 at 8:46 am

      Does this mean that the process will fail if I have an old BIOS motherboard?
      Do I need a UEFI board?

        Tyler Woods · November 19, 2017 at 8:49 am

        On BIOS motherboards it is easy to do when following the article. Use sas2flsh.exe

        On UEFI motherboards the process is only slightly different, but this will definitely work on both types.

          Rob · November 19, 2017 at 8:52 am

          Ok, thanks for the super quick answer and clarification.
          I’m all good to order an inexpensive H310 for use with FreeNAS then. 🙂

            Tyler Woods · November 19, 2017 at 8:57 am

            No problem!

            I threw an H310 in a PowerEdge R515 running FreeNAS and it has been the primary datastore for a corporate VM cluster of 8TB for almost 100 days now.

            Works well.

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!

    Tyler Woods · November 18, 2017 at 2:42 pm

    I haven’t personally tried in an R710 but I have tried in the R510 and R310 and it worked fine. It shouldn’t be much of an issue to get it flashed as long as you’re able to put in the PCI card and boot to the USB.

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