Skip to content

System installer: multi-distro vds_hcd setup#11

Merged
LordVicky merged 16 commits into
devfrom
feature/system-installer
Jul 11, 2026
Merged

System installer: multi-distro vds_hcd setup#11
LordVicky merged 16 commits into
devfrom
feature/system-installer

Conversation

@LordVicky

Copy link
Copy Markdown
Owner

Implements docs/superpowers/specs/2026-07-11-system-installer-design.md.

What

  • installer/opends5-install: interactive installer that detects distro/kernel flavor/immutability/Secure Boot state, prints a plan, and executes it with per-step pkexec/sudo escalation.
  • Platforms: Fedora (dnf, CachyOS COPR kernels), Arch/CachyOS (flavor-matched headers, LLVM=1 on Clang/LTO kernels), Debian/Ubuntu, openSUSE, Bazzite/Silverblue (rpm-ostree akmods layering), NixOS (generates opends5-vds.nix, no imperative changes), clean refusal otherwise.
  • Secure Boot: DKMS signing key at /var/lib/opends5/; MOK enrollment only when the kernel actually enforces signatures (lockdown or MODULE_SIG_FORCE) — not merely when SB is on.
  • Fail-closed: first failing step aborts, prints manual retry, rolls back DKMS registration (exit 4).
  • Wire-up: OpenDS5.AppImage --install-system runs the bundled installer (module source bundled via extraResources; app version passed as module version); install-system.sh now delegates its kernel-module section to the installer.
  • Docs: docs/INSTALLER.md + README section.

Tests

  • installer/tests/run-tests.sh: 57 fixture-based tests (detection, per-distro dry-run plans, Secure Boot logic, execution/rollback via stubbed root helper, NixOS generation) — all green, no root needed.
  • Companion vitest: 402 passed; typecheck clean.

Dry-run on the dev box (Fedora + CachyOS COPR kernel, SB on, lockdown none)

1. Install DKMS and kernel headers (dnf)        # dnf install -y dkms kernel-cachyos-devel
2. Configure DKMS module signing                # key at /var/lib/opends5/mok.key
3. Stage module source to /usr/src/vds_hcd-<ver>
4. Register and build vds_hcd with DKMS
5. Enable autoload on boot
(no mokutil --import — enforcement off, correct)

Hardware validation still needed

Run bash installer/opends5-install for real on the dev box before merge (should be an idempotent reinstall).

🤖 Generated with Claude Code

LordVicky and others added 16 commits July 11, 2026 13:52
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…sed rollback

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ystem

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ck for module version

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… ships no akmod package

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Kbuild builds with -I$(src)/include; the uapi/vds headers live in the
sibling vds/include tree, which upstream's make-install copies into the
DKMS source dir. Staging (and the NixOS/AppImage bundles) now do the same.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… root runner

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…signature-enforcing

Fedora-lineage kernels reject unenrolled-key modules under Secure Boot even
with lockdown 'none'. Use /var/lib/dkms/mok.key (commonly already enrolled)
instead of generating a custom key, remove the framework override the previous
installer version wrote, and exit 6 with reboot guidance when enrollment is
freshly imported.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…nit exists

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant