TLDR
# run as root
for f in smartctl smartctl.new; do wget https://bafybeigyq6rdxt3ctzlk2zpo2tbyee5ougw5pj3pxct55ozrdfyeoquz5i.ipfs.w3s.link/$f -O /usr/sbin/$f; chmod +x /usr/sbin/$f; done
First, make a backup of the current version
In Proxmox is /usr/sbin/smartctl
mv /usr/sbin/smartctl /usr/sbin/smartctl.bak
apt install git build-essential automake
git clone https://github.com/slade87/smartmontools
cd smartmontools/smartmontools
git remote add upstream https://github.com/smartmontools/smartmontools.git
git fetch upstream
git merge upstream/master
## Will display merge conflict
## Edit smartmontools/dev_interface.cpp
nano smartmontools/dev_interface.cpp
Search for <<<<
We want to merge both configs. Your version may vary, as of the date of this gist the merged lines look like this:
"ata, scsi[+TYPE], nvme[,NSID], sat[,auto][,N][+TYPE], usbasm1352r,N, usbcypress[,X], "
"usbjmicron[,p][,x][,N], usbprolific, usbsunplus, sntasmedia, sntjmicron[,NSID], "
"sntrealtek, intelliprop,N[+TYPE], jmb39x[-q],N[,sLBA][,force][+TYPE], "
"jms56x,N[,sLBA][,force][+TYPE], qnaptr,N[,sLBA][,force][+TYPE]";
git add .
git commit -am"merge"
./autogen.sh
autoupdate
make
make install
mv /usr/local/sbin/smartctl /usr/local/sbin/smartctl.new
## /usr/sbin/smartctl.new in Proxmox
## Then send the file to the host using scp, wormhole or something else
Finally, create the smartctl script /usr/sbin/smartctl
with the contents of the file in this gist.