Drop the backup and restore scripts: setup.sh only

Files and app logins move across by hand, so archiving and unpacking a home
directory isn't this repo's job any more. setup.sh installs the machine and
stops there.

Two things restore.sh used to cover, kept where they still matter: the
post-reboot `sudo flatpak update` that fetches the NVIDIA GL runtime (Flatpak
can only match it to a loaded driver, so it can't happen during setup), and the
notes on which dotfiles not to copy over from Fedora. The server-marvin mount is
now optional — press Enter at the prompt to skip it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-23 16:01:01 -04:00
co-authored by Claude Opus 5
parent a4156dd79d
commit 8b26c5d693
5 changed files with 90 additions and 314 deletions
+66 -98
View File
@@ -1,18 +1,13 @@
# main-desktop
**Ubuntu 26.04 LTS** on my desktop (Ryzen 7 9800X3D, RTX 5090, 49" 5120x1440). This replaces the
Bazzite setup, which lives on in this repo's git history.
**Ubuntu 26.04 LTS** on my desktop (Ryzen 7 9800X3D, RTX 5090, 49" 5120x1440), set up by one
script. This replaces the Bazzite/BlueBuild image that used to live here — that version is still
in the git history.
This is plain Ubuntu with no custom image: apt handles the system and dev tools, Flathub handles
the desktop apps, and three scripts do the rest.
| Script | Where it runs | What it does |
|---|---|---|
| [scripts/backup.sh](scripts/backup.sh) | Bazzite, **before wiping** | Archives your home folder to server-marvin and reads every archive back to check it |
| [scripts/setup.sh](scripts/setup.sh) | Fresh Ubuntu | Adds repos, the NVIDIA driver, Docker, Steam, Flatpaks, dev tools and mounts, all in one pass |
| [scripts/restore.sh](scripts/restore.sh) | Ubuntu, after setup + reboot | Unpacks the backup and leaves out the Fedora/KDE bits that would fight Ubuntu |
All three are safe to re-run.
[scripts/setup.sh](scripts/setup.sh) turns a fresh Ubuntu install into this machine: NVIDIA
driver, Docker with GPU access, Steam, the apps in [flatpaks.txt](flatpaks.txt), and the drive
mounts. It's safe to re-run. Copying files over and signing in to apps are deliberately **not**
its job — I do those by hand.
## Why leave Bazzite
@@ -20,48 +15,21 @@ The read-only base made ordinary things into projects. VS Code had to be layered
Node and .NET came from Homebrew, and Claude desktop ran inside an Ubuntu distrobox because it
only ships for Ubuntu/Debian. On Ubuntu, each of those is an `apt install`.
## The move, in order
### 1. Back up (on Bazzite)
From this repo's folder:
```bash
scripts/backup.sh # -> /var/mnt/server-marvin-personal/desktop-backup-<date>/
```
Close Steam, Firefox, Discord and Claude first. The script refuses to write to the disk that's about
to be wiped. It's about **360 GB**, so expect around 2 hours on gigabit, including the read-back
check.
| Archive | Size | Contents |
|---|---|---|
| `home.tar.zst` | ~120 GB | Everything in `~` except caches, Trash, container images, and the three below. Includes `Desktop/Becky_backup` (63 GB), all Flatpak app data (`~/.var/app`), Lutris games in `~/Games` |
| `xlcore.tar.zst` | ~124 GB | FFXIV install, because Square's patch servers make a redownload take hours |
| `comfyui.tar.zst` | ~115 GB | ComfyUI minus its venv (mostly models) |
| `steam-saves.tar.zst` | ~5 GB | Steam `userdata` + Proton `compatdata` (saves and prefixes). Game files on the home drive (216 GB) redownload |
`manifest/` holds reference lists: Flatpaks, VS Code extensions, Steam games, the old fstab and
Flatpak overrides. The archives contain `~/.ssh` and `~/.gnupg`, so the backup folder is as
sensitive as your home folder.
**Not backed up, but not lost:** the Data drive (SteamLibrary, `emu/`) isn't touched by the
install.
### 2. Install Ubuntu 26.04 LTS
## 1. Install Ubuntu 26.04 LTS
> **⚠ Two identical 1 TB NVMe drives.** Install to the **Samsung SSD 990 PRO**. Never pick the
> **Samsung SSD 970 EVO Plus**: that's the "Data" drive with your second Steam library, and it's
> full, so nothing on it is backed up. `nvme0`/`nvme1` can swap between boots, so go by the model
> name the installer shows.
> **Samsung SSD 970 EVO Plus** — that's the "Data" drive holding the second Steam library and the
> emulator files, and it stays untouched. `nvme0`/`nvme1` can swap between boots, so go by the
> model name the installer shows.
- "Erase disk and install Ubuntu" on the 990 PRO is fine.
- Make the user **`ckoch`**. The first user gets UID 1000, which matches the file ownership on the
Data drive.
- The "third-party drivers" checkbox doesn't matter; setup.sh installs the NVIDIA driver either way.
- Prefer KDE? Install **Kubuntu 26.04** instead. The scripts don't care which desktop you run.
- Make the user **`ckoch`**. The first user gets UID 1000, which matches the file ownership
already on the Data drive.
- The "third-party drivers" checkbox doesn't matter; setup.sh installs the NVIDIA driver either
way.
- Prefer KDE? Install **Kubuntu 26.04** instead. The script doesn't care which desktop you run.
### 3. Set up
## 2. Run the script
```bash
sudo apt install -y git
@@ -69,53 +37,67 @@ git clone https://git.lazypugs.com/ckoch/main-desktop.git ~/Documents/git/main-d
cd ~/Documents/git/main-desktop && scripts/setup.sh
```
It asks for your sudo password once and for the server-marvin SMB username/password (stored
root-only in `/etc/samba/credentials-marvin`). Flatpaks take most of the time. **Reboot** when it
finishes.
It asks for your sudo password once, then for the server-marvin SMB credentials — press Enter
there to skip that mount. Flatpaks take most of the run. **Reboot** when it finishes.
What it installs:
- **NVIDIA driver:** Ubuntu's recommended **open-kernel** branch (595 today) with the prebuilt,
signed modules, so there's no DKMS. The script stops if it ends up with a non-open driver,
because Blackwell only runs on the open modules. It also installs 32-bit GL for Steam/Proton.
- **Gaming:** Steam (`steam-installer` + `steam-devices` for controllers), Lutris, GameMode,
MangoHud. ProtonUp-Qt (Flatpak) for Proton-GE. The Xbox Bluetooth fix (`disable_ertm`)
carries over from Bazzite.
signed modules, so no DKMS. The script stops if it ends up with a non-open driver, since
Blackwell only runs on the open modules. Also 32-bit GL for Steam and Proton.
- **Gaming:** Steam (`steam-installer` plus `steam-devices` for controllers), Lutris, GameMode,
MangoHud, and ProtonUp-Qt for Proton-GE. The Xbox Bluetooth fix (`disable_ertm`) carries over
from Bazzite.
- **Containers:** Docker CE from Docker's repo (not the snap), with `--gpus all` wired up through
nvidia-container-toolkit. Also Podman. You're added to `docker` and `kvm`.
nvidia-container-toolkit. You're added to `docker` and `kvm`.
- **Apps:** the 27 Flatpaks in [flatpaks.txt](flatpaks.txt), picked from the 42 that were on
Bazzite (the rest are listed at the bottom of that file, commented out, if you want one back).
Ubuntu's Firefox snap is removed in favor of the Flatpak so your old profile restores
untouched. A systemd timer updates Flatpaks daily.
- **Dev:** VS Code, Claude desktop (Anthropic's apt repo), Claude Code CLI, and
`build-essential`/cmake, so no dev distrobox needed. **No Node or .NET on the host** by
choice — LudosData and landingPage build in Docker. To add them later:
Bazzite. The rest sit commented out at the bottom of that file. Ubuntu's Firefox snap is removed
in favour of the Flatpak. A systemd timer updates Flatpaks daily.
- **Dev:** VS Code, Claude desktop (Anthropic's apt repo), Claude Code CLI, `build-essential` and
cmake, and git credentials kept in the GNOME keyring. **No Node or .NET on the host** by
choice — LudosData and landingPage build in Docker. To add them:
`sudo add-apt-repository ppa:jdxcode/mise && sudo apt install mise dotnet-sdk-10.0`.
- **Mounts:** the Data drive at **`/mnt/data`** and server-marvin at
**`/mnt/server-marvin-personal`** (automounted).
- **Mounts:** the Data drive at **`/mnt/data`**, and server-marvin at
**`/mnt/server-marvin-personal`** if you gave it credentials.
### 4. Restore
## 3. After the reboot
```bash
scripts/restore.sh # newest backup on server-marvin
ONLY="home steam-saves" scripts/restore.sh # skip the big ones if you want
sudo flatpak update # fetches the NVIDIA GL runtime the Flatpak apps need
```
First it pulls the Flatpak NVIDIA GL runtime (only possible once the driver is loaded after the
reboot). Without it, Flatpak apps render in software.
Flatpak can only match that runtime to the driver once the driver is actually loaded, which is why
it waits until after the reboot. Skip it and apps fall back to software rendering until the daily
timer catches up about 10 minutes after boot.
It deliberately skips a few things:
Then, by hand:
- Fedora's `.bashrc` and `.bash_profile`
- `~/.local/bin` (old pip `--user` tools such as rembg)
- KDE's GNOME-settings database and generated GTK themes
- Bazzite's autostart items
- **Steam:** sign in, then **Settings → Storage → Add drive → `/mnt/data/SteamLibrary`**. Those
games need no redownload.
- **Display:** Settings → Displays. The monitor does **5120x1440 @ 240 Hz**; Bazzite was running
it at 120. Turn on variable refresh rate while you're there. Ubuntu's built-in tiling earns its
keep at this width.
- **PIA VPN:** the official Linux app works on Ubuntu (it couldn't on Bazzite's read-only `/usr`).
Download the installer from PIA and run it.
- **Gitea:** the first `git push` asks for your username and password once, then the GNOME keyring
remembers it. KDE Wallet was doing that here.
Everything is still in the archives, e.g.
`tar -I zstd -xf home.tar.zst -C ~ ./.config/some-app`.
### Moving files across by hand
Old configs full of `/var/home/ckoch/...` paths keep working through a `/var/home → /home`
symlink. Claude Code's per-project memory and history are renamed to the new paths.
Worth knowing while you copy things over from the old install:
- **Flatpak app data** lives in `~/.var/app/<app-id>`. Copying one app's folder across brings that
app's logins, profile and settings with it — Firefox and Thunderbird profiles included — as long
as the app ID matches.
- **Steam saves** are in `~/.local/share/Steam/userdata` (and Proton prefixes in
`steamapps/compatdata`). Game files themselves redownload.
- **FFXIV** is `~/.xlcore`, ~124 GB. Worth copying rather than re-fetching from Square's patch
servers.
- **ComfyUI:** copy the folder but not its `venv` — rebuild that with
`python3 -m venv venv && venv/bin/pip install -r requirements.txt`.
- **Don't copy** Fedora's `.bashrc`/`.bash_profile`, `~/.local/bin` (pip shims built against
Fedora's Python), `~/.config/dconf` (KDE's settings database, which would overwrite GNOME's), or
the KDE-generated `~/.config/gtk-3.0` and `gtk-4.0` themes.
## Check it worked
@@ -124,7 +106,7 @@ nvidia-smi # RTX 5090, driver 595.x
modinfo -F license nvidia # "Dual MIT/GPL" = open modules
docker run --rm --gpus all nvidia/cuda:12.8.0-base-ubuntu24.04 nvidia-smi
flatpak list --app | wc -l # 27
findmnt /mnt/data /mnt/server-marvin-personal
findmnt /mnt/data
claude --version && code --version
```
@@ -132,21 +114,6 @@ Podman's `--device nvidia.com/gpu=all` needs a CDI spec. The toolkit normally ge
boot; if Podman says the device is unknown, run
`sudo nvidia-ctk cdi generate --output=/etc/cdi/nvidia.yaml`.
## By hand after restore
- **Steam:** sign in, then **Settings → Storage → Add drive → `/mnt/data/SteamLibrary`**. Games
there come back without downloading.
- **ComfyUI:** `cd ~/ComfyUI && python3 -m venv venv && venv/bin/pip install -r requirements.txt`
(plus any custom nodes' requirements).
- **Display:** Settings → Displays. The monitor does **5120x1440 @ 240 Hz**; Bazzite was running it
at 120. Turn on variable refresh rate there too. Ubuntu's built-in window tiling works well at
this width.
- **PIA VPN:** the official Linux app works on Ubuntu (it couldn't on Bazzite's read-only
`/usr`). Download the installer from PIA and run it.
- **Gitea:** your first `git push` asks for your username and password (or token) once —
KDE Wallet was answering that for you here, and the GNOME keyring takes over on Ubuntu.
Keyrings aren't in the backup, so no other password comes across either.
## Coming from Bazzite: what moved
| Was | Now |
@@ -154,7 +121,8 @@ boot; if Podman says the device is unknown, run
| `rpm-ostree` layering / `ujust` | `apt` |
| Homebrew `node@24`, `dotnet` | Nothing on the host — those projects build in Docker |
| Claude desktop in a distrobox | Native `claude-desktop` package |
| `/var/home/ckoch` | `/home/ckoch` (+ compatibility symlink) |
| Git password from KDE Wallet | GNOME keyring, via git's libsecret helper |
| `/var/home/ckoch` | `/home/ckoch` |
| `/run/media/ckoch/Data` | `/mnt/data` |
| `/var/mnt/server-marvin-personal` | `/mnt/server-marvin-personal` |
| Image updates + rollback | Software Updater / `sudo apt update && sudo apt upgrade`; Flatpaks auto-update daily. No rollback by default; `sudo apt install timeshift` if you miss it |
@@ -164,5 +132,5 @@ boot; if Podman says the device is unknown, run
- **Add or remove an app:** edit [flatpaks.txt](flatpaks.txt) and re-run `scripts/setup.sh`.
Removing a line doesn't uninstall anything; `flatpak uninstall <id>` once by hand.
- **Next LTS (28.04):** Ubuntu offers the upgrade in Software Updater once 28.04.1 is out. The
upgrader disables third-party repos (Docker, NVIDIA toolkit, etc.). Turn them back on in
upgrader disables third-party repos (Docker, NVIDIA toolkit, and so on) — turn them back on in
Software & Updates → Other Software afterwards.
+3 -3
View File
@@ -1,6 +1,6 @@
# Flathub apps installed system-wide by scripts/setup.sh — one ID per line, '#' comments.
# Picked from everything installed on the Bazzite box (scanned 2026-09-21, chosen 2026-09-23).
# Restoring ~/.var/app brings each app's data back with it (logins, profiles, saves).
# Copying ~/.var/app/<app-id> over from the old install brings that app's logins and settings.
# Removing a line doesn't uninstall the app; `flatpak uninstall <id>` it once by hand.
# -- Internet / chat --
@@ -46,7 +46,7 @@ net.wz2100.wz2100
# ---------------------------------------------------------------------------------------
# Installed on Bazzite, deliberately left behind. Uncomment to bring one back —
# its data is still in the backup's home.tar.zst under .var/app/<id>.
# copy its ~/.var/app/<id> folder across from the old install to keep its settings.
#
# com.github.IsmaelMartinez.teams_for_linux # Teams
# com.ktechpit.whatsie # WhatsApp
@@ -61,6 +61,6 @@ net.wz2100.wz2100
# io.podman_desktop.PodmanDesktop
# org.gnome.Calculator # Ubuntu has its own
# net.longturn.freeciv21
# org.develz.Crawl # ~/.crawl saves are still in the backup
# org.develz.Crawl # saves live in ~/.crawl
# net.sourceforge.atanks
# org.frozen_bubble.frozen-bubble
-111
View File
@@ -1,111 +0,0 @@
#!/usr/bin/env bash
# Run on the Bazzite box BEFORE wiping it. Archives your home folder to server-marvin as
# tar.zst files, then reads every archive back to prove it's intact.
#
# scripts/backup.sh # -> /var/mnt/server-marvin-personal/desktop-backup-<date>
# scripts/backup.sh /some/other/dir # any directory NOT on the disk you're about to wipe
#
# Re-running skips archives that already finished (FORCE=1 redoes them).
# Close Steam, Firefox, Discord and Claude first — files that change mid-read get a warning.
set -euo pipefail
SHARE=/var/mnt/server-marvin-personal
DEST="${1:-$SHARE/desktop-backup-$(date +%F)}"
step() { printf '\n\033[1;34m== %s ==\033[0m\n' "$*"; }
warn() { printf '\033[1;33mwarning:\033[0m %s\n' "$*" >&2; }
die() { printf '\033[1;31merror:\033[0m %s\n' "$*" >&2; exit 1; }
# -- Make sure the backup lands somewhere that survives the reinstall ------------------
if [[ $DEST == "$SHARE"/* ]]; then
ls "$SHARE" >/dev/null 2>&1 || true # poke the automount
mountpoint -q "$SHARE" || die "$SHARE isn't mounted — is server-marvin up?"
fi
mkdir -p "$DEST"
disk_of() { findmnt -n -o SOURCE -T "$1" | sed 's/\[.*//'; }
[[ $(disk_of "$DEST") != "$(disk_of "$HOME")" ]] \
|| die "$DEST is on the same disk as your home — that's the disk Ubuntu will wipe"
echo "Backing up $HOME -> $DEST"
df -h "$DEST" | tail -1
# -- Archive helper ---------------------------------------------------------------------
archive() { # archive <name> <tar args + members...>
local name=$1 out="$DEST/$1.tar.zst"; shift
step "$name"
if [[ -s $out && -z ${FORCE:-} ]]; then echo "already done, skipping"; return; fi
local rc=0
tar --create --file="$out.partial" --use-compress-program='zstd -T0 -3' \
--directory="$HOME" \
--checkpoint=100000 --checkpoint-action='ttyout= %{%H:%M:%S}t %T%*\r' \
"$@" || rc=$?
echo
# GNU tar exits 1 when a file changed while it was being read (an app was still open).
# Everything else still made it in, so keep the archive; anything above 1 is fatal.
(( rc <= 1 )) || die "tar failed on $name (exit $rc)"
(( rc == 0 )) || warn "$name: some files changed while being read — close apps and FORCE=1 to redo if it matters"
mv "$out.partial" "$out"
ls -lh "$out" | awk '{print " " $5}'
}
# Big, self-contained folders get their own archive so they can be restored (or skipped)
# separately. Everything else goes in home.tar.zst.
archive home \
--anchored \
--exclude=./.cache \
--exclude=./.local/share/Trash \
--exclude=./.local/share/Steam \
--exclude=./.steam \
--exclude=./.local/share/containers \
--exclude=./.local/share/flatpak \
--exclude=./.local/share/baloo \
--exclude='./.var/app/*/cache' \
--exclude='./.claude.json.tmp.*' \
--exclude=./.xlcore \
--exclude=./ComfyUI \
--no-anchored \
--exclude=node_modules \
--exclude=__pycache__ \
.
# FFXIV game install (~124 GB) — Square's patch servers make a redownload take hours.
[[ -d $HOME/.xlcore ]] && archive xlcore ./.xlcore
# ComfyUI minus its venv (rebuilt on Ubuntu); this is ~110 GB of models.
[[ -d $HOME/ComfyUI ]] && archive comfyui \
--anchored --exclude=./ComfyUI/venv --exclude=./ComfyUI/.venv \
--no-anchored --exclude=__pycache__ \
./ComfyUI
# Steam: only saves and settings. Games get redownloaded; the ones on the Data drive stay put.
archive steam-saves \
./.local/share/Steam/userdata \
./.local/share/Steam/steamapps/compatdata
# -- Reference info for the rebuild -------------------------------------------------------
step "manifest"
m="$DEST/manifest"; mkdir -p "$m"
flatpak list --app --columns=application,origin,installation > "$m/flatpaks.txt" 2>/dev/null || true
code --list-extensions > "$m/vscode-extensions.txt" 2>/dev/null || true
brew leaves > "$m/brew-leaves.txt" 2>/dev/null || true
rpm-ostree status > "$m/rpm-ostree-status.txt" 2>/dev/null || true
cp /etc/fstab "$m/fstab"
cp -r "$HOME/.local/share/flatpak/overrides" "$m/flatpak-overrides-user" 2>/dev/null || true
cp -r /var/lib/flatpak/overrides "$m/flatpak-overrides-system" 2>/dev/null || true
lsblk -f > "$m/disks.txt"
ls "$HOME/.local/share/Steam/steamapps/common" > "$m/steam-games-home.txt" 2>/dev/null || true
ls /run/media/"$USER"/Data/SteamLibrary/steamapps/common > "$m/steam-games-data-drive.txt" 2>/dev/null || true
ls "$m"
# -- Prove every archive reads back cleanly ----------------------------------------------
if [[ -z ${SKIP_VERIFY:-} ]]; then
for f in "$DEST"/*.tar.zst; do
step "verify $(basename "$f")"
tar --use-compress-program=zstd --list --file="$f" > /dev/null || die "$f is corrupt — rerun with FORCE=1"
echo "ok"
done
fi
step "done"
du -sh "$DEST"/*.tar.zst
echo "Backup is in: $DEST"
echo "Safe to wipe the 990 PRO once you've eyeballed that list."
-90
View File
@@ -1,90 +0,0 @@
#!/usr/bin/env bash
# Run on Ubuntu AFTER setup.sh and a reboot. Unpacks the Bazzite backup into your home,
# minus the Fedora/KDE-specific bits that would fight a fresh Ubuntu desktop.
#
# scripts/restore.sh # newest desktop-backup-* on server-marvin
# scripts/restore.sh /path/to/backup # a specific backup folder
# ONLY="home steam-saves" scripts/restore.sh # just some archives
#
# Everything is still in the archives, so anything skipped here can be pulled out later:
# tar -I zstd -xf home.tar.zst -C ~ ./.config/some-app
set -euo pipefail
SHARE=/mnt/server-marvin-personal
step() { printf '\n\033[1;34m== %s ==\033[0m\n' "$*"; }
die() { printf '\033[1;31merror:\033[0m %s\n' "$*" >&2; exit 1; }
[[ $EUID -ne 0 ]] || die "run as your user, not with sudo"
ls "$SHARE" >/dev/null 2>&1 || true # poke the automount
SRC="${1:-$(ls -d "$SHARE"/desktop-backup-* 2>/dev/null | sort | tail -1)}"
[[ -n $SRC && -d $SRC ]] || die "no backup found — pass the folder, or check $SHARE is mounted"
ONLY=${ONLY:-home steam-saves xlcore comfyui}
echo "Restoring from $SRC: $ONLY"
pgrep -x steam >/dev/null && die "quit Steam first"
# Flatpak apps need a GL extension matching the NVIDIA driver, and flatpak can only see the
# driver version once it's loaded — i.e. now, after the reboot. Without this they render in software.
step "Flatpak NVIDIA runtime"
sudo flatpak update -y --noninteractive
# Old configs (Heroic, Lutris, XIVLauncher, Proton prefixes, ...) hold absolute
# /var/home/ckoch/... paths. One symlink makes all of them resolve on Ubuntu.
[[ -e /var/home ]] || sudo ln -s /home /var/home
# Left out of home.tar.zst on purpose:
skip=(
--anchored
# Fedora's shell dotfiles; Ubuntu's are better and setup.sh already added what's needed
--exclude=./.bashrc --exclude=./.bash_profile --exclude=./.bash_logout --exclude=./.profile
--exclude=./.bashrc.d --exclude=./.zshrc --exclude=./.zprofile
# .NET tool shims built against Homebrew's SDK (setup.sh reinstalled dotnet-ef)
--exclude=./.dotnet
# pip --user installs for Fedora's Python, and launchers for the old distroboxes
--exclude=./.local/bin --exclude='./.local/lib/python*'
--exclude='./.local/share/applications/claude*'
--exclude='./.local/share/applications/war1gus*'
--exclude=./.local/share/applications/code.desktop
# desktop state that would clobber Ubuntu's: GNOME's settings db, keyring, default apps,
# and KDE-generated GTK themes that would recolor GNOME apps
--exclude=./.config/dconf --exclude=./.local/share/keyrings --exclude=./.config/mimeapps.list
--exclude=./.config/gtk-3.0 --exclude=./.config/gtk-4.0
--exclude=./.config/gtkrc --exclude=./.config/gtkrc-2.0 --exclude=./.gtkrc-2.0
# Bazzite leftovers
--exclude=./.config/bazzite --exclude=./.config/autostart/sb-key-notify.desktop
# old SMB password file (setup.sh stored the credentials in /etc/samba)
--exclude=./.smbcredentials
)
for name in $ONLY; do
f="$SRC/$name.tar.zst"
step "$name"
[[ -f $f ]] || { echo "not in backup, skipping"; continue; }
args=()
[[ $name == home ]] && args=("${skip[@]}")
tar --extract --file="$f" --use-compress-program=zstd --directory="$HOME" \
--checkpoint=100000 --checkpoint-action='ttyout= %{%H:%M:%S}t %T%*\r' \
"${args[@]}"
echo "ok"
done
# Claude Code keys memory/history by folder path; /var/home/ckoch is now /home/ckoch.
if [[ -d ~/.claude/projects ]]; then
for d in ~/.claude/projects/-var-home-*; do
[[ -d $d ]] || continue
new=~/.claude/projects/${d##*/-var}
[[ -e $new ]] || mv "$d" "$new"
done
[[ -f ~/.claude.json ]] && sed -i 's#"/var/home/#"/home/#g' ~/.claude.json
fi
step "Done — a few things to finish by hand"
cat <<EOF
- Steam: open it, sign in, then Settings > Storage > Add drive > /mnt/data/SteamLibrary
(games on the Data drive come back without downloading; home-drive games redownload).
- ComfyUI: rebuild its venv —
cd ~/ComfyUI && python3 -m venv venv && venv/bin/pip install -r requirements.txt
- Old pip --user tools (rembg etc.) weren't restored: pipx install "rembg[cli]" if you want it.
- Log out and back in so every app picks up the restored settings.
EOF
+17 -8
View File
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# Fresh Ubuntu 26.04 LTS -> my desktop, in one pass. Run as your user; it sudos as needed.
# Safe to re-run: each step checks before it changes anything. Reboot when it finishes,
# then run scripts/restore.sh.
# then run `sudo flatpak update` once so the Flatpak apps get the NVIDIA GL runtime.
set -euo pipefail
REPO="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
@@ -9,7 +9,7 @@ REPO="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
# Second NVMe (970 EVO Plus, label "Data"): SteamLibrary + emulator files. Never formatted.
DATA_UUID=29db4bd3-b743-417d-aa39-4da4acc9df3f
DATA_MNT=/mnt/data
# server-marvin SMB share — the backup lives here. \040 is fstab's escaped space.
# server-marvin SMB share, mounted if you give it credentials. \040 is fstab's escaped space.
MARVIN_SHARE='//192.168.1.193/Personal\040Files\040-\040ckoch'
MARVIN_MNT=/mnt/server-marvin-personal
MARVIN_CREDS=/etc/samba/credentials-marvin
@@ -229,14 +229,17 @@ fi
sudo blkid -U "$DATA_UUID" >/dev/null || warn "Data drive ($DATA_UUID) not found — fstab entry is nofail, so boot is fine"
if [[ ! -f $MARVIN_CREDS ]]; then
read -rp "server-marvin SMB username: " smb_user
read -rsp "server-marvin SMB password: " smb_pass; echo
echo "server-marvin SMB share — press Enter to skip mounting it."
read -rp " username: " smb_user
if [[ -n $smb_user ]]; then
read -rsp " password: " smb_pass; echo
sudo install -d -m 0755 /etc/samba
printf 'username=%s\npassword=%s\n' "$smb_user" "$smb_pass" \
| sudo install -m 600 /dev/stdin "$MARVIN_CREDS"
unset smb_pass
fi
if ! grep -q "$MARVIN_MNT" /etc/fstab; then
fi
if [[ -f $MARVIN_CREDS ]] && ! grep -q "$MARVIN_MNT" /etc/fstab; then
echo "$MARVIN_SHARE $MARVIN_MNT cifs credentials=$MARVIN_CREDS,uid=$(id -u),gid=$(id -g),iocharset=utf8,vers=3.0,x-systemd.automount,_netdev,nofail 0 0" \
| sudo tee -a /etc/fstab >/dev/null
fi
@@ -249,7 +252,13 @@ step "Small carry-overs from Bazzite"
echo 'options bluetooth disable_ertm=1' | sudo tee /etc/modprobe.d/bluetooth-xbox.conf >/dev/null
step "Done"
cat <<EOF
Reboot now (NVIDIA driver + docker/kvm groups take effect), then:
scripts/restore.sh
cat <<'EOF'
Reboot now — the NVIDIA driver and your docker/kvm groups only take effect after that.
Then, once:
sudo flatpak update # pulls the NVIDIA GL runtime the Flatpak apps need.
# Skip it and apps render in software until the daily
# timer catches up ~10 minutes after boot.
Then sign in to things, and add /mnt/data/SteamLibrary in Steam > Settings > Storage.
EOF