clawdie-iso/installerconfig
Sam & Claude 969f1d4007 build: Upgrade ISO builder for Clawdie Shell v0.9.0
Changes:
- Increase image size from 8G → 25G (accommodate bundled packages)
- Refactor image prep: create fresh 25GB UFS image with proper MBR/BSD partitioning
  (replaces simple memstick copy; enables larger filesystem + offline package cache)
- Remove KDE/MATE desktop options (focus to XFCE only)
- Fix FreeBSD download URL path (15.0 ISO-IMAGES)
- Add bsdinstall post-install hook variables (nonInteractive, PARTITIONS, DISTRIBUTIONS)
- Implement idempotent mdconfig reattachment for interrupted builds

Build workflow:
  ./build.sh --fetch-only    # Fetch packages (no root needed)
  ./build.sh --skip-fetch    # Assemble ISO (requires root for mdconfig/gpart/newfs)

Tested on FreeBSD 15.0-RELEASE-p4.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-06-04 20:04:21 +02:00

43 lines
1.4 KiB
Text

PARTITIONS=DEFAULT
DISTRIBUTIONS="kernel.txz base.txz"
export nonInteractive="YES"
#!/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.
#
# 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
USB_SHARE="/usr/local/share/clawdie-iso"
HDD_SHARE="/mnt/usr/local/share/clawdie-iso"
HDD_RCD="/mnt/usr/local/etc/rc.d"
echo "clawdie-iso: injecting firstboot payload..."
# 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}/"
chmod +x "${HDD_SHARE}/firstboot/firstboot.sh"
chmod +x "${HDD_SHARE}/firstboot/gpu-detect.sh"
# 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"
# Enable service in rc.conf on HDD
echo 'clawdie_firstboot_enable="YES"' >> /mnt/etc/rc.conf
echo "clawdie-iso: firstboot payload installed. Rebooting to HDD..."