BUILD [HOW-TO] Flashing LSI SAS HBA Controller [EFI/UEFI]

Grinas

Contributor
Joined
May 4, 2017
Messages
174
Back Story
I had some trouble flashing my LSI 9217 controllers so wrote up this doc to share. Every youtube video appear to be made by people who were too confused fro me to confidently follow them and any guide i came across that seem to work i would run into the issue of not being able to run the flashing tool to work. The root cause was I needed to be in EFI/UEFI and use the relevent installer for this boot type. After about 6 hours messing about and researching I finally got the controllers flashed.

YOU DO THIS AT YOUR OWN RISK.

What you need.

Getting Controller Model - SKIP if you know the model.
  • Identify your card so you can get the firmware. This can be done by rebooting the server with the card installed and going into the controller config by pressing the buttons displayed. In my case it is Control+C.
    1.png
  • Next You will be able to see the controller model in the config page like in the below image. Take note of this
    2.png
  • Now go to the Broadcom site and get the firmware for your controller.








    Creating bootable USB
    • Format usb to freedos using Rufus.
    • 3.png


    • After it completes the format then. Create a folder on the root of the USB called “efi”.
    • In the “efi” folder create another folder called boot.
    • Copy over the “Shell_full.efi” file to boot folder and rename it “bootx64.efi”. Now the tree should look like /efi/boot/Shell_full.efi
    • Copy over the following files that you downloaded earlier to the root of the usb.
    • mptsas2.rom
    • 9207-8.bin(this will be different if you have a different card)
    • sas2flash.efi
  • The root directory of the USB should look like this but with the firmware for your version of controller.
    4.png

Preparing the Host
  • Boot to BIOS. On the server or in my case the Lenovo TS140 boot into bios. On the TS140 this can be done by pressing “F1” when the server is booting.
  • Change the boot mode to UEFI. Now in BIOS go to the boot mode and change it to UEFI. (On the TS140 this under startup)

Flashing
  1. Disconnect all USBs and drives from the server and insert the USB.
  2. Start the server as normal and you will see it brings you to the following screen.
  3. Type “map” and press enter to find the device ID of the USB so we can move to it. A list of drives will then be printed. Find yours in the screenshot below my drive has the ID of “fs4”
    7.png
  4. Next mount the drive using the following command. “mount <ControllerID>” in my case “mount fs4”. Once mounted then move to the USB directory using the following command “<ControllerID>:”
    8.png
  5. Confirm you are in the correct device by listing the directory using the “dir” command.
    9.png
  6. Check the installer works by listing the controllers using the command “sas2flash.efi -listall”
  7. Next we erase the running flash/bios on the RAID controller by running the following command. “sas2flash.efi -o -e 6”. NOTE: DO NOT EXIT WITHOUT FLASHING as your HBA has no firmware or BIOS.
    11.png
  8. Now to flash the firmware using this command. “sas2flash.efi -o -f <FIRMWARE> -b mptsas2.rom”. This can take about a minute.
    12.png
  9. Once completed then run the command in step 6 to confirm it has flashed correctly. You should see the firmware you flashed under firmware version.
  10. change back you boot settings as detailed in "preparing the host"
  11. YOU ARE DONE.
 

Attachments

  • 6.png
    6.png
    527.1 KB · Views: 830
Last edited:

Buttnugget

Cadet
Joined
Jul 27, 2022
Messages
1
Hello, I also has the same HBA as yours, the LSI 9217 8i. It says that you need to copy the sas2flash.efi file to the usb drive. But, when I download the firmware package, I didn't get the sas2flash.efi file. Instead, I get the sas2flash.exe. There are 3 folders containing the same sas2flash.exe files, and I cant find the one with .efi. Do you have any idea where i could get the .efi files?

thank you
 

Attachments

  • Screenshot 2022-07-27 143706.png
    Screenshot 2022-07-27 143706.png
    2.8 KB · Views: 340

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
I would expect you can use the .exe since the .efi is just an executable for unix and you're likely in DOS at that point.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
I would expect you can use the .exe since the .efi is just an executable for unix and you're likely in DOS at that point.
.efi is an executable for the standalone EFI shell. Which is a great improvement over having to boot some version of DOS.

You can r/w-mount and copy to the EFI partition from any running OS, since it's just FAT32. Then reboot with console via IPMI, invoke EFI shell, flash away ... no DOS USB drives, anymore.
 

SmItLeR

Cadet
Joined
Apr 4, 2022
Messages
8
I wanted to get some assistance with this if possible. I think I've flashed my 9217-8i correctly, I had no errors during/after the process. The only thing I'm getting now is a constant alarm right after the card was flashed (whilst still within EFI Shell).

I reboot my server (Cisco UCS C240M3) and right after it does a hardware test the buzzer/alarm is constant and it won't go past the HBA Bios boot screen, it just sits there and says initializing.....

I'm unable to go to any further. I wonder if anyone has any insight as to what is going on here?
 

Attachments

  • 20230109_092106.jpg
    20230109_092106.jpg
    198 KB · Views: 333
Top