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


44 Comments

Argus · November 18, 2020 at 8:07 am

Great job on this tutorial! I successfully flashed my perc h310 pcie card but the system (t1650) doesn’t recognize the card or the drives at all… is there something that I’m missing here.

I installed the card and tried to play with it to get familiar with it before I flash the card with your step by step tutorial. When the computer would post I never had access to the mobo bios… went straight to the card bios and would not let me into the bios with the that it said to do to enter bios config… dont know if card was bad to begin with… any thoughts or suggestions I’m anxious to get this going. The idea of 6Gbps data ports on this machine running freeNAS is great.

    Argus · November 21, 2020 at 4:38 am

    Turns out the card is being recognized by the system… the problem was the SFF-8087 cable I had needs to be a forward breakout cable… once I got that in there this worked like a champ…

Lasse Koester Pedersen · January 18, 2020 at 3:04 am

Just some quick info here – Been trying to flash from all kinds of guides over the last couple of days…. and the problem with this guide failing is the part where you reboot the computer. please change that to power cycle the comptuter… a simple reboot doesn’t reboot the h310 controller. you have to actually turn the computer off and then on again

mstlogtech · December 12, 2019 at 6:59 pm

After first reboot I have:
Invalid PCIe card found in the Internal Storage slot!” in R720 should I throw away the server?

    Tyler Woods · December 12, 2019 at 7:07 pm

    Internal storage slot in r720, is that an h310 mini? it wouldn’t be the same chipset as the full pcie perc h310, which is the cheap and widely available raid controller you can use in almost any machine. if it’s a mini and is busted I’m not sure if you can fix it but you’ll need the pcie version to use it as HBA anyways.

maggots · November 29, 2019 at 11:44 am

How long are you waiting for the result of the
megarec.exe -writesbr 0 sbrempty.bin comments?
Unfortunately, I waited for almost an hour…

    Tyler Woods · November 29, 2019 at 11:47 am

    it is probably hung, I would take caution here, possibly attempt to cancel the task with CTRL+C or CTRL+Z and re execute it, but with the expectation that the card could no longer be responding after cancellation. also maybe try other BIN files to verify if the card is responding or not.

    good luck!

Jonah · November 23, 2019 at 1:16 pm

what if you dont have the sas address, i accidentally erased the card, then realizing I needed the sas address.?

David Levine · November 5, 2019 at 4:27 pm

Great article, I will be buying one of these cards, but my goal is to use it as a hardware RAID controller, i want to install Ubuntu 18.04 and run it on a RAID 1 mirror. My question is, if I do flash it to IT mode, can i still create a hardware RAID 1 or 5, or 6? Any idea if i can create the hardware RAID and still boot Ubuntu just fine? Thank you!

I see this persons post might half answer the question but i am just not too clear, what exactly does IT and IR mode stand for?

“If I want to flash in “IR” mode (bootable). I tried to use the same method, but with 2118ir.bin (instant of 2118it.bin) and adding “-b mptsas2.rom”.”

    Tyler Woods · November 5, 2019 at 8:29 pm

    IR firmware is for Hardware RAID and IT firmware will force you to create the RAID in your OS (software raid)

    Based on your use case it doesn’t sound like you’ll need to flash the H310 at all after you buy it.

    Assuming you’re going to be using a RAID level with no parity. If you want to use parity (RAID5, RAID6) you should not use the H310 at all and instead go for the H710

Daniel · October 2, 2019 at 11:41 pm

Still working great, just did a flash on a h310 card in a Dell precision t3600. I wanted smart functionality and it seems to work. Thank you for an excellent guide!

Sebastien Plante · February 25, 2019 at 8:51 pm

If I want to flash in “IR” mode (bootable). I tried to use the same method, but with 2118ir.bin (instant of 2118it.bin) and adding “-b mptsas2.rom”. Work fine, but ESXi see it as a “6 Gbps HBA”. Can I flash a firmware to get it to be seen as a real “9211-8i” LSI card ?

mrcb7 · December 9, 2018 at 3:28 pm

I’m having issues at the point where I attempt to install the Dell 6GBPSAS.fw file. Every step before that went fine.

When I tell the flasher to load the fw file using the command line: sas2flsh.exe -o -f 6GBPSAS.fw

It starts the LSI flash utility and then it hangs on “Chip is in RESET state. Attempting Host Boot…”

It will remain here until I manually turn on the computer. I’m attempting to run this on an old AMD desktop with ASUS mobo.

Thanks

mrcb7 · December 9, 2018 at 3:20 pm

Everything worked fine up until I attemtped to install the Dell 6GBPSAS.fw file.

After I enter “sas2flsh.exe -o -f 6GBPSAS.FW”. the loader starts and just hangs at “Chip is in RESET state. Attempting Host Boot…”

It will stay like this until I manually power down the system. I’m running this on an old AMD desktop with ASUS mobo.

Jason Kusar · November 21, 2018 at 8:20 pm

Hi. I have three perc 310s. One of them worked perfectly according to your directions. The other two did NOT fail the sbrempty step. As a result none of the rest of the commands worked. Have you seen this before? I think I bricked one of them so I’m hesitant to just try things on the last one.

Thanks!

Chris Phillips · November 13, 2018 at 12:09 pm

Thanks for the detailed instructions! I had to try five different computers before I found one (a stock SuperMicro) that would accept the commands without freezing.

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

      dynamiteboy13 · May 7, 2019 at 8:17 pm

      So if I flashed Dell’s Built-in controller, this will not work I am assuming because it gives the system halt error. I need to actually purchase a separate PCIE RAID controller and flash it accordingly? Does anyone know how to get around the system halt error?

      Jonathan Schaumloeffel · May 7, 2019 at 8:21 pm

      So I am assuming this does not work with the Dell R620 built-in controller because now I am getting the system halt error. There is nothing to move because the back-plane is plugged in directly to the MB. Is there anyway to get around the system halt error?

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

    Sean Miller · December 9, 2018 at 10:56 am

    Thanks for posting about the himemx.exe Was stuck on this forever!

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/

      Dance M. · July 27, 2020 at 7:16 pm

      Thanks for the tip about UEFI and for the link, you made my day, I thought that it will be the end with that error 🙂

    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