Disable boot ROM on Mellanox ConnectX-2?

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

Flapjack

New Member
Mar 17, 2017
8
1
3
47
Hey everyone. Searched, but couldn't find anything on this. I have a Mellanox ConnectX-2 ethernet adapter I got for cheap, which allows me to connect my office PC to my lab rack switches at 10gbps (via fibre). It works great... especially when upgrading from the crappy built-in Windows drivers.

The only thing that stinks is the boot ROM during startup, for PXE boot. Is there any way to disable that, like via flashing a different ROM? If not, is there another low-cost option for a card? I reboot enough to make it something worth fixing, if possible.

Thanks!
 

T_Minus

Build. Break. Fix. Repeat
Feb 15, 2015
7,625
2,043
113
Should be able to disable it with util or remove the boot rom completely, the command is likely found in the same documentation for upgrading the card too. I leave it off SAS cards that I don't need to boot from.
 

fohdeesha

Kaini Industries
Nov 20, 2016
2,729
3,082
113
33
fohdeesha.com
the only way to get rid of it showing up and taking time during boot is removing the bootrom from flash completely, which is possible with mellanox firmware tools (MFT)

Code:
mst start
mst status
(get the ID of your card and stick it in the command below if it differs from the "/dev/mst/mt26448_pci_cr0")
flint -d /dev/mst/mt26448_pci_cr0 --allow_rom_change drom
 
Last edited:

Flapjack

New Member
Mar 17, 2017
8
1
3
47
Wow, that is pretty amazing. So using MFT, I can basically load/edit a firmware? Why don't all companies have this?!

Is there a guide on how to do this?
 

fohdeesha

Kaini Industries
Nov 20, 2016
2,729
3,082
113
33
fohdeesha.com
the guide is in my post above, that's all the commands you need

just install mft for windows http://www.mellanox.com/page/management_tools

then run the commands in my post above from a command prompt. while you're at it you should probably update the firmware on it first if you never have

download the firmware matching your card model from http://www.mellanox.com/page/firmware_table_ConnectX2EN

unzip it to whatever folder the cmd prompt is running from and run "mst status" to get the device ID like "/dev/mst/mt26448_pci_cr0" - if yours is different than that, replace it in the command below. might need to change the firmware file name to match yours too

flint -d /dev/mst/mt26448_pci_cr0 -i fw-ConnectX2-rel-2_9_1200-MNPA19_A1-A3-FlexBoot-3.3.400.bin burn

then reboot then run the bootrom removal commands above
 

K D

Well-Known Member
Dec 24, 2016
1,439
320
83
30041
You should be able to disable the option rom in the motherboard BIOS as well.
 

Flapjack

New Member
Mar 17, 2017
8
1
3
47
the guide is in my post above, that's all the commands you need

just install mft for windows http://www.mellanox.com/page/management_tools

then run the commands in my post above from a command prompt. while you're at it you should probably update the firmware on it first if you never have

download the firmware matching your card model from http://www.mellanox.com/page/firmware_table_ConnectX2EN

unzip it to whatever folder the cmd prompt is running from and run "mst status" to get the device ID like "/dev/mst/mt26448_pci_cr0" - if yours is different than that, replace it in the command below. might need to change the firmware file name to match yours too

flint -d /dev/mst/mt26448_pci_cr0 -i fw-ConnectX2-rel-2_9_1200-MNPA19_A1-A3-FlexBoot-3.3.400.bin burn

then reboot then run the bootrom removal commands above
I'm shocked that's how easy it is. Thanks for breaking it down so succinctly. I'll do it as soon as I'm off this work call.

You should be able to disable the option rom in the motherboard BIOS as well.
I wasn't able to. I don't even have "network" boot enabled as an option... hard drive only.
 

Aluminum

Active Member
Sep 7, 2012
431
46
28
Yep definitely leave out boot roms when you don't need em. They're all just one more thing to go wrong in our crazy spaghetti world of bios/uefi, and just one more thing that might respond to some network scan or tool and be a security/admin headache.
 

Flapjack

