Danger Will Robinson!!
This page has information which is not substantiated, and certainly not supported by any vendors mentioned on this page. Any damage sustained to yourself, your equipment, or your data is entirely your own responsibility, and if you break things, whilst I am sympathetic and feel your pain, I am not responsible as in no way am I suggesting this is a good idea.
I habitually push boundaries.. there, I’ve got that off my chest.
Having recently bought myself some Cheap home datacentre-quality gear, a Supermicro X9DRH-7F, I wanted to pass the onboard LSI 2208 controller to FreeNAS in a VM, to save having to plug in a PCIe expansion board. My prior experience with LSI HBA’s said that it was pretty easy to flash them between RAID and IT mode firmwares, as I’d done it before by Flashing the Dell Perc H310 with an IT firmware. I didn’t even research it before diving in – I just grabbed a boot disk, loaded it up with LSI tools like megarec, megacli, and sas2flash, and got to work backing up the firmware blocks and wiping the BIOS on the card.
Then when looking for firmware, I found several pages across the interwebs saying that there is no IT mode firmware for the LSI 2208 chipset on my motherboard, and that basically if I wanted to use it, the best I could hope for was JBOD mode through the hardware controller. Yuk. However, I got to researching, and found these pics in different documents:
In the red corner, we have the heavyweight LSI2208, sporting a pair of PowerPC 440 processors at 800MHz, with a x8 PCIe bus, and a 4.8Gb/s SAS-2 core, as well as 4MB of context memory.
In the blue corner, we have his slimmed down LSI2308 brother, genetically similar, with the same features, but only a single PowerPC 440-series processor, but at the same 800MHz.
The important piece of information is that the LSI2308 *does* have IT mode firmware, and I actually have a couple of HP 220 cards which use that chipset, both of which I’ve flashed to the LSI firmware v20.
Given the similarity of the 2208 and 2308, I wondered whether I couldn’t just flash my X9DRH’s onboard broadcom chipset with a generic LSI HBA firmware, and, having already wiped the card, figured I’d give it a shot.
This is the point where some of you will think “this guys a fuckwit, why is he risking a really expensive motherboard and functional RAID controller?”. To me its not functional.. I have an ideological dislike of hardware RAID devices, and have a strong preference for software RAID-type solutions, on the basis that a hardware failure can be recovered using generic commodity hardware, as frankly, I’m not a data centre and don’t keep hot-swappable spare parts on the shelf in case of failure.
Anywho.. lets get on with it. (/hattip to my in-laws for that word.. there’s something satisfying about saying it like that instead of boring old “anyhow”. The older I get, the more relaxed I am with the concept that language is a fluid beast, and not a set of rules to be enforced by grammar nazi’s who argue over stuff like whether an oxford comma is the right thing to do or not.
Lets start with the outcome, as I… well.. see for yourself:
Flashing from RAID to IT Firmware
This is entirely unsupported, and not recommended by anyone. Its here purely as a curiosity, so if you feel compelled to copy these commands and end up bricking something, or suffer any negative outcome, its your problem. I can’t see any support people at any vendor saying “oh? flashing the firmware from a completely different device caused issues? thats unexpected!”.
Here’s how I made the above happen, for my own records..
I used 2 USB sticks.. 1 which was DOS bootable with the megarec etc. tools on it (see below to find the link to LSI_DOS.zip with the tools in it), and another which just had the sas2flash.efi file on it to use from EFI shell.
Files I had/found with useful stuff in:
- 9207_8i_Package_P20_IR_IT_FW_BIOS_for_MSDOS_Windows.zip (has the 9207-8.bin firmware and mptsas2.rom bios in it)
- 9207_8e_Package_P14_IT_Firmware_BIOS_for_MSDOS_Windows.zip (if you’re using DOS, the sas2flash in this version seems to care less about cross-flashing cards than newer versions)
- lsi_dos.zip (has megarec, megacli, sas2flash etc. in it)
- lsi2208fixer.zip (this has the 2208 recovery firmware, as well as the above lsi_dos.zip contents in it)
- sas2008.zip (this has the empty SBR bin file in it)
- Installer_P20_for_UEFI.zip (this has the version of sas2flash.efi in it for UEFI shell)
First – see if megarec can see the device.. if it can’t, don’t give up, try other versions of megarec.exe (LSI tools are weirdly fickle on interoperability across vendors/chipsets)
Next, backup the SBR and SPD for the RAID card:
megarec -readsbr 0 smc2208.sbr megarec -readspd 0 smc2208.spd
I chose “smc” for “Supermicro”, and I stick with the traditional DOS 8.3 filename/extension format.
megacli -adpallinfo -a0 > allinfo.txt
In this file, is the magic line which stores the SAS address of the card – which is globally unique to the card. Good to have it stored in a file, so I can restore it if it gets wiped!
Now its time to start wiping the card.. first up, replace the SBR with one I got somewhere (not sure where.. possibly the
megarec -writesbr 0 empty.bin
Not sure where I got empty.bin from – I have another file called sbrempty.bin which may be the same?
Last step is to wipe the flash memory..
megarec -cleanflash 0
Next, reboot (thanks vanfawx @ STH forums for checking the instructions)
And then switch to sas2flash (had to use the EFI version on this motherboard):
Good, it can see the card. There are multiple versions of sas2flash (and sas2flsh.exe). When I flashed my HP220, I had to get the sas2flsh.exe (DOS version) from the old v14 LSI drivers, as the newer sas2flash wouldn’t work.
sas2flash -o -f 9207-8.bin -b mptsas2.rom
Note you don’t have to flash the bios file (mptsas2.rom) – if you leave it off you’ll get faster boot times, but it does also give some config options.
Verify that it can see the card, but you’ll notice the “SAS Address” like is all zero’s – need to reprogram the address which was saved using megacli earlier.
sas2flash -o -sasadd 50030480195exxxx
Lastly – if you need to back-track and want to reflash without the bios, use this command to wipe it whilst preserving the SAS address – before reflashing just the firmware and leaving out the BIOS
sas2flsh -o -e 6
Going the other way, back to 2208 firmware
Yes, this is possible. Before taking screenshots and doing the above, I got my card back to being a fully functional LSI2208, with only a couple of “sinking-feeling moments” along the way. It involves using the recovery firmware from LSI – which I found via this superb thread on ServeTheHome: https://forums.servethehome.com/index.php?threads/is-there-a-way-to-restore-an-lsi-2208-after-firmware-update-failure.13237/
Recovery process I went through:
Using LSI_DOS.zip package from above linked thread (extracted from the ISO – appears to be the same DOS tools I used to flash to the IT firmware above):
megarec -cleanflash 0 (reboot) megarec -writesbr 0 smc2208.sbr megarec -m0flash 0 2208_16.rom (this is the rom from the LSI recovery ROM thread linked above) (reboot - got to working firmware ver 3.270.65-2578 )
Using latest version of the Supermicro 2208 firmware found here:
megacli -adpallinfo -a0 (spits out long file including SAS Address and all config options) megacli -adpfwflash -f smc2208.rom -a0 (reboot - working latest firmware 3.460.115 from supermicro)
Oh and I think there might have been a step in the recovery where I had to program the SAS address back onto the card again – one of the mega* tools has that ability, but I don’t seem to have notes for that step, as I was just pleased to have un-bricked my card. It might have been something like:
megaoem -sasadd 50030480195exxxx