lab-docu/Perc Guide Source Files/Linux/usr/local/bin/H310
2020-03-07 04:25:11 -05:00

30 lines
877 B
Bash

#!/bin/sh
# H310 Flashing
addr=$(lspci -nnv | grep LSI | cut -b -7)
rmmod megaraid_sas mpt3sas mptctl mptbase
echo "Errors above are normal!"
sleep 2
echo 16 > /proc/sys/vm/nr_hugepages
sleep 1
#free the card, get it into rawdog mode, boot it from RAM
/root/lsirec/lsirec 0000:$addr unbind
sleep 1
/root/lsirec/lsirec 0000:$addr halt
sleep 2
##write IT mode SBR
/root/lsirec/lsirec 0000:$addr writesbr /root/H310/H310-Modded.sbr
sleep 2
/root/lsirec/lsirec 0000:$addr hostboot /root/H310/2118it.bin
sleep 2
/root/lsirec/lsirec 0000:$addr rescan
sleep 1
echo "Pausing for 20 seconds to allow the card to boot"
sleep 20
# erase FW again now from lsiutil to be sure it's dell-free
/root/lsiutil/lsiutil -p1 -a 3,8, 33
sleep 2
# flash FW to onboard flash
/root/lsiutil/lsiutil -p1 -f /root/H310/2118it.bin -y 2
sleep 1
echo "All Done! Continue following the guide to set SAS addr"