Cross-flashing LSI 9240-8i
If you are reading this and using this as a guide….. you are crazy. I joke, but seriously DISCLAIMER if this fudgess up, it is not my fault.
Firstly, what is a cross flash? Essentially its where you flash the BIOS of one product into another. This is not guaranteed to work for every single product in existence, but in the case of the LSI 9240-8I (and IBM M1015) it can be done.
In this particular case the LSI card is being flashed to the lower spec model LSI 9211-8I. Why? Well the 9211 has the option and the BIOS to run in a mode called “Target Initiator” (IT mode). In this mode any disk is presented to the Host’s operating system as just a regular connected disk with all the HDD/SSD on board information being passed through to the host OS (aka the SMART data).
When running this card normally it is a full blown RAID card. Capable of controlling up to 64 disks in groups of 16 in either RAID 0,5,10 or 50. RAID 1 setups are limited to 2 volumes with hotspare. Basically, this thing can do moderate sized arrays (However I would advise against running large arrays with large disk sizes due to failure and rebuild issues. If you have no idea what I am on about… google it, RAID is unsafe IMO for reliable non-backed up data)
Although this card can control 64 disks in a Non-RAID mode, the issue is that the RAID card will mask the SMART data from the host OS. Why is this an issue? Simple, ZFS. ZFS is a beast of a filesystem. If you’ve ever tried to access a file a couple of years after storage and magically become corrupt, you’ve fallen victim to ‘Bit Rot’. Bit Rot is where data is simply lost (on HDD’s) when the magnetic polarity is weakened and can not be accurately read. Basically your 1 magically turns to a 0. Not good. ZFS combats this head on, with scrubbing and other neat features. I am not the best to try and describe this (nor do I want this entire post to be about the joys of ZFS) so give the FreeNAS manuals a read if you truly want to understand it.
The only stipulation of using ZFS, is that it really needs access to the HDD/SSD directly. That means it wants to read the SMART data. As mentioned running most RAID cards in Non-RAID mode masks this information. This is where the IT mode comes in. Essentially taking the LSI 9240 and flashing it to the 9211 in IT mode, turns the RAID card into a HBA. (it was a HBA before but with additional functionality) A HBA is short for Host Bus Adapter and does what it says on the tin. Adapts the host machines bus to a different connection type, in this case SAS.
At the bottom of this post you shall find a video with my failures and success in getting this to work. This “guide” is written off of the successful approach to doing this.
So what are you going to need for this.
- LSI 9240-8i (Obviously)
- 1 USB Flash Drive (Any size should be fine)
- A way to format the drive. Windows: you can use DiskPart
- A UEFI capable computer
- Latest LSI 9211-8i firmware for UEFI
- 9211_8i_Package_P20_IR_IT_Firmware_BIOS_for_MSDOS_Windows
- Installer_P20_for_UEFI
In this case the P20 revision of the BIOS was used. The reason I state the machine needs to be UEFI capable, is that although people have tried this with non-UEFI systems (and succeeded) I could personally not get the card to flash and was quite lucky I did not brick the card!.
Step one: Format the memory stick. This needs to use MBR and can either be FAT or FAT32 (use FAT if your drive is smaller than 4GB). You do not need to make this DOS bootable, as this is being done from the EFI Shell.
Step two: Unzip the two files downloaded from LSI’s website. You are going to require:
- sas2flash.efi
- mptsas2.rom
- 2118it.bin (firmware\HBA_9211_8i_IT directory)
Simply copy these files onto the USB drive.
Step three: Turn off your machine. After doing so, unplug ALL unnecessary expansion cards and what not, just in case something goes….wrong. Turn on your machine and get to your EFI shell. This varies by motherboard manufacturer so check your manual. On my particular board (the ASUS ROG Rampage IV Extreme) this is done by going into the BIOS and exiting. In the exit menu, there is the option to drop into the EFI shell.
Step four: Find your card and flash it. You need to mount the thumb drive for use within the EFI session. This is done simply by typing…
mount (drive)
In my case and likely yours as well (if you unplugged everything)
mount fs0
Navigate to the drive.
fs0:
And check that the files are there with either “ls” or “dir”. Now to check the card is there and flash it.
sas2flash.efi -listall
You should see the current card and its version.
sas2flash.efi -o -e 6
To erase the current BIOS. DO NOT REBOOT, I got away with rebooting but it does not mean you will be as lucky.
sas2flash.efi -o -f 2118it.bin -b mptsas2.rom
To write the new firmware to the card. If you repeat the command:
sas2flash.efi -listall
You should now see that the card reports itself as the new card with different firmware. Then its as simple as rebooting and using Ctrl+C to enter the LSI BIOS when prompted and just check the card is actually in IT mode.
Hey presto, you should now have a cross-flashed card. To revert this, it is as simple as doing these steps but with the original BIOS. You may wish to back up the original BIOS, but you can grab the latest from LSI’s website if you chose to go back.
As mentioned, here is the bad video of me doing this and my failures before success.