Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save sunipkm/f07ed0df142827024677f2fc89015555 to your computer and use it in GitHub Desktop.

Select an option

Save sunipkm/f07ed0df142827024677f2fc89015555 to your computer and use it in GitHub Desktop.
TrueNAS Scale 24.04.2 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.2/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
# 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