How-to: Flash LSI 9211-8i using EFI shell

Status
Not open for further replies.

boris_d

Cadet
Joined
Jan 19, 2017
Messages
4
My used HW: USB stick + Desktop PC (not the server board) with a motherboard Asus P9X79 WS (hosting i7-3930K + 16GB RAM but it doesn’t matter). The motherboard shall support UEFI version >=1.0 and be able to access USB from BIOS/EFI shell.

Step-by-step procedure:
  1. Insert the controller card in a PCIe slot. (I’ve used the slot Nr. 3. In case of troubles recognizing the card in your desktop PC try different slots.)
  2. Boot the PC and prepare the USB stick:
  3. In the USB stick create and format a FAT or FAT32 partition >= 10 MB. (I’ve created 500 MB FAT32 partition. I wouldn't recommend large partitions, who knows if the EFI shell will read every big partition.)
  4. Create the sub-folders for EFI boot. In the web there are two different structures: /boot/efi and /efi/boot. For time saving I’ve created both groups, it works.
  5. Download from Broadcom following packages: Installer_P20_for_UEFI and 9211-8i_Package_P20_IR_IT_Firmware_BIOS_for_MSDOS_Windows and extract them on your PC’s HDD.
  6. Copy from the downloaded packages three files to the USB stick root folder:
  7. from the first package the file sas2flash.efi (it is in sub-folder /sas2flash_efi_ebc_rel/);
  8. from the second package: 2118it.bin (it is in sub-folder /Firmware/HBA_9211_8i_IT/) and mptsas2.rom (it is in sub-folder /sasbios_rel/).
  9. Download from Github Tianocore the precompiled UEFI version 1 Shell: Shell_Full.efi. (Only v1 is applicable, later versions are not compatible with the flash tool and end up with the message: “InitShellApp: Application not started from Shell”.)
  10. Rename the Shell_Full.efi in ShellX64.efi and copy this file to following three USB stick destinations: root folder, /boot/efi/, /efi/boot/. (Again, there are different advices, for time saving it easier to use all three choices.)
  11. The creative part is completed, it's time for action. Restart the PC and enter the BIOS. If you use ASUS UEFI BIOS Utility in advanced mode, mouse click on the Exit (not by using keyboard “Esc”), in the next dialog select “Launch EFI Shell from filesystem device”. Other BIOS should behave similarly.
  12. Next you should see starting shell execution, ending with a prompt: "Shell>" (not the "2.0 Shell>"!).
  13. Type the command: map –b (+Enter) for listing of available disks. Locate which one is your USB stick. In my case it is the fs6:
    "fs6 :Removable HardDisk - … USB(…)"
  14. You can break further execution of the map command by q.
  15. Switch to the located USB stick by command fsN: (+Enter) (N=6 – in my example = "fs6:", set N to your USB stick ID).
  16. Dir shows the file list:
    2118IT.BIN
    MPTSAS2.ROM
    sas2flash.efi
    <DIR> BOOT
    <DIR> EFI
    ShellX64.efi
  17. The action can start. During it the power shall not be brocken!
  18. Erase the controller flash memory: sas2flash.efi -o -e 6.
  19. Write the new firmware to the flash: sas2flash.efi -o -f 2118it.bin -b mptsas2.rom.
  20. After a while you'll see the success message. You can restart the PC and check if the controller BIOS reports the new “IT”-firmware.
  21. The card is ready to use.

Some additional information

Building my first FreeNAS home server I’ve taken a Delock PCIe controller 89395. Its chipset Marvell 88SE9230 provided no errors in FreeNAS 9.10, but the S.M.A.R.T. tests on the connected disks failed regularly. Swapping the HDDs between the controller and motherboard SATA demonstrated that the HDDs were healthy, pointing to the controller as a cause of problem.
Looking for a better controller I’ve learned the popular LSI 9211-8i, which is optimal for my setup as well (8xHDD). The only disadvantage of the card is the IR firmware, which shall be overwritten at home by the IT version. People out there claimed with a lot of frustration attempting to overwrite the firmware. My experience has confirmed this and after a week of try-and-error, ending in success I've thought to share my experience.

To the question why I haven’t used my server board for flashing – I’ve tried and failed. My current server is built with some exotic industrial mini-ITX. I've issued troubles and couldn't find any information in the web.

My current configuration: motherboard DFI HR100-CRM, i5-2510E 2.5GHz, 16 Gb RAM, FreeNAS 9.10 on 8 Gb CF card, 8 x 4Tb Seagate ST4000DM000 HDD.15, RAIDZ2, case Silverstone DS-380, Power Supply 450W Silverstone ST45SF-G.
The FreeNAS 9.10 runs without any problems.

The used motherboard is only temporal solution for the first experience. It will be replaced next time by: ASUS P10S-I + Xeon E3-1240 + 32 Gb ECC RAM –currently the best CPU Mark/$ on the DIY home server market. The Atom C2xxx boards (Supermicro, Asrock) are NoGo due to the known CPU bug and pure performance/$ (compare the CPU Mark and prices on the market). Secondly the passive cooled Atom boards overheat according to user experience and require active cooling as well.

Some useful sources:
  1. Flashing IT Firmware to the LSI SAS9211-8i HBA
  2. Obtaining UEFI Shell
Boris
 

demon

Contributor
Joined
Dec 6, 2014
Messages
117
For what it's worth, if you're not a) booting from a drive attached to your SAS adapter (if you're using FreeNAS, the answer to that is probably "no") and b) not attempting to make use of staggered spin-up mode on your SAS-attached drives, you'll likely be better off to drop the -b mptsas2.rom bit from the firmware reflash step. It saves time and complication - it's one less PCI opROM to boot on every startup, and one less ROM setup to get bogged down in - plus, it'll keep the SAS drives out of your boot device list.
 

boris_d

Cadet
Joined
Jan 19, 2017
Messages
4
Well, maybe good idea for some applications, especially with frequent reboots. NAS is rather less impacted.
Right, staggered spin-up is not necessary for home servers, but skipping the mptsas update will you still get access to the controller command line interface? Mptsas provides the command line interface as discussed in the web.
http://www.natecarlson.com/2010/08/23/lsi-command-line-utility-for-sas2-non-raid-controllers/
I don't use it, just found some infos. Anyhow why to skip if it doesn't disturb and provides some nice features?
 

demon

Contributor
Joined
Dec 6, 2014
Messages
117
Well, maybe good idea for some applications, especially with frequent reboots. NAS is rather less impacted.
Right, staggered spin-up is not necessary for home servers, but skipping the mptsas update will you still get access to the controller command line interface? Mptsas provides the command line interface as discussed in the web.
http://www.natecarlson.com/2010/08/23/lsi-command-line-utility-for-sas2-non-raid-controllers/
I don't use it, just found some infos. Anyhow why to skip if it doesn't disturb and provides some nice features?

All the -b mptsas2.rom bit adds is the boot ROM (which is presented as a PCI option ROM). The command line tool sas2ircu won't be affected; most of the functions it provides are related to RAID functionality, which if you're crossflashing to the IT (target-only) device ROM, you won't use anyway. I just tried the sas2ircu command on my FreeNAS box, and what few subcommands are available with the IT device ROM work just fine.
 

boris_d

Cadet
Joined
Jan 19, 2017
Messages
4
Yea, good info. Thanks for testing, I'll skip the mptsas2.rom next time on flashing.
 

Meyers

Patron
Joined
Nov 16, 2016
Messages
211
I used this procedure to flash a couple of 9211-4i cards to IT mode over remote KVM / IPMI on servers I rent for work. This was a bit of a challenge to get done. This info was very helpful, so I thought I'd say thanks (thanks!) and leave some additional clues to anyone trying to do this in the future over remote KVM with virtual media.

These are 12x4TB storage servers rented from OVH. They use Supermicro boards, Avago 9211-4i cards, and HGST 7k6000 SAS drives (512 sector size models). You can add up to two USB flash drives to these servers for an additional fee, so I added 2x64GB and mirrored FreeNAS boot.

There is an IPMI tab in the OVH manager that provides a Java remote KVM / IPMI client download. This client has a virtual media feature that allows you to attach ISOs, hard drives, flash drives, etc. and boot the server off of that. I installed FreeNAS via the ISO and that worked perfectly. However, getting the client to load the flash media was just about impossible in Windows and MacOS due to security restrictions like UAC. I couldn't disable UAC for this so I had to figure out something else.

I finally got it to work by opening the Java remote KVM / IPMI client in a Ubuntu VM with the javaws command, which is installed by the icedtea-netx package. The download from the OVH manager was a file called kvm.jnlp and the command to open that was sudo javaws kvm.jnlp. I had to run this as root in order to attach the USB drive as virtual media.

I followed the procedure above to create a bootable flash drive and while it would show up in the server's boot menu, it would NOT boot for some reason. I noticed that these servers have a built in EFI shell, so I booted to that and was able to follow the procedure from step 13 on using the files I had copied over to the flash drive ( map -b to show a list of attached drives, fs1: (or whatever number) to use the drive, and so on).

Since I'm booting FreeNAS from flash drives, I decided to run sas2flash.efi -o -f 2118it.bin to exclude the BIOS, and that worked perfectly (after erase). This reduced the server's boot time by probably 10-20 seconds too.

Creating an ISO with these files on it probably would have worked, or just copying them over the to a USB hard drive and attaching that virtually (I found out later that USB hard drives could be attached in Windows regardless of UAC settings, but flash drives could not!). The Supermicro EFI shell can then be used to run these commands. I'm sure other server's EFI shells would work as well.
 

kevrae

Cadet
Joined
Sep 26, 2017
Messages
1
Been trawling the net for a couple of days after ordering a 9211-8i from china. Just thought id post and say thanks great instructions I had been having a headache trying to sort this out.
 
Status
Not open for further replies.
Top