2026-04-05 09:04:45 +00:00
|
|
|
|
#!/bin/sh
|
Align VPS firstboot with modular pipeline (Sam & Claude)
Rewrite vps/firstboot-vps.sh as phase-1 only: partition disk,
create ZFS pool "clawdie", install FreeBSD base, inject firstboot
payload, install bootloader, reboot. On first HDD boot the standard
firstboot.sh modular pipeline runs (zfs detect, wizard, gpu, pkg,
ssh, env, system, tailscale, deploy).
Pre-baked clawdie.conf values get written to build.cfg with
TARGET=cloud so the wizard is skipped. Pool named "clawdie"
(not zroot) for pool detection compatibility.
Remove duplicate clawdie-vps-setup.sh.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-05 11:31:59 +00:00
|
|
|
|
# firstboot-vps.sh — Phase 1: Install FreeBSD to disk from mfsBSD
|
2026-04-05 09:04:45 +00:00
|
|
|
|
#
|
|
|
|
|
|
# Runs on mfsBSD (FreeBSD in RAM) after SSH login.
|
Align VPS firstboot with modular pipeline (Sam & Claude)
Rewrite vps/firstboot-vps.sh as phase-1 only: partition disk,
create ZFS pool "clawdie", install FreeBSD base, inject firstboot
payload, install bootloader, reboot. On first HDD boot the standard
firstboot.sh modular pipeline runs (zfs detect, wizard, gpu, pkg,
ssh, env, system, tailscale, deploy).
Pre-baked clawdie.conf values get written to build.cfg with
TARGET=cloud so the wizard is skipped. Pool named "clawdie"
(not zroot) for pool detection compatibility.
Remove duplicate clawdie-vps-setup.sh.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-05 11:31:59 +00:00
|
|
|
|
# Partitions disk, installs base FreeBSD, injects the clawdie-iso
|
|
|
|
|
|
# firstboot payload, and reboots. On first HDD boot, the standard
|
|
|
|
|
|
# firstboot.sh pipeline handles everything else (wizard, packages,
|
|
|
|
|
|
# GPU, .env, deploy).
|
|
|
|
|
|
#
|
|
|
|
|
|
# Usage:
|
|
|
|
|
|
# Interactive: /usr/local/share/clawdie-iso/firstboot-vps.sh
|
|
|
|
|
|
# Headless: copy clawdie.conf.tpl → clawdie.conf, edit, then run
|
2026-04-05 09:04:45 +00:00
|
|
|
|
#
|
|
|
|
|
|
# Flow:
|
Align VPS firstboot with modular pipeline (Sam & Claude)
Rewrite vps/firstboot-vps.sh as phase-1 only: partition disk,
create ZFS pool "clawdie", install FreeBSD base, inject firstboot
payload, install bootloader, reboot. On first HDD boot the standard
firstboot.sh modular pipeline runs (zfs detect, wizard, gpu, pkg,
ssh, env, system, tailscale, deploy).
Pre-baked clawdie.conf values get written to build.cfg with
TARGET=cloud so the wizard is skipped. Pool named "clawdie"
(not zroot) for pool detection compatibility.
Remove duplicate clawdie-vps-setup.sh.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-05 11:31:59 +00:00
|
|
|
|
# 1. Detect target disk
|
|
|
|
|
|
# 2. Optionally read clawdie.conf for pre-baked values
|
|
|
|
|
|
# 3. Partition disk (GPT: EFI + swap + ZFS)
|
|
|
|
|
|
# 4. Create ZFS pool "clawdie" with standard datasets
|
|
|
|
|
|
# 5. Install FreeBSD base + kernel
|
|
|
|
|
|
# 6. Inject firstboot payload (same as installerconfig on USB)
|
|
|
|
|
|
# 7. Install bootloader + reboot
|
|
|
|
|
|
#
|
|
|
|
|
|
# After reboot, firstboot.sh runs the modular shell-*.sh pipeline:
|
|
|
|
|
|
# zfs detect → wizard → gpu → pkg → ssh → env → system → tailscale → deploy
|
2026-04-05 09:04:45 +00:00
|
|
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
Align VPS firstboot with modular pipeline (Sam & Claude)
Rewrite vps/firstboot-vps.sh as phase-1 only: partition disk,
create ZFS pool "clawdie", install FreeBSD base, inject firstboot
payload, install bootloader, reboot. On first HDD boot the standard
firstboot.sh modular pipeline runs (zfs detect, wizard, gpu, pkg,
ssh, env, system, tailscale, deploy).
Pre-baked clawdie.conf values get written to build.cfg with
TARGET=cloud so the wizard is skipped. Pool named "clawdie"
(not zroot) for pool detection compatibility.
Remove duplicate clawdie-vps-setup.sh.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-05 11:31:59 +00:00
|
|
|
|
SHARE="${SHARE:-/usr/local/share/clawdie-iso}"
|
2026-04-05 09:04:45 +00:00
|
|
|
|
LOG="/var/log/clawdie-vps-install.log"
|
|
|
|
|
|
|
|
|
|
|
|
. "${SHARE}/build.cfg"
|
|
|
|
|
|
|
Align VPS firstboot with modular pipeline (Sam & Claude)
Rewrite vps/firstboot-vps.sh as phase-1 only: partition disk,
create ZFS pool "clawdie", install FreeBSD base, inject firstboot
payload, install bootloader, reboot. On first HDD boot the standard
firstboot.sh modular pipeline runs (zfs detect, wizard, gpu, pkg,
ssh, env, system, tailscale, deploy).
Pre-baked clawdie.conf values get written to build.cfg with
TARGET=cloud so the wizard is skipped. Pool named "clawdie"
(not zroot) for pool detection compatibility.
Remove duplicate clawdie-vps-setup.sh.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-05 11:31:59 +00:00
|
|
|
|
# ── Helpers <20><>──────────────────────────────────────────────────────────────
|
2026-04-05 09:04:45 +00:00
|
|
|
|
|
|
|
|
|
|
die() { echo "ERROR: $1" >&2; exit 1; }
|
|
|
|
|
|
|
Align VPS firstboot with modular pipeline (Sam & Claude)
Rewrite vps/firstboot-vps.sh as phase-1 only: partition disk,
create ZFS pool "clawdie", install FreeBSD base, inject firstboot
payload, install bootloader, reboot. On first HDD boot the standard
firstboot.sh modular pipeline runs (zfs detect, wizard, gpu, pkg,
ssh, env, system, tailscale, deploy).
Pre-baked clawdie.conf values get written to build.cfg with
TARGET=cloud so the wizard is skipped. Pool named "clawdie"
(not zroot) for pool detection compatibility.
Remove duplicate clawdie-vps-setup.sh.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-05 11:31:59 +00:00
|
|
|
|
log_vps() { echo "$(date '+%H:%M:%S') $1" | tee -a "$LOG"; }
|
|
|
|
|
|
|
|
|
|
|
|
gen_password() { openssl rand -base64 32 | tr -d '\n/+=' | head -c 24; }
|
2026-04-05 09:04:45 +00:00
|
|
|
|
|
|
|
|
|
|
detect_disk() {
|
Align VPS firstboot with modular pipeline (Sam & Claude)
Rewrite vps/firstboot-vps.sh as phase-1 only: partition disk,
create ZFS pool "clawdie", install FreeBSD base, inject firstboot
payload, install bootloader, reboot. On first HDD boot the standard
firstboot.sh modular pipeline runs (zfs detect, wizard, gpu, pkg,
ssh, env, system, tailscale, deploy).
Pre-baked clawdie.conf values get written to build.cfg with
TARGET=cloud so the wizard is skipped. Pool named "clawdie"
(not zroot) for pool detection compatibility.
Remove duplicate clawdie-vps-setup.sh.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-05 11:31:59 +00:00
|
|
|
|
for d in /dev/nda0 /dev/nvd0 /dev/da0 /dev/vtbd0 /dev/ada0; do
|
|
|
|
|
|
if [ -e "$d" ]; then
|
|
|
|
|
|
echo "$d"
|
|
|
|
|
|
return 0
|
|
|
|
|
|
fi
|
|
|
|
|
|
done
|
|
|
|
|
|
die "Cannot detect target disk"
|
2026-04-05 09:04:45 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
Align VPS firstboot with modular pipeline (Sam & Claude)
Rewrite vps/firstboot-vps.sh as phase-1 only: partition disk,
create ZFS pool "clawdie", install FreeBSD base, inject firstboot
payload, install bootloader, reboot. On first HDD boot the standard
firstboot.sh modular pipeline runs (zfs detect, wizard, gpu, pkg,
ssh, env, system, tailscale, deploy).
Pre-baked clawdie.conf values get written to build.cfg with
TARGET=cloud so the wizard is skipped. Pool named "clawdie"
(not zroot) for pool detection compatibility.
Remove duplicate clawdie-vps-setup.sh.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-05 11:31:59 +00:00
|
|
|
|
# ── Pre-baked config (headless) ───────────────────────────────────────────
|
2026-04-05 09:04:45 +00:00
|
|
|
|
|
Align VPS firstboot with modular pipeline (Sam & Claude)
Rewrite vps/firstboot-vps.sh as phase-1 only: partition disk,
create ZFS pool "clawdie", install FreeBSD base, inject firstboot
payload, install bootloader, reboot. On first HDD boot the standard
firstboot.sh modular pipeline runs (zfs detect, wizard, gpu, pkg,
ssh, env, system, tailscale, deploy).
Pre-baked clawdie.conf values get written to build.cfg with
TARGET=cloud so the wizard is skipped. Pool named "clawdie"
(not zroot) for pool detection compatibility.
Remove duplicate clawdie-vps-setup.sh.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-05 11:31:59 +00:00
|
|
|
|
if [ -f "${SHARE}/clawdie.conf" ]; then
|
|
|
|
|
|
. "${SHARE}/clawdie.conf"
|
|
|
|
|
|
log_vps "[vps] Loaded clawdie.conf"
|
|
|
|
|
|
fi
|
2026-04-05 09:04:45 +00:00
|
|
|
|
|
Align VPS firstboot with modular pipeline (Sam & Claude)
Rewrite vps/firstboot-vps.sh as phase-1 only: partition disk,
create ZFS pool "clawdie", install FreeBSD base, inject firstboot
payload, install bootloader, reboot. On first HDD boot the standard
firstboot.sh modular pipeline runs (zfs detect, wizard, gpu, pkg,
ssh, env, system, tailscale, deploy).
Pre-baked clawdie.conf values get written to build.cfg with
TARGET=cloud so the wizard is skipped. Pool named "clawdie"
(not zroot) for pool detection compatibility.
Remove duplicate clawdie-vps-setup.sh.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-05 11:31:59 +00:00
|
|
|
|
# ── Detect disk ───────────────────────────────────────────────────────────
|
|
|
|
|
|
|
|
|
|
|
|
DISK=$(detect_disk)
|
|
|
|
|
|
log_vps "[vps] Target disk: ${DISK}"
|
|
|
|
|
|
|
|
|
|
|
|
# ── Interactive confirmation (if TTY available) ──────────────────────────
|
|
|
|
|
|
|
|
|
|
|
|
if [ -t 0 ] && command -v bsddialog >/dev/null 2>&1; then
|
|
|
|
|
|
_dialog() { bsddialog --backtitle "Clawdie-VPS Setup" "$@" 2>&1; }
|
|
|
|
|
|
|
|
|
|
|
|
_dialog --msgbox "\
|
|
|
|
|
|
Clawdie-VPS Installer
|
|
|
|
|
|
|
|
|
|
|
|
Target disk: ${DISK}
|
|
|
|
|
|
ALL DATA ON THIS DISK WILL BE ERASED.
|
|
|
|
|
|
|
|
|
|
|
|
After installation, the system will reboot and
|
|
|
|
|
|
run the standard Clawdie firstboot wizard." 12 60
|
|
|
|
|
|
|
|
|
|
|
|
if ! _dialog --yesno "\
|
|
|
|
|
|
Confirm: ERASE ALL DATA on ${DISK} and install FreeBSD?" 8 60; then
|
|
|
|
|
|
die "Cancelled."
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
2026-04-06 12:11:45 +02:00
|
|
|
|
# Optional: pre-set TARGET for vps (skip wizard on reboot)
|
Align VPS firstboot with modular pipeline (Sam & Claude)
Rewrite vps/firstboot-vps.sh as phase-1 only: partition disk,
create ZFS pool "clawdie", install FreeBSD base, inject firstboot
payload, install bootloader, reboot. On first HDD boot the standard
firstboot.sh modular pipeline runs (zfs detect, wizard, gpu, pkg,
ssh, env, system, tailscale, deploy).
Pre-baked clawdie.conf values get written to build.cfg with
TARGET=cloud so the wizard is skipped. Pool named "clawdie"
(not zroot) for pool detection compatibility.
Remove duplicate clawdie-vps-setup.sh.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-05 11:31:59 +00:00
|
|
|
|
if [ -n "${ASSISTANT_NAME:-}" ] && [ -n "${AGENT_DOMAIN:-}" ] && [ -n "${TZ:-}" ]; then
|
2026-04-06 12:11:45 +02:00
|
|
|
|
_vps_target="vps"
|
Align VPS firstboot with modular pipeline (Sam & Claude)
Rewrite vps/firstboot-vps.sh as phase-1 only: partition disk,
create ZFS pool "clawdie", install FreeBSD base, inject firstboot
payload, install bootloader, reboot. On first HDD boot the standard
firstboot.sh modular pipeline runs (zfs detect, wizard, gpu, pkg,
ssh, env, system, tailscale, deploy).
Pre-baked clawdie.conf values get written to build.cfg with
TARGET=cloud so the wizard is skipped. Pool named "clawdie"
(not zroot) for pool detection compatibility.
Remove duplicate clawdie-vps-setup.sh.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-05 11:31:59 +00:00
|
|
|
|
_dialog --msgbox "\
|
|
|
|
|
|
Pre-baked config detected:
|
|
|
|
|
|
Agent: ${ASSISTANT_NAME}
|
|
|
|
|
|
Domain: ${AGENT_DOMAIN}
|
|
|
|
|
|
TZ: ${TZ}
|
|
|
|
|
|
|
|
|
|
|
|
Wizard will be skipped on first boot." 12 60
|
|
|
|
|
|
else
|
|
|
|
|
|
_vps_target="baremetal"
|
|
|
|
|
|
fi
|
|
|
|
|
|
elif [ -t 0 ]; then
|
|
|
|
|
|
echo "============================================"
|
|
|
|
|
|
echo " Clawdie-VPS Installer"
|
|
|
|
|
|
echo " Target disk: ${DISK}"
|
|
|
|
|
|
echo " ALL DATA WILL BE ERASED."
|
|
|
|
|
|
echo "============================================"
|
|
|
|
|
|
printf "Continue? (yes/no): "
|
|
|
|
|
|
read _confirm
|
|
|
|
|
|
[ "$_confirm" = "yes" ] || die "Cancelled."
|
|
|
|
|
|
_vps_target="baremetal"
|
2026-04-05 09:04:45 +00:00
|
|
|
|
else
|
Align VPS firstboot with modular pipeline (Sam & Claude)
Rewrite vps/firstboot-vps.sh as phase-1 only: partition disk,
create ZFS pool "clawdie", install FreeBSD base, inject firstboot
payload, install bootloader, reboot. On first HDD boot the standard
firstboot.sh modular pipeline runs (zfs detect, wizard, gpu, pkg,
ssh, env, system, tailscale, deploy).
Pre-baked clawdie.conf values get written to build.cfg with
TARGET=cloud so the wizard is skipped. Pool named "clawdie"
(not zroot) for pool detection compatibility.
Remove duplicate clawdie-vps-setup.sh.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-05 11:31:59 +00:00
|
|
|
|
# No TTY — require clawdie.conf
|
|
|
|
|
|
[ -n "${ASSISTANT_NAME:-}" ] || die "No TTY and no ASSISTANT_NAME in clawdie.conf"
|
2026-04-06 12:11:45 +02:00
|
|
|
|
_vps_target="vps"
|
2026-04-05 09:04:45 +00:00
|
|
|
|
fi
|
|
|
|
|
|
|
Align VPS firstboot with modular pipeline (Sam & Claude)
Rewrite vps/firstboot-vps.sh as phase-1 only: partition disk,
create ZFS pool "clawdie", install FreeBSD base, inject firstboot
payload, install bootloader, reboot. On first HDD boot the standard
firstboot.sh modular pipeline runs (zfs detect, wizard, gpu, pkg,
ssh, env, system, tailscale, deploy).
Pre-baked clawdie.conf values get written to build.cfg with
TARGET=cloud so the wizard is skipped. Pool named "clawdie"
(not zroot) for pool detection compatibility.
Remove duplicate clawdie-vps-setup.sh.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-05 11:31:59 +00:00
|
|
|
|
# ── Step 1: Partition disk ────────────────────────────────────────────────
|
2026-04-05 09:04:45 +00:00
|
|
|
|
|
Align VPS firstboot with modular pipeline (Sam & Claude)
Rewrite vps/firstboot-vps.sh as phase-1 only: partition disk,
create ZFS pool "clawdie", install FreeBSD base, inject firstboot
payload, install bootloader, reboot. On first HDD boot the standard
firstboot.sh modular pipeline runs (zfs detect, wizard, gpu, pkg,
ssh, env, system, tailscale, deploy).
Pre-baked clawdie.conf values get written to build.cfg with
TARGET=cloud so the wizard is skipped. Pool named "clawdie"
(not zroot) for pool detection compatibility.
Remove duplicate clawdie-vps-setup.sh.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-05 11:31:59 +00:00
|
|
|
|
log_vps "[vps] [1/5] Partitioning ${DISK}..."
|
2026-04-05 09:04:45 +00:00
|
|
|
|
|
Align VPS firstboot with modular pipeline (Sam & Claude)
Rewrite vps/firstboot-vps.sh as phase-1 only: partition disk,
create ZFS pool "clawdie", install FreeBSD base, inject firstboot
payload, install bootloader, reboot. On first HDD boot the standard
firstboot.sh modular pipeline runs (zfs detect, wizard, gpu, pkg,
ssh, env, system, tailscale, deploy).
Pre-baked clawdie.conf values get written to build.cfg with
TARGET=cloud so the wizard is skipped. Pool named "clawdie"
(not zroot) for pool detection compatibility.
Remove duplicate clawdie-vps-setup.sh.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-05 11:31:59 +00:00
|
|
|
|
gpart destroy -F "${DISK}" 2>/dev/null || true
|
|
|
|
|
|
gpart create -s gpt "${DISK}"
|
2026-04-05 09:04:45 +00:00
|
|
|
|
gpart add -t efi -s 260M -l boot "${DISK}"
|
|
|
|
|
|
gpart add -t freebsd-swap -s 2G -l swap "${DISK}"
|
|
|
|
|
|
gpart add -t freebsd-zfs -l zroot "${DISK}"
|
|
|
|
|
|
newfs_msdos /dev/gpt/boot
|
|
|
|
|
|
|
Align VPS firstboot with modular pipeline (Sam & Claude)
Rewrite vps/firstboot-vps.sh as phase-1 only: partition disk,
create ZFS pool "clawdie", install FreeBSD base, inject firstboot
payload, install bootloader, reboot. On first HDD boot the standard
firstboot.sh modular pipeline runs (zfs detect, wizard, gpu, pkg,
ssh, env, system, tailscale, deploy).
Pre-baked clawdie.conf values get written to build.cfg with
TARGET=cloud so the wizard is skipped. Pool named "clawdie"
(not zroot) for pool detection compatibility.
Remove duplicate clawdie-vps-setup.sh.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-05 11:31:59 +00:00
|
|
|
|
# ── Step 2: Create ZFS pool ──────────────────────────────────────────────
|
|
|
|
|
|
|
|
|
|
|
|
log_vps "[vps] [2/5] Creating ZFS pool 'clawdie'..."
|
2026-04-05 09:04:45 +00:00
|
|
|
|
|
|
|
|
|
|
ZFS_PART="${DISK}p3"
|
|
|
|
|
|
[ -e "/dev/gpt/zroot" ] && ZFS_PART="/dev/gpt/zroot"
|
|
|
|
|
|
|
Align VPS firstboot with modular pipeline (Sam & Claude)
Rewrite vps/firstboot-vps.sh as phase-1 only: partition disk,
create ZFS pool "clawdie", install FreeBSD base, inject firstboot
payload, install bootloader, reboot. On first HDD boot the standard
firstboot.sh modular pipeline runs (zfs detect, wizard, gpu, pkg,
ssh, env, system, tailscale, deploy).
Pre-baked clawdie.conf values get written to build.cfg with
TARGET=cloud so the wizard is skipped. Pool named "clawdie"
(not zroot) for pool detection compatibility.
Remove duplicate clawdie-vps-setup.sh.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-05 11:31:59 +00:00
|
|
|
|
zpool create -f -m none -R /mnt clawdie "$ZFS_PART"
|
|
|
|
|
|
zfs create -o mountpoint=none clawdie/ROOT
|
|
|
|
|
|
zfs create -o mountpoint=/ clawdie/ROOT/default
|
|
|
|
|
|
zfs create -o mountpoint=/tmp -o setuid=off clawdie/tmp
|
|
|
|
|
|
zfs create -o mountpoint=/usr -o canmount=off clawdie/usr
|
|
|
|
|
|
zfs create -o mountpoint=/home clawdie/home
|
|
|
|
|
|
zfs create -o mountpoint=/var -o canmount=off clawdie/var
|
|
|
|
|
|
zfs create -o mountpoint=/var/cache -o setuid=off clawdie/var/cache
|
|
|
|
|
|
zfs create -o mountpoint=/var/log -o setuid=off clawdie/var/log
|
|
|
|
|
|
zfs create -o mountpoint=/var/tmp -o setuid=off clawdie/var/tmp
|
|
|
|
|
|
zfs create -o mountpoint=/var/db clawdie/var/db
|
|
|
|
|
|
zfs set compression=lz4 clawdie
|
|
|
|
|
|
zfs set atime=off clawdie
|
|
|
|
|
|
|
|
|
|
|
|
# ── Step 3: Install FreeBSD base ─────────────────────────────────────────
|
|
|
|
|
|
|
|
|
|
|
|
log_vps "[vps] [3/5] Installing FreeBSD ${FREEBSD_VERSION} base..."
|
|
|
|
|
|
|
|
|
|
|
|
BASE_URL="https://download.freebsd.org/releases/${FREEBSD_ARCH}/${FREEBSD_VERSION}"
|
2026-04-05 09:04:45 +00:00
|
|
|
|
cd /tmp
|
Align VPS firstboot with modular pipeline (Sam & Claude)
Rewrite vps/firstboot-vps.sh as phase-1 only: partition disk,
create ZFS pool "clawdie", install FreeBSD base, inject firstboot
payload, install bootloader, reboot. On first HDD boot the standard
firstboot.sh modular pipeline runs (zfs detect, wizard, gpu, pkg,
ssh, env, system, tailscale, deploy).
Pre-baked clawdie.conf values get written to build.cfg with
TARGET=cloud so the wizard is skipped. Pool named "clawdie"
(not zroot) for pool detection compatibility.
Remove duplicate clawdie-vps-setup.sh.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-05 11:31:59 +00:00
|
|
|
|
fetch "${BASE_URL}/base.txz" || die "Failed to fetch base.txz"
|
|
|
|
|
|
fetch "${BASE_URL}/kernel.txz" || die "Failed to fetch kernel.txz"
|
2026-04-05 09:04:45 +00:00
|
|
|
|
tar -xpf base.txz -C /mnt
|
|
|
|
|
|
tar -xpf kernel.txz -C /mnt
|
|
|
|
|
|
|
|
|
|
|
|
# fstab
|
|
|
|
|
|
cat > /mnt/etc/fstab <<EOF
|
|
|
|
|
|
/dev/gpt/boot /boot/efi msdosfs rw 0 0
|
|
|
|
|
|
/dev/gpt/swap none swap sw 0 0
|
|
|
|
|
|
EOF
|
|
|
|
|
|
|
Align VPS firstboot with modular pipeline (Sam & Claude)
Rewrite vps/firstboot-vps.sh as phase-1 only: partition disk,
create ZFS pool "clawdie", install FreeBSD base, inject firstboot
payload, install bootloader, reboot. On first HDD boot the standard
firstboot.sh modular pipeline runs (zfs detect, wizard, gpu, pkg,
ssh, env, system, tailscale, deploy).
Pre-baked clawdie.conf values get written to build.cfg with
TARGET=cloud so the wizard is skipped. Pool named "clawdie"
(not zroot) for pool detection compatibility.
Remove duplicate clawdie-vps-setup.sh.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-05 11:31:59 +00:00
|
|
|
|
# loader.conf
|
|
|
|
|
|
cat > /mnt/boot/loader.conf <<EOF
|
|
|
|
|
|
zfs_load="YES"
|
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
|
|
|
|
# Minimal rc.conf (firstboot.sh will configure the rest)
|
2026-04-05 09:04:45 +00:00
|
|
|
|
cat > /mnt/etc/rc.conf <<EOF
|
|
|
|
|
|
zfs_enable="YES"
|
|
|
|
|
|
sshd_enable="YES"
|
|
|
|
|
|
ifconfig_DEFAULT="DHCP"
|
Align VPS firstboot with modular pipeline (Sam & Claude)
Rewrite vps/firstboot-vps.sh as phase-1 only: partition disk,
create ZFS pool "clawdie", install FreeBSD base, inject firstboot
payload, install bootloader, reboot. On first HDD boot the standard
firstboot.sh modular pipeline runs (zfs detect, wizard, gpu, pkg,
ssh, env, system, tailscale, deploy).
Pre-baked clawdie.conf values get written to build.cfg with
TARGET=cloud so the wizard is skipped. Pool named "clawdie"
(not zroot) for pool detection compatibility.
Remove duplicate clawdie-vps-setup.sh.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-05 11:31:59 +00:00
|
|
|
|
clawdie_firstboot_enable="YES"
|
2026-04-05 09:04:45 +00:00
|
|
|
|
EOF
|
|
|
|
|
|
|
|
|
|
|
|
# Timezone
|
Align VPS firstboot with modular pipeline (Sam & Claude)
Rewrite vps/firstboot-vps.sh as phase-1 only: partition disk,
create ZFS pool "clawdie", install FreeBSD base, inject firstboot
payload, install bootloader, reboot. On first HDD boot the standard
firstboot.sh modular pipeline runs (zfs detect, wizard, gpu, pkg,
ssh, env, system, tailscale, deploy).
Pre-baked clawdie.conf values get written to build.cfg with
TARGET=cloud so the wizard is skipped. Pool named "clawdie"
(not zroot) for pool detection compatibility.
Remove duplicate clawdie-vps-setup.sh.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-05 11:31:59 +00:00
|
|
|
|
chroot /mnt tzsetup "${TZ:-UTC}"
|
2026-04-05 09:04:45 +00:00
|
|
|
|
|
|
|
|
|
|
# Create clawdie user
|
|
|
|
|
|
chroot /mnt pw useradd -n clawdie -u 1001 -m -G wheel -s /bin/sh
|
Align VPS firstboot with modular pipeline (Sam & Claude)
Rewrite vps/firstboot-vps.sh as phase-1 only: partition disk,
create ZFS pool "clawdie", install FreeBSD base, inject firstboot
payload, install bootloader, reboot. On first HDD boot the standard
firstboot.sh modular pipeline runs (zfs detect, wizard, gpu, pkg,
ssh, env, system, tailscale, deploy).
Pre-baked clawdie.conf values get written to build.cfg with
TARGET=cloud so the wizard is skipped. Pool named "clawdie"
(not zroot) for pool detection compatibility.
Remove duplicate clawdie-vps-setup.sh.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-05 11:31:59 +00:00
|
|
|
|
_root_pw=$(gen_password)
|
|
|
|
|
|
_user_pw=$(gen_password)
|
|
|
|
|
|
echo "root:$(openssl passwd -6 "$_root_pw")" | chroot /mnt chpass -H root
|
|
|
|
|
|
echo "clawdie:$(openssl passwd -6 "$_user_pw")" | chroot /mnt chpass -H clawdie
|
2026-04-05 09:04:45 +00:00
|
|
|
|
|
Align VPS firstboot with modular pipeline (Sam & Claude)
Rewrite vps/firstboot-vps.sh as phase-1 only: partition disk,
create ZFS pool "clawdie", install FreeBSD base, inject firstboot
payload, install bootloader, reboot. On first HDD boot the standard
firstboot.sh modular pipeline runs (zfs detect, wizard, gpu, pkg,
ssh, env, system, tailscale, deploy).
Pre-baked clawdie.conf values get written to build.cfg with
TARGET=cloud so the wizard is skipped. Pool named "clawdie"
(not zroot) for pool detection compatibility.
Remove duplicate clawdie-vps-setup.sh.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-05 11:31:59 +00:00
|
|
|
|
# sudo for wheel
|
|
|
|
|
|
mkdir -p /mnt/usr/local/etc/sudoers.d
|
2026-04-05 09:04:45 +00:00
|
|
|
|
cat > /mnt/usr/local/etc/sudoers.d/wheel <<EOF
|
|
|
|
|
|
%wheel ALL=(ALL) NOPASSWD: ALL
|
|
|
|
|
|
EOF
|
|
|
|
|
|
chmod 440 /mnt/usr/local/etc/sudoers.d/wheel
|
|
|
|
|
|
|
Align VPS firstboot with modular pipeline (Sam & Claude)
Rewrite vps/firstboot-vps.sh as phase-1 only: partition disk,
create ZFS pool "clawdie", install FreeBSD base, inject firstboot
payload, install bootloader, reboot. On first HDD boot the standard
firstboot.sh modular pipeline runs (zfs detect, wizard, gpu, pkg,
ssh, env, system, tailscale, deploy).
Pre-baked clawdie.conf values get written to build.cfg with
TARGET=cloud so the wizard is skipped. Pool named "clawdie"
(not zroot) for pool detection compatibility.
Remove duplicate clawdie-vps-setup.sh.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-05 11:31:59 +00:00
|
|
|
|
# ── Step 4: Inject firstboot payload ─────────────────────────────────────
|
|
|
|
|
|
# Same as installerconfig does for USB — copy firstboot scripts + packages + tarball
|
|
|
|
|
|
|
|
|
|
|
|
log_vps "[vps] [4/5] Injecting firstboot payload..."
|
|
|
|
|
|
|
|
|
|
|
|
HDD_SHARE="/mnt/usr/local/share/clawdie-iso"
|
|
|
|
|
|
HDD_RCD="/mnt/usr/local/etc/rc.d"
|
|
|
|
|
|
|
|
|
|
|
|
mkdir -p "$HDD_SHARE"
|
|
|
|
|
|
cp -r "${SHARE}/firstboot" "${HDD_SHARE}/"
|
|
|
|
|
|
cp "${SHARE}/build.cfg" "${HDD_SHARE}/"
|
2026-04-05 09:04:45 +00:00
|
|
|
|
|
Align VPS firstboot with modular pipeline (Sam & Claude)
Rewrite vps/firstboot-vps.sh as phase-1 only: partition disk,
create ZFS pool "clawdie", install FreeBSD base, inject firstboot
payload, install bootloader, reboot. On first HDD boot the standard
firstboot.sh modular pipeline runs (zfs detect, wizard, gpu, pkg,
ssh, env, system, tailscale, deploy).
Pre-baked clawdie.conf values get written to build.cfg with
TARGET=cloud so the wizard is skipped. Pool named "clawdie"
(not zroot) for pool detection compatibility.
Remove duplicate clawdie-vps-setup.sh.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-05 11:31:59 +00:00
|
|
|
|
# Override TARGET in the HDD copy of build.cfg if pre-baked
|
2026-04-06 12:11:45 +02:00
|
|
|
|
if [ "$_vps_target" = "vps" ]; then
|
|
|
|
|
|
sed -i '' "s/^TARGET=.*/TARGET=\"vps\"/" "${HDD_SHARE}/build.cfg"
|
Align VPS firstboot with modular pipeline (Sam & Claude)
Rewrite vps/firstboot-vps.sh as phase-1 only: partition disk,
create ZFS pool "clawdie", install FreeBSD base, inject firstboot
payload, install bootloader, reboot. On first HDD boot the standard
firstboot.sh modular pipeline runs (zfs detect, wizard, gpu, pkg,
ssh, env, system, tailscale, deploy).
Pre-baked clawdie.conf values get written to build.cfg with
TARGET=cloud so the wizard is skipped. Pool named "clawdie"
(not zroot) for pool detection compatibility.
Remove duplicate clawdie-vps-setup.sh.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-05 11:31:59 +00:00
|
|
|
|
# Bake identity vars
|
|
|
|
|
|
[ -n "${ASSISTANT_NAME:-}" ] && sed -i '' "s/^ASSISTANT_NAME=.*/ASSISTANT_NAME=\"${ASSISTANT_NAME}\"/" "${HDD_SHARE}/build.cfg"
|
|
|
|
|
|
[ -n "${AGENT_DOMAIN:-}" ] && sed -i '' "s/^AGENT_DOMAIN=.*/AGENT_DOMAIN=\"${AGENT_DOMAIN}\"/" "${HDD_SHARE}/build.cfg"
|
|
|
|
|
|
[ -n "${TZ:-}" ] && sed -i '' "s|^TZ=.*|TZ=\"${TZ}\"|" "${HDD_SHARE}/build.cfg"
|
|
|
|
|
|
[ -n "${AGENT_GENDER:-}" ] && sed -i '' "s/^AGENT_GENDER=.*/AGENT_GENDER=\"${AGENT_GENDER}\"/" "${HDD_SHARE}/build.cfg"
|
2026-04-06 12:11:45 +02:00
|
|
|
|
log_vps "[vps] Pre-baked config written to build.cfg (TARGET=vps)"
|
Align VPS firstboot with modular pipeline (Sam & Claude)
Rewrite vps/firstboot-vps.sh as phase-1 only: partition disk,
create ZFS pool "clawdie", install FreeBSD base, inject firstboot
payload, install bootloader, reboot. On first HDD boot the standard
firstboot.sh modular pipeline runs (zfs detect, wizard, gpu, pkg,
ssh, env, system, tailscale, deploy).
Pre-baked clawdie.conf values get written to build.cfg with
TARGET=cloud so the wizard is skipped. Pool named "clawdie"
(not zroot) for pool detection compatibility.
Remove duplicate clawdie-vps-setup.sh.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-05 11:31:59 +00:00
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
# Copy tarball
|
|
|
|
|
|
if [ -f "${SHARE}/clawdie-ai.tar.gz" ]; then
|
|
|
|
|
|
cp "${SHARE}/clawdie-ai.tar.gz" "${HDD_SHARE}/"
|
|
|
|
|
|
log_vps "[vps] Clawdie-AI tarball copied"
|
2026-04-05 09:04:45 +00:00
|
|
|
|
else
|
Align VPS firstboot with modular pipeline (Sam & Claude)
Rewrite vps/firstboot-vps.sh as phase-1 only: partition disk,
create ZFS pool "clawdie", install FreeBSD base, inject firstboot
payload, install bootloader, reboot. On first HDD boot the standard
firstboot.sh modular pipeline runs (zfs detect, wizard, gpu, pkg,
ssh, env, system, tailscale, deploy).
Pre-baked clawdie.conf values get written to build.cfg with
TARGET=cloud so the wizard is skipped. Pool named "clawdie"
(not zroot) for pool detection compatibility.
Remove duplicate clawdie-vps-setup.sh.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-05 11:31:59 +00:00
|
|
|
|
log_vps "[vps] WARNING: No clawdie-ai.tar.gz found — deploy step will fail"
|
2026-04-05 09:04:45 +00:00
|
|
|
|
fi
|
|
|
|
|
|
|
Align VPS firstboot with modular pipeline (Sam & Claude)
Rewrite vps/firstboot-vps.sh as phase-1 only: partition disk,
create ZFS pool "clawdie", install FreeBSD base, inject firstboot
payload, install bootloader, reboot. On first HDD boot the standard
firstboot.sh modular pipeline runs (zfs detect, wizard, gpu, pkg,
ssh, env, system, tailscale, deploy).
Pre-baked clawdie.conf values get written to build.cfg with
TARGET=cloud so the wizard is skipped. Pool named "clawdie"
(not zroot) for pool detection compatibility.
Remove duplicate clawdie-vps-setup.sh.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-05 11:31:59 +00:00
|
|
|
|
# Copy packages if bundled
|
|
|
|
|
|
if [ -d "${SHARE}/packages" ]; then
|
|
|
|
|
|
cp -r "${SHARE}/packages" "${HDD_SHARE}/"
|
|
|
|
|
|
log_vps "[vps] Package repo copied"
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
# Make scripts executable
|
|
|
|
|
|
chmod +x "${HDD_SHARE}/firstboot/firstboot.sh"
|
|
|
|
|
|
for sh in "${HDD_SHARE}/firstboot/shell-"*.sh; do
|
|
|
|
|
|
chmod +x "$sh"
|
|
|
|
|
|
done
|
|
|
|
|
|
chmod +x "${HDD_SHARE}/firstboot/zfs-pool-detect.sh" 2>/dev/null || true
|
|
|
|
|
|
chmod +x "${HDD_SHARE}/firstboot/zfs-pool-migrate.sh" 2>/dev/null || true
|
|
|
|
|
|
chmod +x "${HDD_SHARE}/firstboot/maintenance-mode.sh" 2>/dev/null || true
|
2026-04-05 09:04:45 +00:00
|
|
|
|
|
Align VPS firstboot with modular pipeline (Sam & Claude)
Rewrite vps/firstboot-vps.sh as phase-1 only: partition disk,
create ZFS pool "clawdie", install FreeBSD base, inject firstboot
payload, install bootloader, reboot. On first HDD boot the standard
firstboot.sh modular pipeline runs (zfs detect, wizard, gpu, pkg,
ssh, env, system, tailscale, deploy).
Pre-baked clawdie.conf values get written to build.cfg with
TARGET=cloud so the wizard is skipped. Pool named "clawdie"
(not zroot) for pool detection compatibility.
Remove duplicate clawdie-vps-setup.sh.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-05 11:31:59 +00:00
|
|
|
|
# Install rc.d service
|
|
|
|
|
|
mkdir -p "$HDD_RCD"
|
|
|
|
|
|
cp "${SHARE}/firstboot/rc.d/clawdie-firstboot" "${HDD_RCD}/clawdie-firstboot"
|
|
|
|
|
|
chmod +x "${HDD_RCD}/clawdie-firstboot"
|
|
|
|
|
|
|
|
|
|
|
|
# ── Step 5: Install bootloader + reboot ──────────────────────────────────
|
|
|
|
|
|
|
|
|
|
|
|
log_vps "[vps] [5/5] Installing EFI bootloader..."
|
2026-04-05 09:04:45 +00:00
|
|
|
|
|
2026-04-05 14:46:54 +00:00
|
|
|
|
[ -f /mnt/boot/loader.efi ] || die "loader.efi not found after base extraction"
|
|
|
|
|
|
|
2026-04-05 09:04:45 +00:00
|
|
|
|
mkdir -p /mnt/boot/efi
|
|
|
|
|
|
mount -t msdosfs /dev/gpt/boot /mnt/boot/efi
|
|
|
|
|
|
mkdir -p /mnt/boot/efi/EFI/BOOT
|
|
|
|
|
|
cp /mnt/boot/loader.efi /mnt/boot/efi/EFI/BOOT/BOOTX64.EFI
|
|
|
|
|
|
umount /mnt/boot/efi
|
|
|
|
|
|
|
Align VPS firstboot with modular pipeline (Sam & Claude)
Rewrite vps/firstboot-vps.sh as phase-1 only: partition disk,
create ZFS pool "clawdie", install FreeBSD base, inject firstboot
payload, install bootloader, reboot. On first HDD boot the standard
firstboot.sh modular pipeline runs (zfs detect, wizard, gpu, pkg,
ssh, env, system, tailscale, deploy).
Pre-baked clawdie.conf values get written to build.cfg with
TARGET=cloud so the wizard is skipped. Pool named "clawdie"
(not zroot) for pool detection compatibility.
Remove duplicate clawdie-vps-setup.sh.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-05 11:31:59 +00:00
|
|
|
|
zpool set bootfs=clawdie/ROOT/default clawdie
|
2026-04-05 09:04:45 +00:00
|
|
|
|
|
Align VPS firstboot with modular pipeline (Sam & Claude)
Rewrite vps/firstboot-vps.sh as phase-1 only: partition disk,
create ZFS pool "clawdie", install FreeBSD base, inject firstboot
payload, install bootloader, reboot. On first HDD boot the standard
firstboot.sh modular pipeline runs (zfs detect, wizard, gpu, pkg,
ssh, env, system, tailscale, deploy).
Pre-baked clawdie.conf values get written to build.cfg with
TARGET=cloud so the wizard is skipped. Pool named "clawdie"
(not zroot) for pool detection compatibility.
Remove duplicate clawdie-vps-setup.sh.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-05 11:31:59 +00:00
|
|
|
|
log_vps "[vps] Installation complete."
|
2026-04-05 09:04:45 +00:00
|
|
|
|
echo ""
|
|
|
|
|
|
echo "============================================"
|
Align VPS firstboot with modular pipeline (Sam & Claude)
Rewrite vps/firstboot-vps.sh as phase-1 only: partition disk,
create ZFS pool "clawdie", install FreeBSD base, inject firstboot
payload, install bootloader, reboot. On first HDD boot the standard
firstboot.sh modular pipeline runs (zfs detect, wizard, gpu, pkg,
ssh, env, system, tailscale, deploy).
Pre-baked clawdie.conf values get written to build.cfg with
TARGET=cloud so the wizard is skipped. Pool named "clawdie"
(not zroot) for pool detection compatibility.
Remove duplicate clawdie-vps-setup.sh.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-05 11:31:59 +00:00
|
|
|
|
echo " FreeBSD installed to ${DISK}"
|
|
|
|
|
|
echo " Pool: clawdie"
|
2026-04-05 09:04:45 +00:00
|
|
|
|
echo ""
|
Align VPS firstboot with modular pipeline (Sam & Claude)
Rewrite vps/firstboot-vps.sh as phase-1 only: partition disk,
create ZFS pool "clawdie", install FreeBSD base, inject firstboot
payload, install bootloader, reboot. On first HDD boot the standard
firstboot.sh modular pipeline runs (zfs detect, wizard, gpu, pkg,
ssh, env, system, tailscale, deploy).
Pre-baked clawdie.conf values get written to build.cfg with
TARGET=cloud so the wizard is skipped. Pool named "clawdie"
(not zroot) for pool detection compatibility.
Remove duplicate clawdie-vps-setup.sh.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-05 11:31:59 +00:00
|
|
|
|
echo " On first HDD boot, the Clawdie firstboot"
|
|
|
|
|
|
echo " wizard will run automatically."
|
2026-04-05 09:04:45 +00:00
|
|
|
|
echo ""
|
Align VPS firstboot with modular pipeline (Sam & Claude)
Rewrite vps/firstboot-vps.sh as phase-1 only: partition disk,
create ZFS pool "clawdie", install FreeBSD base, inject firstboot
payload, install bootloader, reboot. On first HDD boot the standard
firstboot.sh modular pipeline runs (zfs detect, wizard, gpu, pkg,
ssh, env, system, tailscale, deploy).
Pre-baked clawdie.conf values get written to build.cfg with
TARGET=cloud so the wizard is skipped. Pool named "clawdie"
(not zroot) for pool detection compatibility.
Remove duplicate clawdie-vps-setup.sh.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-05 11:31:59 +00:00
|
|
|
|
echo " Root password: ${_root_pw}"
|
|
|
|
|
|
echo " User password: ${_user_pw}"
|
2026-04-05 14:46:54 +00:00
|
|
|
|
echo ""
|
|
|
|
|
|
echo " SAVE THESE PASSWORDS NOW — they are not logged."
|
2026-04-05 09:04:45 +00:00
|
|
|
|
echo "============================================"
|
Align VPS firstboot with modular pipeline (Sam & Claude)
Rewrite vps/firstboot-vps.sh as phase-1 only: partition disk,
create ZFS pool "clawdie", install FreeBSD base, inject firstboot
payload, install bootloader, reboot. On first HDD boot the standard
firstboot.sh modular pipeline runs (zfs detect, wizard, gpu, pkg,
ssh, env, system, tailscale, deploy).
Pre-baked clawdie.conf values get written to build.cfg with
TARGET=cloud so the wizard is skipped. Pool named "clawdie"
(not zroot) for pool detection compatibility.
Remove duplicate clawdie-vps-setup.sh.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-05 11:31:59 +00:00
|
|
|
|
echo ""
|
2026-04-05 09:04:45 +00:00
|
|
|
|
|
Align VPS firstboot with modular pipeline (Sam & Claude)
Rewrite vps/firstboot-vps.sh as phase-1 only: partition disk,
create ZFS pool "clawdie", install FreeBSD base, inject firstboot
payload, install bootloader, reboot. On first HDD boot the standard
firstboot.sh modular pipeline runs (zfs detect, wizard, gpu, pkg,
ssh, env, system, tailscale, deploy).
Pre-baked clawdie.conf values get written to build.cfg with
TARGET=cloud so the wizard is skipped. Pool named "clawdie"
(not zroot) for pool detection compatibility.
Remove duplicate clawdie-vps-setup.sh.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-05 11:31:59 +00:00
|
|
|
|
# Export and reboot
|
|
|
|
|
|
log_vps "[vps] Exporting pool and rebooting in 10 seconds..."
|
2026-04-05 09:04:45 +00:00
|
|
|
|
sleep 10
|
|
|
|
|
|
umount /mnt/boot/efi 2>/dev/null || true
|
Align VPS firstboot with modular pipeline (Sam & Claude)
Rewrite vps/firstboot-vps.sh as phase-1 only: partition disk,
create ZFS pool "clawdie", install FreeBSD base, inject firstboot
payload, install bootloader, reboot. On first HDD boot the standard
firstboot.sh modular pipeline runs (zfs detect, wizard, gpu, pkg,
ssh, env, system, tailscale, deploy).
Pre-baked clawdie.conf values get written to build.cfg with
TARGET=cloud so the wizard is skipped. Pool named "clawdie"
(not zroot) for pool detection compatibility.
Remove duplicate clawdie-vps-setup.sh.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-05 11:31:59 +00:00
|
|
|
|
zpool export clawdie
|
2026-04-05 09:04:45 +00:00
|
|
|
|
reboot
|