# Flashing my m1015



## dvl@ (Jul 16, 2015)

Tomorrow I should take possession of 3x IMB m1015 cards.  My first goal is to flash them into IT mode.  The M/B is a Supermicro X10SRA (with UEFI 2.3.1).

If you've flashed, what did you do?  DOS?  I plan to do this from UEFI.

I have heard firmware v19 is best for FreeBSD 10.x as it does not like v20 (the latest).  Can anyone confirm?

[NOTE: confirmed below that current release of v20 are OK for FreeBSD]

Granted, I have done something similar once before and written about it here in the forums.  I also supplied photos, so I should be able to reproduce past results.  

Ideas? Suggestions?  Comments?


----------



## dvl@ (Jul 17, 2015)

This worked for me on all three cards.

Short version: I was unable to flash the card without first erasing some of the card. I used a DOS shell first, then rebooted into a UEFI shell to complete the job. Details to follow.

NOTE: These instructions assume there is only one LSI card in the machine.  I flashed multiple cards, but only one at a time.

Background: My LSI card was flashed with vp20 and looked like this on boot:







My *original and failed plan* was:

`sas2flash.efi -o -e 6
sas2flash.efi -o -f 2118it.bin -b mptsas2.rom`

sas2flash could not see the HBA.  I get:  no lsi adapters found






I found this reference to the problem which indicated a need to first erase the flash from within DOS.  The suggestion shows the same commands as the guide I found earlier (IBM SERVERAID M1015 PART 4: CROSS FLASHING TO A LSI9211-8I IN IT OR IR MODE) and which seems to be widely referenced.

*The solution which worked for me:*

I needed two USB thumb drives:

bootable with DOS. I used http://www.chtaube.eu/computers/freedos/bootable-usb/
non-bootable MS-DOS formatted for use within the UEFI shell
On the bootable DOS thumbdrive, I placed the files downloaded from http://forums.laptopvideo2go.com/topic/29059-sas2008-lsi92409211-firmware-files/ (look for link labeled SAS2008 at the top of the page; it links to http://www.files.laptopvideo2go.com/hdd/sas2008.zip).

I placed all those files into a subdirectory on my bootable DOS thumbdrive, just to keep it neatly organized.  I named the directory SAS2008.

I booted the server from the DOS thumbdrive.  I found the `odin` shell was best.  The FreeDOS solution provides many options and I had a problem with the default shell.

From the `odin` shell, I issued these commands:

`megarec -writesbr 0 sbrempty.bin
megarec -cleanflash 0`

I then rebooted into the UEFI shell to complete the tasks.

*The nonbootable USB drive contents*

NOTE: I originally used P19, because early versions of P20 were not good on FreeBSD. As you see in other replies to my OP, recent version of P20 are OK.  You can use them instead.  I have since flashed my cards with 20.00.04.00

I downloaded the following files from http://www.lsi.com/support/pages/download-search.aspx : under each file name is the list of files I grabbed from that zip:

9211-8i_Package_P19_IR_IT_Firmware_BIOS_for_MSDOS_Windows.zip

 mptsas2.rom
 2118it.bin

Installer_P19_for_UEFI.zip

 sas2flash.efi

For reference:

`$ ls -l
total 2424
-rwxrwxrwx@ 1 dan  staff  721004 Apr 15  2014 2118it.bin
-rwxrwxrwx@ 1 dan  staff  201216 Mar 19  2014 mptsas2.rom
-rwxrwxrwx@ 1 dan  staff  395264 Apr 15  2014 sas2flash.efi`

*Boot into the UEFI shell*

With the non-bootable thumbdrive in place, boot your server into its UEFI shell.

Here, we do two commands: flash the card; set the SAS address which was erased by the previous command.

My thumb drive showed up as fs0 and so I issued these commands:

`sas2flsh -o -f 2118it.bin -b mptsas2.rom
sas2flsh -o -sasadd 500605bxxxxxxxxx`

*where* the xxxx stuff is from the back of my card.  I did not enter spaces or dashes, only digits and letters.

When I issued this command, I saw the results were good:


----------



