(Tested on TrueNAS-SCALE 24.10-RC1)
DEBIANVER=$(lsb_release -cs 2>/dev/null)
DEBARCH_ALTMETHOD=$(/usr/bin/dpkg-query --print-avail | grep Architecture| grep -v all|uniq|cut -d' ' -f2)
CUSTOMPARENT=ntfs
#
PACKAGE=ntfs-3g
PACKAGEINFO=$(wget -qO- "https://packages.debian.org/$DEBIANVER/$DEBARCH_ALTMETHOD/$PACKAGE/download")
URI=$(echo "$PACKAGEINFO" | grep -oP 'href="\K[^"]*' | grep -E "\.deb$" | sed -E 's|https?://[^/]+||' | grep ^/debian/pool/main|head -n1)
sudo mkdir -p /var/db/system/custom/$CUSTOMPARENT
sudo wget "http://ftp.debian.org$URI" -O /var/db/system/custom/ntfs/$PACKAGE.deb
sudo /usr/bin/dpkg-deb -x /var/db/system/custom/ntfs/$PACKAGE.deb /var/db/system/custom/$CUSTOMPARENT
#
PACKAGE=libntfs-3g89
PACKAGEINFO=$(wget -qO- "https://packages.debian.org/$DEBIANVER/$DEBARCH_ALTMETHOD/$PACKAGE/download")
URI=$(echo "$PACKAGEINFO" | grep -oP 'href="\K[^"]*' | grep -E "\.deb$" | sed -E 's|https?://[^/]+||' | grep ^/debian/pool/main|head -n1)
sudo mkdir -p /var/db/system/custom/$CUSTOMPARENT
sudo wget "http://ftp.debian.org$URI" -O /var/db/system/custom/ntfs/$PACKAGE.deb
sudo /usr/bin/dpkg-deb -x /var/db/system/custom/ntfs/$PACKAGE.deb /var/db/system/custom/$CUSTOMPARENT
LD_LIBRARY_PATH=/var/db/system/custom/ntfs/lib/x86_64-linux-gnu /var/db/system/custom/ntfs/bin/ntfs-3g /dev/sda2 /mnt/ntfsdisk