aboutsummaryrefslogtreecommitdiff
path: root/scripts
Commit message (Collapse)AuthorAgeFilesLines
* feat: add LUKS passphrase automation to VM test frameworkCraig Jennings2026-02-231-1/+117
| | | | | | | | | | - Add monitor_sendkeys() to type strings into QEMU via monitor socket - Add send_luks_passphrase() that detects GRUB passphrase prompt in serial log and sends passphrase via sendkey, supporting multi-disk LUKS (one passphrase per encrypted disk) - Add QEMU monitor socket to start_vm_from_disk() for LUKS configs - Auto-detect LUKS configs and handle passphrase entry during reboot test - Add socat dependency check
* fix: resolve remaining SC2155 warnings across all scriptsCraig Jennings2026-02-232-15/+30
| | | | | | Declare and assign local variables separately in custom/archangel, scripts/full-test.sh, scripts/test-install.sh, and remove unused variable in custom/lib/zfs.sh.
* chore: make OVMF firmware paths configurable via environmentCraig Jennings2026-02-234-12/+12
| | | | | | Allow OVMF_CODE and OVMF_VARS_ORIG to be overridden via environment variables for portability across distros (Fedora, Ubuntu, etc. use different paths for UEFI firmware).
* chore: add set -euo pipefail to scripts for safetyCraig Jennings2026-02-234-6/+6
| | | | | | Enable undefined variable checking (set -u) and pipefail across standalone scripts. Guard SUDO_USER references with ${SUDO_USER:-} for set -u compatibility.
* scrub personal info and make distribution targets configurableCraig Jennings2026-02-232-30/+36
| | | | | | | Remove personal email addresses, hardcoded paths, and infrastructure references to prepare for open-source release. Distribution targets in build-release are now configurable via environment variables, and archsetup inclusion is opt-in.
* chore: standardize shebangs, fix lint target, add .editorconfigCraig Jennings2026-02-236-6/+6
| | | | | | | - Change all script shebangs to #!/usr/bin/env bash for portability (heredocs writing to installed systems keep #!/bin/bash) - Remove || true from Makefile lint target so shellcheck errors fail the build - Add .editorconfig for consistent formatting across editors
* fix: support no-ssh test by adding console boot verificationCraig Jennings2026-02-231-30/+73
| | | | | | | | The no-ssh test failed because reboot verification unconditionally used wait_for_ssh, which timed out on systems without SSH. Add wait_for_boot_console() that checks serial log for ZFSBootMenu boot markers, and branch run_test() on ENABLE_SSH to use the appropriate verification path.
* clean personal info and private files from repositoryCraig Jennings2026-02-221-1/+1
| | | | | | | | | | - Remove personal hardware specs, machine-specific troubleshooting docs, and video transcript from assets/ - Remove stale PLAN-zfsbootmenu-implementation.org (feature complete) - Remove .stignore (Syncthing config, not project-relevant) - Untrack todo.org (personal task tracker with private infra details) - Make archsetup path configurable via ARCHSETUP_DIR env var in build.sh - Use $REAL_USER instead of hardcoded username in build-release scp
* fix: archzfs key prompt hang, test false positive, add local distributionCraig Jennings2026-02-122-7/+35
| | | | | | | | | - Change archzfs SigLevel to Never (pacstrap -K empty keyring caused interactive GPG prompt blocking unattended installs) - Fix pgrep matching avahi-daemon's [archangel.local] in full-test.sh - Bump install timeout to 30min for DKMS builds - Add ~/downloads/isos and archsetup inbox to build-release distribution - Sync templates
* refactor: rename archzfs to archangel, simplify build-releaseCraig Jennings2026-01-316-239/+77
| | | | | | | | - Standardize naming: VM names, hostname, passwords, ISO naming - Remove USB, Ventoy, and local deployment from build-release - Add snapper package and Btrfs validation tests to sanity-test - Update README for dual ZFS/Btrfs architecture - Delete obsolete SESSION-CONTEXT.md and download-archzfs-iso.sh
* fix: remove obsolete test for deleted zfs-snap-pruneCraig Jennings2026-01-261-303/+0
| | | | | | - Remove test-zfs-snap-prune.sh (tested deleted script) - Update Makefile to reference existing custom/ scripts - Remove test-unit target (no unit tests remain)
* Add LUKS testing infrastructure and documentationCraig Jennings2026-01-252-0/+6
| | | | | | | | | | | | - Add setup_luks_testing_keyfile() for automated LUKS testing - Modify configure_crypttab() and configure_luks_initramfs() for keyfile support - Fix configure_btrfs_initramfs() to preserve encrypt hook when LUKS enabled - Add TESTING=yes to LUKS test configs - Create docs/TESTING-STRATEGY.org documenting testing approach LUKS automated reboot testing remains a work-in-progress due to complexity of sending passphrase to initramfs encrypt hook. Non-LUKS tests all pass: btrfs-single, btrfs-mirror, btrfs-stripe.
* Update test config and documentationCraig Jennings2026-01-251-0/+1
| | | | | | - Add NO_ENCRYPT=yes to btrfs-single.conf for unattended testing - Add offline Arch Wiki documentation section to RESCUE-GUIDE.txt - Update todo.org with completed tasks and new items
* Add reboot survival and rollback verification testsCraig Jennings2026-01-251-6/+223
| | | | | | | | | - Add start_vm_from_disk() to boot installed system without ISO - Add stop_vm keep_vars parameter to preserve EFI boot entries - Add verify_reboot_survival() to check system boots from disk - Add verify_rollback() to test snapshot/rollback functionality - Support different SSH passwords for live ISO vs installed system - Integrate reboot/rollback checks into test flow
* Fix LUKS encryption for btrfs (single and multi-disk)Craig Jennings2026-01-241-0/+15
| | | | | | | - Use -d - flag for cryptsetup stdin key input (matches easy-arch) - Change ((i++)) to ((++i)) to avoid set -e exit on 0 increment - Add btrfs-mirror-luks test config - Update status protocol with sound notifications
* Phase 3: Add multi-disk btrfs support (RAID0/RAID1)Craig Jennings2026-01-242-0/+30
| | | | | | | | - RAID1 (mirror) and RAID0 (stripe) for 2+ disks - Multi-disk LUKS with single passphrase prompt - EFI redundancy: GRUB installed on all disks - Pacman hook syncs GRUB updates across EFI partitions - btrfs initramfs hook for multi-device assembly at boot
* Phase 2.8: Add LUKS encryption for btrfsCraig Jennings2026-01-241-0/+15
| | | | | | | | | | | | | - Add LUKS functions to btrfs.sh (create/open/close container) - Add crypttab configuration for boot - Add encrypt hook to mkinitcpio HOOKS - Add cryptdevice parameter to GRUB cmdline - Add get_btrfs_encryption_choice and get_luks_passphrase prompts - Add LUKS_PASSPHRASE to config variables - Update show_summary and print_btrfs_summary for encryption status - Add btrfs-luks.conf test config VM test pending.
* Fix btrfs bugs from VM testingCraig Jennings2026-01-232-24/+55
| | | | | | | | | | | - Fix GRUB config path (remove GRUB_BTRFS_GRUB_DIRNAME, use default) - Create snapper config manually (D-Bus not available in chroot) - Create genesis snapshot with btrfs command (not snapper) - Add btrfs-single.conf test config - Update test-install.sh to copy lib/ directory - Update test-install.sh to handle btrfs verification VM test now passes for btrfs single-disk installation.
* Use zfs-import-scan instead of zfs-import-cache for bootCraig Jennings2026-01-211-16/+5
| | | | | | | | | | | | | | | Switch to the recommended pool import method that uses blkid to scan for pools instead of relying on zpool.cache. This eliminates the complexity of managing cachefile paths with altroot during installation. Changes: - Remove cachefile setup from create_zfs_pool() and configure_zfs_services() - Enable zfs-import-scan.service instead of zfs-import-cache.service - Set cachefile=none on the pool since it's not needed - Update full-test.sh to verify zfs-import-scan is enabled This approach is recommended per the Arch Wiki and doesn't require the cachefile to be present in the initramfs.
* Add initramfs and reboot verification testsCraig Jennings2026-01-201-0/+52
| | | | | | | - Check zpool.cache is present in initramfs (catches cachefile bugs) - Add reboot test: issue reboot, wait for system to come back - Verify ZFS pool healthy after reboot - Ensures the installed system can survive a reboot cycle
* Fix ZFS boot failure: set cachefile property after pool creationCraig Jennings2026-01-201-0/+9
| | | | | | | - Add zpool set cachefile=/etc/zfs/zpool.cache after pool creation - Without this, initramfs ZFS hook can't import pool at boot - Causes "cannot import '(null)': no such pool available" error - Add cachefile property test to full-test.sh
* Fix downloads path (lowercase)Craig Jennings2026-01-201-2/+2
|
* Fix mDNS, hostname, and build safetyCraig Jennings2026-01-201-1/+19
| | | | | | | | - Add safe_cleanup_work_dir() to prevent /dev corruption on interrupted builds - Fix shadow file: use sed to modify root entry instead of replacing file - Add /etc/hosts and /etc/nsswitch.conf for proper hostname/mDNS resolution - Add inetutils package for hostname command - Add sanity tests for password, avahi, mdns, and hostname
* Fix full-test.sh exiting after first passed testCraig Jennings2026-01-201-1/+1
| | | | | | | | Bug: ((TESTS_PASSED++)) returns exit code 1 when TESTS_PASSED is 0, because post-increment evaluates the old value (0) which is falsy. With set -e, this caused the script to exit after the first test passed. Fix: Use pre-increment ((++TESTS_PASSED)) which returns the new value.
* Add Avahi mDNS validation to test scriptsCraig Jennings2026-01-202-2/+25
| | | | | | | | | | sanity-test.sh (live ISO): - Check avahi-daemon is enabled - Check avahi-daemon is running test-install.sh (installed system): - Check avahi and nss-mdns packages installed - Check avahi-daemon service enabled
* Add comprehensive installation tests and ZFS script deploymentCraig Jennings2026-01-192-5/+545
| | | | | | | - Add scripts/full-test.sh for automated install testing (single, mirror, raidz1) - Add --full-test option to build-release workflow - Install zfssnapshot and zfsrollback to target system during install - Simplify .gitignore to exclude entire vm/ directory
* Add --yes flag for fully automated distributionCraig Jennings2026-01-191-7/+14
| | | | | | | | New --yes/-y flag skips the dd confirmation prompt, allowing build-release to run completely unattended for CI/CD workflows. The ARCHZFS label on the drive is sufficient safety - if it has that label, it was created by this process and is the intended target.
* Update build-release for TrueNAS and Framework drivesCraig Jennings2026-01-191-10/+6
| | | | | | | - Use cjennings@truenas.local instead of root (has SSH keys) - Remove removable check for ARCHZFS drives (Framework expansion cards show as internal but are hot-swappable) - Still requires 'yes' confirmation before dd for safety
* Fix build-release for running with sudoCraig Jennings2026-01-191-6/+31
| | | | | | | - Use SUDO_USER to get real user's home directory - Run SSH/SCP as real user to use their SSH keys - Handle TrueNAS SSH failure gracefully (warn and continue) - Track actual TrueNAS success status for summary
* Add automated sanity test for ISO verificationCraig Jennings2026-01-192-20/+336
| | | | | | | | | | | | | | | | | New scripts/sanity-test.sh: - Boots ISO in headless QEMU - Waits for SSH availability - Runs 13 automated verification tests: - ZFS module loaded and working - Custom scripts present (zfsrollback, zfssnapshot, etc.) - fzf installed - LTS kernel running - archsetup directory present - Reports pass/fail with summary - Fully automated - no human input required Updated build-release to use automated sanity test instead of manual verification prompt.
* Add build-release script for ISO build and distributionCraig Jennings2026-01-191-0/+346
| | | | | | | | | | | | | | | Automates the full release workflow: 1. Build ISO (via build.sh) 2. Sanity test (boot in QEMU, manual verification) 3. Distribute to multiple targets: - ~/Downloads/isos (always) - truenas.local:/mnt/vault/isos (if reachable) - ARCHZFS labeled USB drive (detected via blkid, writes via dd) - Ventoy USB drive (detected by label or ventoy/ directory) Options: --skip-build Distribute existing ISO without rebuilding --skip-test Skip the QEMU sanity test
* Include timestamp in install-archzfs log filenameCraig Jennings2026-01-181-2/+2
|
* Make ZFS encryption optional with interactive promptCraig Jennings2026-01-181-2/+2
| | | | | | | | | Add get_encryption_choice() to ask user whether to enable encryption during interactive install. Remove --no-encrypt CLI flag in favor of config file NO_ENCRYPT option for unattended installs. Update tests to rely on config file setting instead of flag. Also: fix ISO label to ARCHZFS for stable GRUB entries, add TODO items.
* Add CI/CD test infrastructureCraig Jennings2026-01-186-0/+526
| | | | | | | | | | - Add Makefile with targets: all, test, test-unit, test-install, build, release, clean, lint - Add test-install.sh for automated VM installation testing - Add test configs: single-disk, mirror, raidz1, no-ssh, custom-locale - Add test-logs/ to .gitignore - Uses sshpass for SSH authentication to live ISO - Copies latest install-archzfs to VM before testing (allows testing without rebuild) - Supports --list to show available configs
* Add boot-vm.sh convenience scriptCraig Jennings2026-01-181-0/+17
| | | | | Simple wrapper that boots from disk if installed, otherwise from ISO. Saves having to remember --boot-disk flag.
* Add snapshot retention with automatic pruningCraig Jennings2026-01-181-0/+303
| | | | | | | | | | | | | | | | | Implements hybrid retention policy: - Always keep 20 most recent snapshots - Delete snapshots beyond #20 only if older than 180 days - Genesis snapshot is always protected Features: - zfs-snap-prune script with --dry-run, --test, --verbose modes - Comprehensive test suite (22 tests) - Runs automatically after pacman operations - Daily systemd timer for cleanup - Regenerates GRUB menu after pruning This prevents unbounded snapshot growth while preserving recent history and the genesis snapshot.
* Fix ZFS boot failure and update ISO naming formatCraig Jennings2026-01-181-0/+13
| | | | | | | | | | | | | | | | Bug fixes: - Fix depmod using wrong kernel version during initramfs generation The script now explicitly specifies the installed kernel version instead of relying on uname -r (which returns the live ISO kernel) - Add kernel module verification before mkinitcpio - Add hostid 0x prefix to spl.spl_hostid kernel parameter ISO naming: - Changed format to: archzfs-vmlinuz-{version}-lts-{date}-{arch}.iso - Example: archzfs-vmlinuz-6.12.65-lts-2026-01-18-x86_64.iso test-vm.sh: - Add QEMU monitor socket for automation support
* Add multi-disk RAID, SSH config, stripe option, remove colorsCraig Jennings2026-01-171-14/+88
| | | | | | | | | | | - Multi-disk RAID support: mirror, stripe, raidz1/2/3 - EFI partitions on all disks for boot redundancy - SSH configuration prompt (default yes) with sshd enabled - Stripe option for max capacity without redundancy - Genesis snapshot with rollback-to-genesis script - NetworkManager added to ISO for WiFi config - Remove color codes for better terminal compatibility - archsetup launcher via curl
* Initial commit: archzfs ISO build systemCraig Jennings2026-01-171-0/+208
Build scripts for creating custom Arch Linux ISO with ZFS support. Includes installer scripts and VM testing setup.