4 Commits

Author SHA1 Message Date
Stefan Strobl
89c88c8a2e Fix non-interactive install and fstab setup 2025-12-25 10:31:30 +01:00
Stefan Strobl
98aebc5f09 fix(postinstall): improve error handling and user feedback
Add three critical improvements to post-install phase:

1. Cleanup trap for bind mounts: Ensure /dev, /proc, /sys, /run
   are unmounted even if chroot script fails. Prevents orphaned
   mounts blocking cleanup.

2. Fallocate fallback: Use dd as fallback if fallocate fails
   (can happen on some filesystems or with insufficient space).
   Includes intelligent size conversion and progress display.

3. Progress messages: Add informative echo statements before
   long-running operations (xbps-reconfigure, grub-install,
   grub-mkconfig) so users know the system is working.

Decision: Use trap EXIT instead of manual cleanup to guarantee
execution on both success and error paths. Remove redundant
explicit cleanup call.

Trade-offs: dd fallback is slower but ensures swap file creation
succeeds. Progress messages add noise but significantly improve
UX during multi-minute operations.
2025-12-24 15:27:14 +01:00
Stefan Strobl
a6e5399572 Implement wrapper workflow and btrfs layout 2025-12-24 14:36:53 +01:00
Stefan Strobl
a1fdbdaf6b feat(install): add phase 1 narrative for installer integration
Add literate programming phase 1 documentation for:
- installer.sh: handoff to official Void installer
- postinstall.sh: boot configuration for encrypted system

Decision: Keep official installer in the loop rather than
full automation. The installer handles package selection and
system configuration choices better than a custom script would.
Reduces maintenance burden significantly.

Decision: GRUB as default bootloader for wide Void support
without systemd dependencies. systemd-boot and rEFInd rejected
due to availability constraints. EFISTUB rejected due to manual
UEFI entry management overhead.

Technical details documented for post-install phase:
- dracut crypt module enables LUKS unlock in initramfs
- /etc/crypttab uses UUID references for device stability
- GRUB_ENABLE_CRYPTODISK=y enables GRUB LUKS unlock
- rd.luks.uuid kernel parameter tells dracut which container
- grub-install embeds cryptodisk, grub-mkconfig updates menu

Open questions preserved for phase 2 implementation:
- Should rescue initramfs be generated?
- Verify GRUB LUKS2 support before reboot?
- Document kernel update process for users?
2025-12-24 09:52:06 +01:00