2026-03-24 00:51:22 +00:00
|
|
|
PARTITIONS=DEFAULT
|
|
|
|
|
DISTRIBUTIONS="kernel.txz base.txz"
|
|
|
|
|
export nonInteractive="YES"
|
|
|
|
|
|
feat: initial clawdie-iso skeleton
USB installer for Clawdie-AI. Combines FreeBSD base install,
desktop-installer GPU/DE setup, and Clawdie-AI deployment into
a single rc.firstboot wizard flow.
Skeleton includes:
- build.cfg: FreeBSD 15.0-RELEASE-p4, amd64, XFCE default
- build.sh: 7-step build outline (fetch → inject → repack), stubs
- installerconfig: bsdinstall post-install hook, copies firstboot/ to HDD
- firstboot/rc.d/clawdie-firstboot: runs once on first HDD boot
- firstboot/firstboot.sh: tiered bsddialog wizard (identity, desktop,
pi profile, auto-generated secrets, AGENTS.md seeding, npm prefix setup)
- firstboot/gpu-detect.sh: pciconf PCI ID → kld/xorg driver mapping
- CLAWDIE-ISO.md: full design doc (copied from clawdie-ai)
VirtualBox excluded. pkg latest default. LLM keys deferred to pi first-run.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 10:20:23 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
# installerconfig — bsdinstall post-install hook
|
|
|
|
|
#
|
|
|
|
|
# bsdinstall sources this file automatically after base system installation
|
|
|
|
|
# completes. Runs in the context of the live USB environment, with the
|
|
|
|
|
# target HDD mounted at /mnt.
|
|
|
|
|
#
|
2026-04-05 09:04:45 +00:00
|
|
|
# PREAMBLE (for bsdinstall scripting):
|
|
|
|
|
# Set ZFS pool name to "clawdie" (project-specific, enables auto-detection)
|
|
|
|
|
export ZFSBOOT_POOL_NAME="clawdie"
|
|
|
|
|
#
|
|
|
|
|
# SETUP SCRIPT:
|
|
|
|
|
#
|
feat: initial clawdie-iso skeleton
USB installer for Clawdie-AI. Combines FreeBSD base install,
desktop-installer GPU/DE setup, and Clawdie-AI deployment into
a single rc.firstboot wizard flow.
Skeleton includes:
- build.cfg: FreeBSD 15.0-RELEASE-p4, amd64, XFCE default
- build.sh: 7-step build outline (fetch → inject → repack), stubs
- installerconfig: bsdinstall post-install hook, copies firstboot/ to HDD
- firstboot/rc.d/clawdie-firstboot: runs once on first HDD boot
- firstboot/firstboot.sh: tiered bsddialog wizard (identity, desktop,
pi profile, auto-generated secrets, AGENTS.md seeding, npm prefix setup)
- firstboot/gpu-detect.sh: pciconf PCI ID → kld/xorg driver mapping
- CLAWDIE-ISO.md: full design doc (copied from clawdie-ai)
VirtualBox excluded. pkg latest default. LLM keys deferred to pi first-run.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 10:20:23 +00:00
|
|
|
# Responsibilities:
|
|
|
|
|
# 1. Copy firstboot payload from USB to installed HDD
|
|
|
|
|
# 2. Enable the clawdie-firstboot rc.d service (runs once on first HDD boot)
|
|
|
|
|
# 3. That's it — all real work happens in firstboot.sh on first boot
|
|
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
2026-05-10 21:55:47 +02:00
|
|
|
set_config_line() {
|
|
|
|
|
_file="$1"
|
|
|
|
|
_assignment="$2"
|
|
|
|
|
_name=$(echo "$_assignment" | cut -d= -f1)
|
|
|
|
|
mkdir -p "$(dirname "$_file")"
|
|
|
|
|
touch "$_file"
|
|
|
|
|
if grep -q "^${_name}=" "$_file" 2>/dev/null; then
|
|
|
|
|
sed -i '' "s|^${_name}=.*|${_assignment}|" "$_file"
|
|
|
|
|
else
|
|
|
|
|
echo "$_assignment" >> "$_file"
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
feat: initial clawdie-iso skeleton
USB installer for Clawdie-AI. Combines FreeBSD base install,
desktop-installer GPU/DE setup, and Clawdie-AI deployment into
a single rc.firstboot wizard flow.
Skeleton includes:
- build.cfg: FreeBSD 15.0-RELEASE-p4, amd64, XFCE default
- build.sh: 7-step build outline (fetch → inject → repack), stubs
- installerconfig: bsdinstall post-install hook, copies firstboot/ to HDD
- firstboot/rc.d/clawdie-firstboot: runs once on first HDD boot
- firstboot/firstboot.sh: tiered bsddialog wizard (identity, desktop,
pi profile, auto-generated secrets, AGENTS.md seeding, npm prefix setup)
- firstboot/gpu-detect.sh: pciconf PCI ID → kld/xorg driver mapping
- CLAWDIE-ISO.md: full design doc (copied from clawdie-ai)
VirtualBox excluded. pkg latest default. LLM keys deferred to pi first-run.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 10:20:23 +00:00
|
|
|
USB_SHARE="/usr/local/share/clawdie-iso"
|
|
|
|
|
HDD_SHARE="/mnt/usr/local/share/clawdie-iso"
|
|
|
|
|
HDD_RCD="/mnt/usr/local/etc/rc.d"
|
2026-05-12 14:34:42 +02:00
|
|
|
LIVE_INSTALLER_RUNTIME_DIR="${LIVE_INSTALLER_RUNTIME_DIR:-/var/run/clawdie-installer}"
|
|
|
|
|
LIVE_INSTALLER_PERSIST_DIR="/mnt/var/db/clawdie-installer"
|
|
|
|
|
LIVE_INSTALLER_PERSIST_HANDOFF="${LIVE_INSTALLER_PERSIST_DIR}/clawdie-handoff.sealed"
|
|
|
|
|
LIVE_INSTALLER_PROGRESS_FILE="${LIVE_INSTALLER_PROGRESS_FILE:-/var/log/clawdie-firstboot.progress}"
|
|
|
|
|
|
|
|
|
|
set_progress() {
|
|
|
|
|
[ -n "${LIVE_INSTALLER_PROGRESS_FILE:-}" ] || return 0
|
|
|
|
|
echo "PROGRESS=$1" >> "$LIVE_INSTALLER_PROGRESS_FILE"
|
|
|
|
|
}
|
feat: initial clawdie-iso skeleton
USB installer for Clawdie-AI. Combines FreeBSD base install,
desktop-installer GPU/DE setup, and Clawdie-AI deployment into
a single rc.firstboot wizard flow.
Skeleton includes:
- build.cfg: FreeBSD 15.0-RELEASE-p4, amd64, XFCE default
- build.sh: 7-step build outline (fetch → inject → repack), stubs
- installerconfig: bsdinstall post-install hook, copies firstboot/ to HDD
- firstboot/rc.d/clawdie-firstboot: runs once on first HDD boot
- firstboot/firstboot.sh: tiered bsddialog wizard (identity, desktop,
pi profile, auto-generated secrets, AGENTS.md seeding, npm prefix setup)
- firstboot/gpu-detect.sh: pciconf PCI ID → kld/xorg driver mapping
- CLAWDIE-ISO.md: full design doc (copied from clawdie-ai)
VirtualBox excluded. pkg latest default. LLM keys deferred to pi first-run.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 10:20:23 +00:00
|
|
|
|
|
|
|
|
echo "clawdie-iso: injecting firstboot payload..."
|
2026-05-12 14:34:42 +02:00
|
|
|
set_progress 4
|
feat: initial clawdie-iso skeleton
USB installer for Clawdie-AI. Combines FreeBSD base install,
desktop-installer GPU/DE setup, and Clawdie-AI deployment into
a single rc.firstboot wizard flow.
Skeleton includes:
- build.cfg: FreeBSD 15.0-RELEASE-p4, amd64, XFCE default
- build.sh: 7-step build outline (fetch → inject → repack), stubs
- installerconfig: bsdinstall post-install hook, copies firstboot/ to HDD
- firstboot/rc.d/clawdie-firstboot: runs once on first HDD boot
- firstboot/firstboot.sh: tiered bsddialog wizard (identity, desktop,
pi profile, auto-generated secrets, AGENTS.md seeding, npm prefix setup)
- firstboot/gpu-detect.sh: pciconf PCI ID → kld/xorg driver mapping
- CLAWDIE-ISO.md: full design doc (copied from clawdie-ai)
VirtualBox excluded. pkg latest default. LLM keys deferred to pi first-run.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 10:20:23 +00:00
|
|
|
|
|
|
|
|
# Copy firstboot scripts
|
|
|
|
|
mkdir -p "$HDD_SHARE"
|
|
|
|
|
cp -r "${USB_SHARE}/firstboot" "${HDD_SHARE}/"
|
|
|
|
|
cp -r "${USB_SHARE}/packages" "${HDD_SHARE}/"
|
|
|
|
|
cp "${USB_SHARE}/clawdie-ai.tar.gz" "${HDD_SHARE}/"
|
|
|
|
|
cp "${USB_SHARE}/build.cfg" "${HDD_SHARE}/"
|
2026-05-12 17:10:54 +02:00
|
|
|
[ -f "${USB_SHARE}/build-manifest.json" ] && cp "${USB_SHARE}/build-manifest.json" "${HDD_SHARE}/"
|
feat: initial clawdie-iso skeleton
USB installer for Clawdie-AI. Combines FreeBSD base install,
desktop-installer GPU/DE setup, and Clawdie-AI deployment into
a single rc.firstboot wizard flow.
Skeleton includes:
- build.cfg: FreeBSD 15.0-RELEASE-p4, amd64, XFCE default
- build.sh: 7-step build outline (fetch → inject → repack), stubs
- installerconfig: bsdinstall post-install hook, copies firstboot/ to HDD
- firstboot/rc.d/clawdie-firstboot: runs once on first HDD boot
- firstboot/firstboot.sh: tiered bsddialog wizard (identity, desktop,
pi profile, auto-generated secrets, AGENTS.md seeding, npm prefix setup)
- firstboot/gpu-detect.sh: pciconf PCI ID → kld/xorg driver mapping
- CLAWDIE-ISO.md: full design doc (copied from clawdie-ai)
VirtualBox excluded. pkg latest default. LLM keys deferred to pi first-run.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 10:20:23 +00:00
|
|
|
|
2026-03-24 01:50:50 +00:00
|
|
|
# Make all firstboot shell modules executable
|
feat: initial clawdie-iso skeleton
USB installer for Clawdie-AI. Combines FreeBSD base install,
desktop-installer GPU/DE setup, and Clawdie-AI deployment into
a single rc.firstboot wizard flow.
Skeleton includes:
- build.cfg: FreeBSD 15.0-RELEASE-p4, amd64, XFCE default
- build.sh: 7-step build outline (fetch → inject → repack), stubs
- installerconfig: bsdinstall post-install hook, copies firstboot/ to HDD
- firstboot/rc.d/clawdie-firstboot: runs once on first HDD boot
- firstboot/firstboot.sh: tiered bsddialog wizard (identity, desktop,
pi profile, auto-generated secrets, AGENTS.md seeding, npm prefix setup)
- firstboot/gpu-detect.sh: pciconf PCI ID → kld/xorg driver mapping
- CLAWDIE-ISO.md: full design doc (copied from clawdie-ai)
VirtualBox excluded. pkg latest default. LLM keys deferred to pi first-run.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 10:20:23 +00:00
|
|
|
chmod +x "${HDD_SHARE}/firstboot/firstboot.sh"
|
2026-03-24 07:20:17 +00:00
|
|
|
for sh in "${HDD_SHARE}/firstboot/shell-"*.sh; do
|
2026-03-24 01:50:50 +00:00
|
|
|
chmod +x "$sh"
|
|
|
|
|
done
|
2026-04-05 09:04:45 +00:00
|
|
|
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
|
feat: initial clawdie-iso skeleton
USB installer for Clawdie-AI. Combines FreeBSD base install,
desktop-installer GPU/DE setup, and Clawdie-AI deployment into
a single rc.firstboot wizard flow.
Skeleton includes:
- build.cfg: FreeBSD 15.0-RELEASE-p4, amd64, XFCE default
- build.sh: 7-step build outline (fetch → inject → repack), stubs
- installerconfig: bsdinstall post-install hook, copies firstboot/ to HDD
- firstboot/rc.d/clawdie-firstboot: runs once on first HDD boot
- firstboot/firstboot.sh: tiered bsddialog wizard (identity, desktop,
pi profile, auto-generated secrets, AGENTS.md seeding, npm prefix setup)
- firstboot/gpu-detect.sh: pciconf PCI ID → kld/xorg driver mapping
- CLAWDIE-ISO.md: full design doc (copied from clawdie-ai)
VirtualBox excluded. pkg latest default. LLM keys deferred to pi first-run.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 10:20:23 +00:00
|
|
|
|
|
|
|
|
# Install firstboot rc.d service
|
|
|
|
|
mkdir -p "$HDD_RCD"
|
|
|
|
|
cp "${USB_SHARE}/firstboot/rc.d/clawdie-firstboot" "${HDD_RCD}/clawdie-firstboot"
|
|
|
|
|
chmod +x "${HDD_RCD}/clawdie-firstboot"
|
2026-05-12 14:34:42 +02:00
|
|
|
set_progress 5
|
|
|
|
|
|
|
|
|
|
if [ -f "${LIVE_INSTALLER_RUNTIME_DIR}/clawdie-handoff.sealed" ]; then
|
|
|
|
|
mkdir -p "$LIVE_INSTALLER_PERSIST_DIR"
|
|
|
|
|
cp "${LIVE_INSTALLER_RUNTIME_DIR}/clawdie-handoff.sealed" "$LIVE_INSTALLER_PERSIST_HANDOFF"
|
|
|
|
|
chmod 0600 "$LIVE_INSTALLER_PERSIST_HANDOFF"
|
|
|
|
|
set_progress 6
|
|
|
|
|
fi
|
feat: initial clawdie-iso skeleton
USB installer for Clawdie-AI. Combines FreeBSD base install,
desktop-installer GPU/DE setup, and Clawdie-AI deployment into
a single rc.firstboot wizard flow.
Skeleton includes:
- build.cfg: FreeBSD 15.0-RELEASE-p4, amd64, XFCE default
- build.sh: 7-step build outline (fetch → inject → repack), stubs
- installerconfig: bsdinstall post-install hook, copies firstboot/ to HDD
- firstboot/rc.d/clawdie-firstboot: runs once on first HDD boot
- firstboot/firstboot.sh: tiered bsddialog wizard (identity, desktop,
pi profile, auto-generated secrets, AGENTS.md seeding, npm prefix setup)
- firstboot/gpu-detect.sh: pciconf PCI ID → kld/xorg driver mapping
- CLAWDIE-ISO.md: full design doc (copied from clawdie-ai)
VirtualBox excluded. pkg latest default. LLM keys deferred to pi first-run.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 10:20:23 +00:00
|
|
|
|
2026-05-10 21:55:47 +02:00
|
|
|
# Enable mac_do framework at first HDD boot with no credential grants yet.
|
|
|
|
|
set_config_line /mnt/boot/loader.conf 'mac_do_load="YES"'
|
|
|
|
|
set_config_line /mnt/etc/sysctl.conf 'security.mac.do.rules='
|
|
|
|
|
|
feat: initial clawdie-iso skeleton
USB installer for Clawdie-AI. Combines FreeBSD base install,
desktop-installer GPU/DE setup, and Clawdie-AI deployment into
a single rc.firstboot wizard flow.
Skeleton includes:
- build.cfg: FreeBSD 15.0-RELEASE-p4, amd64, XFCE default
- build.sh: 7-step build outline (fetch → inject → repack), stubs
- installerconfig: bsdinstall post-install hook, copies firstboot/ to HDD
- firstboot/rc.d/clawdie-firstboot: runs once on first HDD boot
- firstboot/firstboot.sh: tiered bsddialog wizard (identity, desktop,
pi profile, auto-generated secrets, AGENTS.md seeding, npm prefix setup)
- firstboot/gpu-detect.sh: pciconf PCI ID → kld/xorg driver mapping
- CLAWDIE-ISO.md: full design doc (copied from clawdie-ai)
VirtualBox excluded. pkg latest default. LLM keys deferred to pi first-run.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 10:20:23 +00:00
|
|
|
# Enable service in rc.conf on HDD
|
|
|
|
|
echo 'clawdie_firstboot_enable="YES"' >> /mnt/etc/rc.conf
|
2026-05-12 14:34:42 +02:00
|
|
|
set_progress 7
|
feat: initial clawdie-iso skeleton
USB installer for Clawdie-AI. Combines FreeBSD base install,
desktop-installer GPU/DE setup, and Clawdie-AI deployment into
a single rc.firstboot wizard flow.
Skeleton includes:
- build.cfg: FreeBSD 15.0-RELEASE-p4, amd64, XFCE default
- build.sh: 7-step build outline (fetch → inject → repack), stubs
- installerconfig: bsdinstall post-install hook, copies firstboot/ to HDD
- firstboot/rc.d/clawdie-firstboot: runs once on first HDD boot
- firstboot/firstboot.sh: tiered bsddialog wizard (identity, desktop,
pi profile, auto-generated secrets, AGENTS.md seeding, npm prefix setup)
- firstboot/gpu-detect.sh: pciconf PCI ID → kld/xorg driver mapping
- CLAWDIE-ISO.md: full design doc (copied from clawdie-ai)
VirtualBox excluded. pkg latest default. LLM keys deferred to pi first-run.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 10:20:23 +00:00
|
|
|
|
|
|
|
|
echo "clawdie-iso: firstboot payload installed. Rebooting to HDD..."
|