From 00b86f69d4e2bc4ff8265f5f8d61aaa91c6c78e3 Mon Sep 17 00:00:00 2001 From: Roland Date: Tue, 13 Oct 2026 19:30:32 -0600 Subject: [PATCH] install.sh installs on Debian 13 install.sh only accepted Debian 12, which cannot run this version, and rejected Debian 13. It now requires Debian 13 or newer on both PCs and Raspberry Pis. The install scripts point to the drive wizard instead of manual mounting. Co-Authored-By: Claude Opus 5.5 --- UPGRADE.md | 6 +++-- help.sh | 7 +++++- install.sh | 23 ++++++++++++------- ...install_debian_12.sh => install_debian.sh} | 14 +++-------- scripts/install_raspberrypios.sh | 12 ++-------- 5 files changed, 30 insertions(+), 32 deletions(-) rename scripts/{install_debian_12.sh => install_debian.sh} (89%) diff --git a/UPGRADE.md b/UPGRADE.md index 0b3449af..7029bb37 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -3,7 +3,7 @@ # Table of Contents * [Upgrading Docker containers](#upgrading-docker-containers) -* [Upgrading Raspberry Pi or Debian 12 Installation](#upgrading-raspberry-pi-or-debian-12-installation) +* [Upgrading Raspberry Pi or Debian Installation](#upgrading-raspberry-pi-or-debian-installation) * [Upgrading a WROLPi Portable USB](#upgrading-a-wrolpi-portable-usb) ## Upgrading Docker containers @@ -24,7 +24,9 @@ 7. Start all docker containers * `docker-compose up -d` -## Upgrading Raspberry Pi or Debian 12 Installation +## Upgrading Raspberry Pi or Debian Installation + +A Debian 12 (bookworm) WROLPi stays on the final version for Debian 12; reinstall on Debian 13 to get newer versions. 1. Run the upgrade script * `sudo /bin/bash /opt/wrolpi/upgrade.sh` diff --git a/help.sh b/help.sh index 614ffcdf..60693606 100755 --- a/help.sh +++ b/help.sh @@ -43,10 +43,13 @@ rpi=false rpi4=false rpi5=false debian12=false +debian13=false grep -q 'Raspberry Pi' /proc/cpuinfo >/dev/null && rpi=true grep -q 'Raspberry Pi 4' /proc/cpuinfo >/dev/null && rpi4=true grep -q 'Raspberry Pi 5' /proc/cpuinfo >/dev/null && rpi5=true grep -q 'PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"' /etc/os-release >/dev/null && debian12=true +os_version=$(awk -F= '$1=="VERSION_ID"{gsub(/"/,"",$2);print $2}' /etc/os-release 2>/dev/null) +[[ ${os_version} =~ ^[0-9]+$ && ${os_version} -ge 13 ]] && debian13=true if [[ ${rpi4} == true ]]; then echo 'OK: Running on Raspberry Pi 4' @@ -54,8 +57,10 @@ elif [[ ${rpi5} == true ]]; then echo 'OK: Running on Raspberry Pi 5' elif [[ ${rpi} == true ]]; then echo 'OK: Running on unknown Raspberry Pi' +elif [[ ${debian13} == true ]]; then + echo "OK: Running on Debian ${os_version}" elif [[ ${debian12} == true ]]; then - echo 'OK: Running on Debian 12' + echo 'FAILED: Debian 12 is not supported by new versions of WROLPi. Reinstall on Debian 13.' else echo "FAILED: Running on unknown operating system" fi diff --git a/install.sh b/install.sh index a12510a8..384e16f8 100755 --- a/install.sh +++ b/install.sh @@ -31,16 +31,23 @@ while getopts ":hb:" option; do done rpi=false -debian12=false if (grep 'Raspberry Pi' /proc/cpuinfo >/dev/null); then rpi=true fi -if (grep 'PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"' /etc/os-release >/dev/null); then - debian12=true -fi -if [[ ${rpi} == false && ${debian12} == false ]]; then - echo 'This script can only be run on a Raspberry Pi or Debian 12!' && exit 2 +# Raspberry Pi OS and Debian both report the Debian release in VERSION_ID. WROLPi requires Debian 13 (trixie) or +# newer; Debian 12 installs stay on their final version and cannot be upgraded in place. +os_id="" +os_version="" +if [ -r /etc/os-release ]; then + os_id=$(awk -F= '$1=="ID"{gsub(/"/,"",$2);print $2}' /etc/os-release) + os_version=$(awk -F= '$1=="VERSION_ID"{gsub(/"/,"",$2);print $2}' /etc/os-release) +fi +case "${os_version}" in + '' | *[!0-9]*) os_version=0 ;; +esac +if [[ ${os_id} != "debian" || ${os_version} -lt 13 ]]; then + echo 'This script can only be run on Debian 13 (trixie) or newer, or Raspberry Pi OS based on it!' && exit 2 fi set -x @@ -63,8 +70,8 @@ git clone https://github.com/lrnselfreliance/wrolpi.git /opt/wrolpi || : if [ ${rpi} == true ]; then /opt/wrolpi/scripts/install_raspberrypios.sh 2>&1 | tee /opt/wrolpi/install.log install_code=${PIPESTATUS[0]} -elif [ ${debian12} == true ]; then - /opt/wrolpi/scripts/install_debian_12.sh 2>&1 | tee /opt/wrolpi/install.log +else + /opt/wrolpi/scripts/install_debian.sh 2>&1 | tee /opt/wrolpi/install.log install_code=${PIPESTATUS[0]} fi diff --git a/scripts/install_debian_12.sh b/scripts/install_debian.sh similarity index 89% rename from scripts/install_debian_12.sh rename to scripts/install_debian.sh index 23d43379..87bd7a58 100755 --- a/scripts/install_debian_12.sh +++ b/scripts/install_debian.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -echo "Debian 12 install start: $(date '+%Y-%m-%d %H:%M:%S')" +echo "Debian install start: $(date '+%Y-%m-%d %H:%M:%S')" set -x set -e @@ -81,16 +81,8 @@ echo " WROLPi has successfully been installed! -Mount your external hard drive to /media/wrolpi if you have one. Change the -file permissions if necessary: - # sudo chown -R wrolpi:wrolpi /media/wrolpi - -Start the WROLPi services using: - # sudo systemctl start wrolpi.target - -then navigate to: https://$(hostnmae).local - -Or, join to the Wifi hotspot: +Browse to http://$(hostname).local to choose the drive for your library, or join +the WiFi hotspot: SSID: WROLPi Password: wrolpi hotspot diff --git a/scripts/install_raspberrypios.sh b/scripts/install_raspberrypios.sh index 3e005676..6cdc972d 100755 --- a/scripts/install_raspberrypios.sh +++ b/scripts/install_raspberrypios.sh @@ -81,16 +81,8 @@ echo " WROLPi has successfully been installed! -Mount your external hard drive to /media/wrolpi if you have one. Change the -file permissions if necessary: - # sudo chown -R wrolpi:wrolpi /media/wrolpi - -Start the WROLPi services using: - # sudo systemctl start wrolpi.target - -then navigate to: https://$(hostname).local - -Or, join to the Wifi hotspot: +Browse to http://$(hostname).local to choose the drive for your library, or join +the WiFi hotspot: SSID: WROLPi Password: wrolpi hotspot