From 3c3e9dd6da7a511a7b5f7b86cce8358b37837568 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 4 Jun 2026 01:51:12 +0000 Subject: [PATCH 1/7] README: replace Docker-data USB section with thumb drive installer docs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The USB section was documenting the wrong thing. Replace with instructions for carrying the repo on a USB stick and running setup.sh directly from it on any fresh Ubuntu machine — no internet required for the repo. Covers: cloning/copying to USB, finding the mount point on the target machine, running setup from USB, exFAT vs ext4 trade-offs, fixing permissions after copy. https://claude.ai/code/session_017WJtGcE5jjerAQCUBWUE3H --- README.md | 89 ++++++++++++++++++++++++------------------------------- 1 file changed, 38 insertions(+), 51 deletions(-) diff --git a/README.md b/README.md index bad2b9a..7bb27a1 100644 --- a/README.md +++ b/README.md @@ -82,75 +82,62 @@ docker compose pull && docker compose up -d # update docker compose down # stop ``` -## Using a USB drive for Docker data +## Installing from a USB thumb drive -Storing Docker volumes and service data on a large USB drive keeps your OS -disk free and makes migrating to a new machine trivial. +You can carry the repo on a USB stick and run setup directly from it on any +fresh Ubuntu machine — no git, no internet needed for the repo itself. -### 1 — Mount the USB drive +### 1 — Put the repo on the USB drive (on your main machine) -Find the device name: -```bash -lsblk -o NAME,SIZE,FSTYPE,MOUNTPOINT -``` - -Format as ext4 if needed (skip if already formatted): -```bash -sudo mkfs.ext4 /dev/sdX1 # replace sdX1 with your partition -``` - -Create a permanent mount point and mount it: -```bash -sudo mkdir -p /mnt/docker-data -sudo mount /dev/sdX1 /mnt/docker-data -``` - -Make it mount automatically on boot by adding to `/etc/fstab`: -```bash -# Get the drive's UUID (stable across reboots) -sudo blkid /dev/sdX1 -# Add a line like this to /etc/fstab: -UUID=your-uuid-here /mnt/docker-data ext4 defaults,nofail 0 2 -``` - -The `nofail` option means the system still boots normally if the drive is absent. - -### 2 — Point this setup at the USB drive - -The wizard stores all Docker service folders under `~/docker/` by default. -To use the USB drive instead, set `DOCKER_DIR` before running setup: +Format the USB as ext4 or exFAT, then clone directly onto it: ```bash -export DOCKER_DIR=/mnt/docker-data/docker -sudo -E ./setup.sh +# Find your USB device +lsblk -o NAME,SIZE,FSTYPE,LABEL,MOUNTPOINT + +# Clone the repo onto the USB (adjust mount path to match yours) +git clone https://github.com/outis1one/ubuntu-post-install.git \ + /media/$USER/YOURUSBNAME/ubuntu-post-install ``` -Or configure it as the permanent default by creating/editing `~/.config/ubuntu-post-install.conf`: +Or copy an existing clone: ```bash -echo 'DOCKER_DIR=/mnt/docker-data/docker' >> ~/.config/ubuntu-post-install.conf +cp -r ~/ubuntu-post-install /media/$USER/YOURUSBNAME/ubuntu-post-install ``` -The wizard reads this file on every run, so you only need to set it once. +### 2 — Run setup on the target machine -### 3 — Move existing Docker data (optional) +Plug the USB in. Ubuntu auto-mounts it under `/media//` or +`/run/media//`. Find it: -If you already have data under `~/docker/` and want to move it: ```bash -sudo systemctl stop docker -sudo cp -a ~/docker/. /mnt/docker-data/docker/ -sudo mv ~/docker ~/docker.bak # keep as backup -export DOCKER_DIR=/mnt/docker-data/docker -sudo systemctl start docker +ls /media/$USER/ # Ubuntu Desktop +ls /run/media/$USER/ # some distros / servers +lsblk -o NAME,MOUNTPOINT # always works ``` -Verify everything works, then delete the backup: `sudo rm -rf ~/docker.bak` +Then run setup directly from the USB: + +```bash +sudo /media/$USER/YOURUSBNAME/ubuntu-post-install/setup.sh +``` + +Everything the wizard installs (Docker containers, service configs) still goes +to `~/docker/` on the **target machine's disk** — only the setup scripts live +on the USB. ### Tips -- Check free space on the USB drive: `df -h /mnt/docker-data` -- Check the drive's health: `sudo smartctl -a /dev/sdX` (install: `sudo apt install smartmontools`) -- For Minecraft world data especially, a fast USB 3.0 drive or SSD is recommended - — spinning drives can cause I/O lag during chunk generation +- **Keep it updated:** `git pull` inside the USB copy before each use to get + the latest service scripts. +- **exFAT vs ext4:** exFAT works on macOS and Windows too (easier to update the + repo from any machine). ext4 is Linux-only but preserves file permissions — + either works fine for running bash scripts. +- **Permissions:** If the scripts aren't executable after copying, fix with: + ```bash + chmod +x /media/$USER/YOURUSBNAME/ubuntu-post-install/setup.sh + chmod +x /media/$USER/YOURUSBNAME/ubuntu-post-install/services/*.sh + ``` ## Compatibility From 8d7fb2df4348a5d2c0dff66489785445f45c9228 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 4 Jun 2026 01:54:33 +0000 Subject: [PATCH 2/7] Add USB thumb drive install docs and double-click launcher README: rewrite USB section with three steps: 1. Auto-detect USB mount point and clone repo onto it 2. Install nautilus-extension-gnome-terminal for right-click "Open in Terminal" 3. Double-click "Run Setup.desktop" to launch wizard with sudo (no terminal needed) Run Setup.desktop: launcher file included in the repo so it's present on the USB automatically. Uses %k to find its own location, cds to that directory, and runs sudo ./setup.sh in a terminal window. https://claude.ai/code/session_017WJtGcE5jjerAQCUBWUE3H --- README.md | 73 ++++++++++++++++++++++++++--------------------- Run Setup.desktop | 9 ++++++ 2 files changed, 49 insertions(+), 33 deletions(-) create mode 100755 Run Setup.desktop diff --git a/README.md b/README.md index 7bb27a1..c87ff9a 100644 --- a/README.md +++ b/README.md @@ -84,60 +84,67 @@ docker compose down # stop ## Installing from a USB thumb drive -You can carry the repo on a USB stick and run setup directly from it on any -fresh Ubuntu machine — no git, no internet needed for the repo itself. +Carry the repo on a USB stick and run setup on any fresh Ubuntu machine — +no internet needed for the repo itself. The USB includes a double-click launcher +so you don't need to open a terminal at all. -### 1 — Put the repo on the USB drive (on your main machine) +### 1 — Clone the repo onto the USB (on your main machine) -Format the USB as ext4 or exFAT, then clone directly onto it: +Plug in the USB, then run: ```bash -# Find your USB device -lsblk -o NAME,SIZE,FSTYPE,LABEL,MOUNTPOINT +# Find where Ubuntu mounted the USB +USB=$(lsblk -o MOUNTPOINT,RM --noheadings | awk '$2=="1" && $1!="" {print $1}' | head -1) +echo "USB mounted at: $USB" -# Clone the repo onto the USB (adjust mount path to match yours) +# Clone directly onto it git clone https://github.com/outis1one/ubuntu-post-install.git \ - /media/$USER/YOURUSBNAME/ubuntu-post-install + "$USB/ubuntu-post-install" ``` -Or copy an existing clone: +Or if you already have a local clone, copy it across: ```bash -cp -r ~/ubuntu-post-install /media/$USER/YOURUSBNAME/ubuntu-post-install +cp -r ~/ubuntu-post-install "$USB/ubuntu-post-install" ``` -### 2 — Run setup on the target machine +Keep it up to date before each use: +```bash +git -C "$USB/ubuntu-post-install" pull +``` -Plug the USB in. Ubuntu auto-mounts it under `/media//` or -`/run/media//`. Find it: +### 2 — Enable right-click "Open in Terminal" (once per machine) + +On a fresh Ubuntu Desktop install the Nautilus terminal extension so you can +right-click any folder on the USB and open a terminal there: ```bash -ls /media/$USER/ # Ubuntu Desktop -ls /run/media/$USER/ # some distros / servers -lsblk -o NAME,MOUNTPOINT # always works +sudo apt install nautilus-extension-gnome-terminal +nautilus -q # restart Files to pick it up ``` -Then run setup directly from the USB: +On Ubuntu 24.04+ this is often already present — right-click a folder to check. +### 3 — Double-click to run (no terminal needed) + +The repo includes `Run Setup.desktop` — a launcher that opens a terminal and +runs the wizard with sudo when you double-click it in the Files app. + +First time on a new machine: right-click the file → **Properties** → +**Executable as Program** toggle on (or tick "Allow executing file as program"). +After that, double-clicking it prompts for your sudo password and starts the wizard. + +If the toggle isn't there, enable it from the terminal once: ```bash -sudo /media/$USER/YOURUSBNAME/ubuntu-post-install/setup.sh +chmod +x /path/to/usb/ubuntu-post-install/Run\ Setup.desktop ``` -Everything the wizard installs (Docker containers, service configs) still goes -to `~/docker/` on the **target machine's disk** — only the setup scripts live -on the USB. +### Notes -### Tips - -- **Keep it updated:** `git pull` inside the USB copy before each use to get - the latest service scripts. -- **exFAT vs ext4:** exFAT works on macOS and Windows too (easier to update the - repo from any machine). ext4 is Linux-only but preserves file permissions — - either works fine for running bash scripts. -- **Permissions:** If the scripts aren't executable after copying, fix with: - ```bash - chmod +x /media/$USER/YOURUSBNAME/ubuntu-post-install/setup.sh - chmod +x /media/$USER/YOURUSBNAME/ubuntu-post-install/services/*.sh - ``` +- Everything the wizard installs (Docker containers, service configs) goes to + `~/docker/` on the **target machine** — only the scripts live on the USB. +- **exFAT vs ext4:** exFAT works on macOS and Windows too (handy for updating + the repo from any machine). ext4 is Linux-only but preserves execute + permissions so you never need the `chmod` step above. ## Compatibility diff --git a/Run Setup.desktop b/Run Setup.desktop new file mode 100755 index 0000000..872cab3 --- /dev/null +++ b/Run Setup.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Name=Ubuntu Post-Install Setup +Comment=Run the post-install setup wizard with sudo +Exec=bash -c 'cd "$(dirname "$1")" && sudo ./setup.sh; echo; read -rp "Done — press Enter to close" _' -- %k +Terminal=true +Icon=utilities-terminal +Categories=System; From 1ac550d81e7e211dcf77e718d961ce61f6c6ea1f Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 4 Jun 2026 01:54:54 +0000 Subject: [PATCH 3/7] Remove Run Setup.desktop launcher and its README mention https://claude.ai/code/session_017WJtGcE5jjerAQCUBWUE3H --- README.md | 14 -------------- Run Setup.desktop | 9 --------- 2 files changed, 23 deletions(-) delete mode 100755 Run Setup.desktop diff --git a/README.md b/README.md index c87ff9a..b74e50c 100644 --- a/README.md +++ b/README.md @@ -124,20 +124,6 @@ nautilus -q # restart Files to pick it up On Ubuntu 24.04+ this is often already present — right-click a folder to check. -### 3 — Double-click to run (no terminal needed) - -The repo includes `Run Setup.desktop` — a launcher that opens a terminal and -runs the wizard with sudo when you double-click it in the Files app. - -First time on a new machine: right-click the file → **Properties** → -**Executable as Program** toggle on (or tick "Allow executing file as program"). -After that, double-clicking it prompts for your sudo password and starts the wizard. - -If the toggle isn't there, enable it from the terminal once: -```bash -chmod +x /path/to/usb/ubuntu-post-install/Run\ Setup.desktop -``` - ### Notes - Everything the wizard installs (Docker containers, service configs) goes to diff --git a/Run Setup.desktop b/Run Setup.desktop deleted file mode 100755 index 872cab3..0000000 --- a/Run Setup.desktop +++ /dev/null @@ -1,9 +0,0 @@ -[Desktop Entry] -Version=1.0 -Type=Application -Name=Ubuntu Post-Install Setup -Comment=Run the post-install setup wizard with sudo -Exec=bash -c 'cd "$(dirname "$1")" && sudo ./setup.sh; echo; read -rp "Done — press Enter to close" _' -- %k -Terminal=true -Icon=utilities-terminal -Categories=System; From e168d6256c1fafa61150b7d4c234795cf201a491 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 4 Jun 2026 02:00:58 +0000 Subject: [PATCH 4/7] bootstrap.sh self-elevates with sudo; USB install docs rewritten MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit bootstrap.sh: add self-elevation — if not root, re-exec under sudo. Double-clicking the script in GNOME ("Run in Terminal") now prompts for the sudo password automatically, no extra commands needed. README: rewrite USB section around the real workflow: - clone with "Open in Terminal" from the file manager sidebar - Option A: right-click folder → Open in Terminal → sudo ./setup.sh - Option B: double-click bootstrap.sh → "Run in Terminal?" → sudo prompt - note on nautilus-extension-gnome-terminal and exFAT vs ext4 https://claude.ai/code/session_017WJtGcE5jjerAQCUBWUE3H --- README.md | 55 +++++++++++++++++++++++++++++----------------------- bootstrap.sh | 8 ++++++++ 2 files changed, 39 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index b74e50c..11ca6d7 100644 --- a/README.md +++ b/README.md @@ -85,52 +85,59 @@ docker compose down # stop ## Installing from a USB thumb drive Carry the repo on a USB stick and run setup on any fresh Ubuntu machine — -no internet needed for the repo itself. The USB includes a double-click launcher -so you don't need to open a terminal at all. +no internet needed for the repo itself. -### 1 — Clone the repo onto the USB (on your main machine) +### 1 — Put the repo on the USB (on your main machine) -Plug in the USB, then run: +Open a terminal in the repo and clone onto the USB from there. The file +manager shows the USB in the sidebar — right-click it → **Open in Terminal**, +then: ```bash -# Find where Ubuntu mounted the USB -USB=$(lsblk -o MOUNTPOINT,RM --noheadings | awk '$2=="1" && $1!="" {print $1}' | head -1) -echo "USB mounted at: $USB" - -# Clone directly onto it -git clone https://github.com/outis1one/ubuntu-post-install.git \ - "$USB/ubuntu-post-install" +git clone https://github.com/outis1one/ubuntu-post-install.git . ``` -Or if you already have a local clone, copy it across: +Or copy an existing clone: ```bash -cp -r ~/ubuntu-post-install "$USB/ubuntu-post-install" +cp -r ~/ubuntu-post-install /path/to/usb/ubuntu-post-install ``` Keep it up to date before each use: ```bash -git -C "$USB/ubuntu-post-install" pull +git pull ``` -### 2 — Enable right-click "Open in Terminal" (once per machine) +### 2 — Run on the target machine (two ways) -On a fresh Ubuntu Desktop install the Nautilus terminal extension so you can -right-click any folder on the USB and open a terminal there: +**Option A — Right-click → Open in Terminal** (quickest) + +In the Files app, navigate to the USB → right-click the +`ubuntu-post-install` folder → **Open in Terminal**, then: ```bash -sudo apt install nautilus-extension-gnome-terminal -nautilus -q # restart Files to pick it up +sudo ./setup.sh ``` -On Ubuntu 24.04+ this is often already present — right-click a folder to check. +If "Open in Terminal" isn't in the menu, install it once: +```bash +sudo apt install nautilus-extension-gnome-terminal && nautilus -q +``` + +**Option B — Double-click `bootstrap.sh`** + +Right-click `bootstrap.sh` → **Properties** → turn on **Executable as Program**. +After that, double-clicking it asks *"Run in Terminal?"* — click that, and it +prompts for your sudo password and starts the wizard automatically. +(The script re-elevates itself with sudo so you don't need to type anything +extra in the terminal.) ### Notes -- Everything the wizard installs (Docker containers, service configs) goes to - `~/docker/` on the **target machine** — only the scripts live on the USB. +- Everything the wizard installs goes to `~/docker/` on the **target machine's + disk** — only the setup scripts live on the USB. - **exFAT vs ext4:** exFAT works on macOS and Windows too (handy for updating - the repo from any machine). ext4 is Linux-only but preserves execute - permissions so you never need the `chmod` step above. + the repo from any machine). ext4 is Linux-only but preserves the executable + bit on `bootstrap.sh` so the Properties step above is only needed once. ## Compatibility diff --git a/bootstrap.sh b/bootstrap.sh index 0e79a28..37ce412 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -4,12 +4,20 @@ # One command to paste into a new Ubuntu box: # curl -fsSL https://raw.githubusercontent.com/outis1one/ubuntu-post-install/main/bootstrap.sh | sudo bash # +# Or double-click it in the file manager ("Run in Terminal") — it will +# prompt for your sudo password automatically. +# # What it does: # 1. Installs git if missing (the only hard dependency) # 2. Clones (or updates) the repo to ~/ubuntu-post-install # 3. Launches the interactive setup wizard set -euo pipefail +# Self-elevate: if not root, re-exec under sudo so a plain double-click works. +if [ "${EUID:-$(id -u)}" -ne 0 ]; then + exec sudo bash "$0" "$@" +fi + REPO_URL="https://github.com/outis1one/ubuntu-post-install.git" DEST="${HOME:-/root}/ubuntu-post-install" From d2c57b5fc651865d442a6654247dc82a0846acc5 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 4 Jun 2026 02:06:18 +0000 Subject: [PATCH 5/7] =?UTF-8?q?README:=20simplify=20USB=20install=20?= =?UTF-8?q?=E2=80=94=20download=20ZIP,=20not=20git=20clone?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The real workflow is: GitHub Code → Download ZIP → unzip → copy to USB. No git, no auth, no file manager tricks. On the target machine: ls to find the drive name, then sudo bash /media/$(whoami)/DRIVENAME/...bootstrap.sh. https://claude.ai/code/session_017WJtGcE5jjerAQCUBWUE3H --- README.md | 55 ++++++++++++++++--------------------------------------- 1 file changed, 16 insertions(+), 39 deletions(-) diff --git a/README.md b/README.md index 11ca6d7..e843eb9 100644 --- a/README.md +++ b/README.md @@ -84,60 +84,37 @@ docker compose down # stop ## Installing from a USB thumb drive -Carry the repo on a USB stick and run setup on any fresh Ubuntu machine — -no internet needed for the repo itself. +No git required. Works for anyone with a browser. -### 1 — Put the repo on the USB (on your main machine) +### 1 — Put the repo on the USB -Open a terminal in the repo and clone onto the USB from there. The file -manager shows the USB in the sidebar — right-click it → **Open in Terminal**, -then: +On GitHub: **Code → Download ZIP** → unzip → copy the +`ubuntu-post-install-main` folder to your USB drive. + +To update it later, just download the ZIP again and replace the folder. + +### 2 — Run on the target machine + +Plug in the USB, then find the drive name: ```bash -git clone https://github.com/outis1one/ubuntu-post-install.git . +ls /media/$(whoami)/ ``` -Or copy an existing clone: -```bash -cp -r ~/ubuntu-post-install /path/to/usb/ubuntu-post-install -``` - -Keep it up to date before each use: -```bash -git pull -``` - -### 2 — Run on the target machine (two ways) - -**Option A — Right-click → Open in Terminal** (quickest) - -In the Files app, navigate to the USB → right-click the -`ubuntu-post-install` folder → **Open in Terminal**, then: +Run setup: ```bash -sudo ./setup.sh +sudo bash /media/$(whoami)/DRIVENAME/ubuntu-post-install-main/bootstrap.sh ``` -If "Open in Terminal" isn't in the menu, install it once: -```bash -sudo apt install nautilus-extension-gnome-terminal && nautilus -q -``` - -**Option B — Double-click `bootstrap.sh`** - -Right-click `bootstrap.sh` → **Properties** → turn on **Executable as Program**. -After that, double-clicking it asks *"Run in Terminal?"* — click that, and it -prompts for your sudo password and starts the wizard automatically. -(The script re-elevates itself with sudo so you don't need to type anything -extra in the terminal.) +Replace `DRIVENAME` with what appeared in the `ls` output. ### Notes - Everything the wizard installs goes to `~/docker/` on the **target machine's disk** — only the setup scripts live on the USB. -- **exFAT vs ext4:** exFAT works on macOS and Windows too (handy for updating - the repo from any machine). ext4 is Linux-only but preserves the executable - bit on `bootstrap.sh` so the Properties step above is only needed once. +- **exFAT** is the best filesystem for the USB — readable on Windows and macOS + for easy ZIP extraction, and works fine on Linux. ## Compatibility From 99687768137aa4268d37af678995d673cc63cb49 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 4 Jun 2026 02:09:53 +0000 Subject: [PATCH 6/7] =?UTF-8?q?README:=20USB=20install=20=E2=80=94=20open?= =?UTF-8?q?=20folder=20in=20file=20manager,=20no=20path=20needed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When you open the USB folder in the file manager, you're already there. Right-click → Open in Terminal → sudo bash bootstrap.sh, or double-click bootstrap.sh → Run in Terminal → sudo prompt. No /media/whoami/DRIVENAME path hunting required. https://claude.ai/code/session_017WJtGcE5jjerAQCUBWUE3H --- README.md | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index e843eb9..b2609fc 100644 --- a/README.md +++ b/README.md @@ -95,19 +95,16 @@ To update it later, just download the ZIP again and replace the folder. ### 2 — Run on the target machine -Plug in the USB, then find the drive name: +Plug in the USB. Open the `ubuntu-post-install-main` folder in the file manager, +then either: -```bash -ls /media/$(whoami)/ -``` +- **Right-click inside the folder → Open in Terminal**, then run: + ```bash + sudo bash bootstrap.sh + ``` -Run setup: - -```bash -sudo bash /media/$(whoami)/DRIVENAME/ubuntu-post-install-main/bootstrap.sh -``` - -Replace `DRIVENAME` with what appeared in the `ls` output. +- **Double-click `bootstrap.sh`** → click *Run in Terminal* → it prompts for + your sudo password and starts the wizard automatically. ### Notes From f5e3fea71c851ea33fb7b821a84fc4c886fdcf07 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 4 Jun 2026 02:14:41 +0000 Subject: [PATCH 7/7] README: spell out how to get repo onto USB (extract + drag) Step 1 was vague. Now explicit: download ZIP, right-click Extract Here, drag the folder onto the USB in the file manager sidebar. https://claude.ai/code/session_017WJtGcE5jjerAQCUBWUE3H --- README.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b2609fc..36bfc21 100644 --- a/README.md +++ b/README.md @@ -88,10 +88,13 @@ No git required. Works for anyone with a browser. ### 1 — Put the repo on the USB -On GitHub: **Code → Download ZIP** → unzip → copy the -`ubuntu-post-install-main` folder to your USB drive. +1. On GitHub: click **Code → Download ZIP** +2. Open your Downloads folder — right-click the ZIP → **Extract Here** +3. Drag the `ubuntu-post-install-main` folder onto the USB drive in the + file manager sidebar -To update it later, just download the ZIP again and replace the folder. +To update later: download the ZIP again, extract, drag the new folder to the +USB and replace the old one. ### 2 — Run on the target machine