## Terry_Kennedy (Jul 20, 2015)

dvl@ said:


> I have heard firmware v19 is best for FreeBSD 10.x as it does not like v20 (the latest).  Can anyone confirm?


Phase 20 was rebuilt twice to fix issues. The latest (as of this post) is 20.00.04.00. I am using it successfully on FreeBSD (both IT and IR versions).



> Suggestions?  Comments?


I'd suggest backing up all of the flash components first (via `sas2flash -o -u[I]xxx[/I]`, where _xxx_ varies - do `sas2flash -o -help` for the complete list), as well as the SBR/SPD (`megarec -readsbr / -readspd`).

`megarec` will see some cards that `sas2flash` will not. This means that "adapter 0" may not be the same card in both utilities. I managed to clobber a Dell PERC H700 because of this - fortunately it was recoverable.

`megarec` has problems with some OEM cards with smaller flash. I have an OCZ Velodrive (2114IR) which only has 4MB flash, so `megarec` errors out at exactly 50% on `cleanflash`.


----------



## dvl@ (Jul 20, 2015)

Terry_Kennedy said:


> Phase 20 was rebuilt twice to fix issues. The latest (as of this post) is 20.00.04.00. I am using it successfully on FreeBSD (both IT and IR versions).



Thanks. I will try that version.



> I'd suggest backing up all of the flash components first (via `sas2flash -o -u[I]xxx[/I]`, where _xxx_ varies - do `sas2flash -o -help` for the complete list), as well as the SBR/SPD (`megarec -readsbr / -readspd`).
> 
> `megarec` will see some cards that `sas2flash` will not. This means that "adapter 0" may not be the same card in both utilities. I managed to clobber a Dell PERC H700 because of this - fortunately it was recoverable.
> 
> `megarec` has problems with some OEM cards with smaller flash. I have an OCZ Velodrive (2114IR) which only has 4MB flash, so `megarec` errors out at exactly 50% on `cleanflash`.



Is the recommendation in the first paragraph because of the issues in the 2nd & 3rd paragraph?


----------



## Terry_Kennedy (Jul 21, 2015)

dvl@ said:


> Is the recommendation in the first paragraph because of the issues in the 2nd & 3rd paragraph?


No, just to have various files around in case you need to put the card back the way it was before you started, or got stuck because one of the steps involves flashing the SBR that you erased earlier.


----------



## Oko (Jul 21, 2015)

dvl@ said:


> If you've flashed, what did you do?  DOS?  I plan to do this from UEFI.


Sorry for this late replay Dan. I just had to deal with this on a replacement motherboard sent to me for a dead server. LSI recommends UEFI flashing if the motherboard supports it.  Mine didn't as it was older so I ended up using live DOS image.


----------



## arthur (Oct 14, 2015)

Terry_Kennedy said:


> I'd suggest backing up all of the flash components first (via `sas2flash -o -u[I]xxx[/I]`, where _xxx_ varies - do `sas2flash -o -help` for the complete list), as well as the SBR/SPD (`megarec -readsbr / -readspd`).
> 
> `megarec` will see some cards that `sas2flash` will not. This means that "adapter 0" may not be the same card in both utilities. I managed to clobber a Dell PERC H700 because of this - fortunately it was recoverable.
> 
> `megarec` has problems with some OEM cards with smaller flash. I have an OCZ Velodrive (2114IR) which only has 4MB flash, so `megarec` errors out at exactly 50% on `cleanflash`.



How did you recover the Dell PERC H700? I had the same problem. Thanks


----------



## Terry_Kennedy (Oct 15, 2015)

arthur said:


> How did you recover the Dell PERC H700? I had the same problem. Thanks


Download the latest H700 firmware update from Dell and unpack it. WinZip should be able to open the Windows version of the update binary. Grab the .rom file out of there and put it on some bootable media (normally a USB stick these days) with the megarec utility.

Boot that media in the system with the H700 and make sure the H700 is the only controller that megarec sees. Then do `megarec -m0flash 0 <filename.rom>`. That should report flashing a number of different regions of the controller and end with a successful completion. Reboot and your H700 should be back.


----------