New Member
Mar 17, 2017
8
1
3
47
the guide is in my post above, that's all the commands you need

just install mft for windows http://www.mellanox.com/page/management_tools

then run the commands in my post above from a command prompt. while you're at it you should probably update the firmware on it first if you never have

download the firmware matching your card model from http://www.mellanox.com/page/firmware_table_ConnectX2EN

unzip it to whatever folder the cmd prompt is running from and run "mst status" to get the device ID like "/dev/mst/mt26448_pci_cr0" - if yours is different than that, replace it in the command below. might need to change the firmware file name to match yours too

flint -d /dev/mst/mt26448_pci_cr0 -i fw-ConnectX2-rel-2_9_1200-MNPA19_A1-A3-FlexBoot-3.3.400.bin burn

then reboot then run the bootrom removal commands above
The command didn't work for me. The firmware name was actually 100% exactly what you said, so the command matched perfectly. Here is what I got, though:

Code:
c:\Users\chris\Desktop\mellanox>flint -d /dev/mst/mt26448_pci_cr0 -i fw-ConnectX2-rel-2_9_1200-MNPA19_A1-A3-FlexBoot-3.3.400.bin burn

    Note: Both the image file and the flash contain a ROM image.
          Select "yes" to use the ROM from the given image file.
          Select "no" to keep the existing ROM in the flash
    Current ROM info on flash: type=PXE version=3.3.500 proto=VPI
    ROM info from image file : type=PXE version=3.3.400 proto=VPI

 Use the ROM from the image file ? (y/n) [n] : y

    Current FW version on flash:  2.9.1000
    New FW version:               2.9.1200


-E- PSID mismatch. The PSID on flash (HP_0F60000010) differs from the PSID in the given image (MT_0F60110010).
**EDIT**
Found this, but not sure what do to:
https://forums.servethehome.com/index.php?threads/mellanox-connectx-2-firmware.14350/page-2

**EDIT 2**
...and this:

Update Mellanox network adapter firmware -

There is a chance to brick your network adapter! I’m not responsible in case of hardware degradation.
 
Last edited:

Flapjack

New Member
Mar 17, 2017
8
1
3
47
Updated with the "-allow_psid_change" flag and it seems to have worked! On to editing out the boot rom

Code:
c:\Users\chris\Desktop\mellanox>flint -d /dev/mst/mt26448_pci_cr0 -i fw-ConnectX2-rel-2_9_1200-MNPA19_A1-A3-FlexBoot-3.3.400.bin -allow_psid_change burn

    Note: Both the image file and the flash contain a ROM image.
          Select "yes" to use the ROM from the given image file.
          Select "no" to keep the existing ROM in the flash
    Current ROM info on flash: type=PXE version=3.3.500 proto=VPI
    ROM info from image file : type=PXE version=3.3.400 proto=VPI

 Use the ROM from the image file ? (y/n) [n] : y

    Current FW version on flash:  2.9.1000
    New FW version:               2.9.1200


    You are about to replace current PSID on flash - "HP_0F60000010" with a different PSID - "MT_0F60110010".
    Note: It is highly recommended not to change the PSID.

 Do you want to continue ? (y/n) [n] : y
Burning FS2 FW image without signatures - OK
Restoring signature                     - OK
 

Flapjack

New Member
Mar 17, 2017
8
1
3
47
Everything's working perfectly! Thanks for all the help!

Code:
c:\Users\chris\Desktop\mellanox>flint -d /dev/mst/mt26448_pci_cr0 --allow_rom_change drom

-I- Preparing to remove ROM ...
Removing ROM image    - OK
Restoring signature  - OK
 
  • Like
Reactions: fohdeesha

fohdeesha

Kaini Industries
Nov 20, 2016
2,729
3,082
113
33
fohdeesha.com
glad to hear you got it worked out. You needed the allow psid change command because it seems you had an HP branded card, and HP puts their own OEM PSID's on there so they're "supposed" to only work with HP firmware. When you allowed the PSID change and flashed the stock mellanox firmware, you converted it back into a stock mellanox card (which most people do)