diff options
| author | Craig Jennings <c@cjennings.net> | 2026-04-26 18:31:35 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-04-26 18:31:35 -0500 |
| commit | f02ba03c12599bdd61b5208c9a65f458ae05aa15 (patch) | |
| tree | 249a2e5eed52aaaa5cc2c9ca57d549a21560c8c6 /docs/scripts | |
| parent | 6de9f378cf52b9e9b0e89b396a12b978700241ff (diff) | |
| download | archangel-f02ba03c12599bdd61b5208c9a65f458ae05aa15.tar.gz archangel-f02ba03c12599bdd61b5208c9a65f458ae05aa15.zip | |
refactor: unify partition_disks across ZFS and Btrfs install paths
The monolith's partition_disks() at installer/archangel was ZFS-only and silently shadowed lib/disk.sh:partition_disks(), which had been dead code since the Btrfs install path was added. install_btrfs was assembling partitioning manually via partition_disk (singular) plus a separate format_efi_partitions call. Two parallel implementations meant fixes had to land in two places and the lib version drifted with no visible warning.
The unified partition_disks now lives in lib/disk.sh. It reads SELECTED_DISKS, dispatches the per-disk layout on FILESYSTEM (BF00 for ZFS, 8300 for Btrfs), populates EFI_PARTS + ROOT_PARTS, and formats each EFI partition with EFI0, EFI1, ... labels.
Folded in two pre-existing divergences while consolidating. wipefs -af now runs on every disk, not just the ZFS path. The Btrfs path was missing this defense against non-GPT signatures (LVM, mdadm, ext) that sgdisk --zap-all alone won't touch. EFI labels standardized on EFI0, EFI1, ... across both paths. The lib version was producing asymmetric EFI / EFI2 labels. No consumer in the repo references the labels after format, so that change is cosmetic.
ZFS_PARTS renamed to ROOT_PARTS for symmetry with get_root_partition. Deleted four orphaned helpers: format_efi, format_efi_partitions (only caller was the collapsed install_btrfs section), get_efi_partitions, get_root_partitions (test-only callers after install_btrfs simplified).
Verified end to end: bats 134/134, make test-install passing 12/12 configs across both install paths.
Diffstat (limited to 'docs/scripts')
0 files changed, 0 insertions, 0 deletions
