Skip to content

Canonicalize install device paths before invoking archinstall - #142

Open
jonbng wants to merge 1 commit into
omacom:quattrofrom
jonbng:fix/canonical-install-devices
Open

Canonicalize install device paths before invoking archinstall#142
jonbng wants to merge 1 commit into
omacom:quattrofrom
jonbng:fix/canonical-install-devices

Conversation

@jonbng

@jonbng jonbng commented Aug 31, 2026

Copy link
Copy Markdown

Problem

Autoinstall configurations may identify the target disk using a stable path such as /dev/disk/by-id/....

Archinstall 4.4 indexes devices by their canonical kernel paths, such as /dev/vda. When given a valid symlink, it can silently omit the disk layout, leaving /mnt on the live filesystem and eventually causing installation to fail due to insufficient space.

Solution

  • Resolve configured installation devices to canonical paths before generating Archinstall's configuration.
  • Verify that each resolved path exists and is a block device.
  • Preserve the original stable path in the persistent configuration for diagnostics and cleanup.
  • Preserve deferred-provisioning encryption-password behavior after separating the two configurations.

Testing

  • Added tests for canonicalizing a persistent device alias.
  • Added coverage for missing installation devices.
  • Verified in a QEMU autoinstall using /dev/disk/by-id/virtio-omarchy-lab.
  • Focused unit suite passes: 28 tests.

Copilot AI lite review requested due to automatic review settings August 31, 2026 20:34

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request addresses Archinstall 4.4’s device lookup behavior by canonicalizing configured install device paths (e.g., /dev/disk/by-id/... symlinks) into their resolved kernel device paths (e.g., /dev/vda) before writing the Archinstall configuration, preventing Archinstall from silently dropping disk layouts.

Changes:

  • Deep-copy the user configuration into a dedicated Archinstall configuration, then canonicalize install device paths and validate they exist and are block devices.
  • Preserve the original (stable) device alias in the persistent user_configuration for diagnostics/cleanup while ensuring Archinstall receives canonical device paths.
  • Adjust deferred-provisioning encryption password injection to explicitly mirror the effective passphrase into the persistent configuration (now that configurations are separated), and add unit tests for both canonicalization and missing-device failures.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
test/unit/test_provisioning_state.py Adds unit tests ensuring stable device aliases remain in persistent config while Archinstall receives canonical paths; adds coverage for missing install devices.
configs/airootfs/usr/share/omarchy-iso/orchestrator/context.py Separates Archinstall config via deep copy, canonicalizes/validates install device paths, and preserves deferred-provisioning encryption password behavior across the split configs.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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.

2 participants