#!/usr/bin/env bash # wget -qO- https://mirrors.fermino.me/scripts/truenas/kernel-patch-hpsa-p410-truenas-23.sh | bash - set -e chmod +x /usr/bin/apt /usr/bin/apt-key /usr/bin/dpkg apt update apt install dkms -y wget -qO- https://github.com/fermino/hpsahba/archive/refs/heads/master.tar.gz | tar -xzf - cd hpsahba-master/contrib/dkms ./patch.sh | grep 'patching file' dkms add . dkms install --force hpsa-dkms/1.0 modprobe -r hpsa modprobe hpsa hpsa_use_nvram_hba_flag=1 echo 'options hpsa hpsa_use_nvram_hba_flag=1' | tee -a /etc/modprobe.d/hpsa.conf update-initramfs -u -k all