Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save cyberpunk042/82b4587ee73fe3907771b0dd3546433c to your computer and use it in GitHub Desktop.
Save cyberpunk042/82b4587ee73fe3907771b0dd3546433c to your computer and use it in GitHub Desktop.
TrueNAS Scale 24.04 Customization
#!/bin/bash
# Set script to exit on error
set -e
# Enable logging
exec > >(tee -i /var/log/setup-script.log)
exec 2>&1
echo "Starting script execution..."
echo "Fix export path"
export PATH=/usr/bin:/usr/sbin
# Remount RW /usr
echo "Remount RW /usr..."
mount -o remount,rw 'boot-pool/ROOT/24.04.0/usr'
# Re-enabling apt utilities
echo "Enabling apt utilities..."
chmod +x /bin/apt*
chmod +x /usr/bin/dpkg
# Updating sources.list
echo "Updating sources.list..."
{
echo "deb http://deb.debian.org/debian bullseye main"
echo "deb-src http://deb.debian.org/debian bullseye main"
} > /etc/apt/sources.list
# Updating apt and installing necessary utilities
echo "Updating apt and installing utilities..."
apt update
# Install some basic network and other utilities
apt install -y net-tools vim curl wget xinput evtest
# Installing lcd4linux
echo "Installing lcd4linux..."
apt install -y lcd4linux
# Configuring lcd4linux
echo "Setting up lcd4linux configuration..."
cp ./lcd4linux.conf /etc/lcd4linux.conf
cp ./truenas-img.png /home/admin/truenas-img.png
systemctl restart lcd4linux
# Additional commands for TrueNAS Scale setup on Debian 12
echo "Installing additional utilities for TrueNAS Scale..."
apt install -y python pip
echo "Script execution completed successfully!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment