Enable UEFI / PXE boot on Mellanox ConnectX NIC

Boot GRML iso
https://grml.org/download/

Enable SSH daemon

service ssh start
passwd
ip a
 
# ssh root@GRML_IP

Install Mellanox CLI tools (MFT)
http://www.mellanox.com/page/management_tools

URL=https://www.mellanox.com/downloads/MFT/mft-4.14.0-105-x86_64-deb.tgz
 
# install requirements
apt update
apt install -y gcc make dkms linux-headers-$(uname -r)
 
# download mft
wget -qO- ${URL} | tar xvz -C /tmp
 
# install mft
/tmp/mft-*-deb/install.sh
mst start

Enable UEFI and PXE boot

for MST in $(ls /dev/mst/* | egrep -v '\.1'); do
    echo ${MST}
    mlxconfig -d ${MST} -y set EXP_ROM_UEFI_x86_ENABLE=1
    mlxconfig -d ${MST} -y set EXP_ROM_PXE_ENABLE=1
    mlxconfig -d ${MST} q | egrep "EXP_ROM"
done

Debug: Show device state

mst status
 
for MST in $(ls /dev/mst/* | egrep -v '\.1'); do
    flint -d ${MST} q
    echo
done