aboutsummaryrefslogtreecommitdiff
path: root/installer/lib/disk.sh
Commit message (Collapse)AuthorAgeFilesLines
* refactor: unify partition_disks across ZFS and Btrfs install pathsCraig Jennings2026-04-261-69/+39
| | | | | | | | | | | | 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.
* refactor: drop dead mount_efi and select_raid_level from lib/disk.shCraig Jennings2026-04-131-41/+0
| | | | | | | lib/disk.sh:mount_efi() was shadowed by installer/archangel:mount_efi() (different signature, no-arg ZFS-specific) and had zero callers. lib/disk.sh:select_raid_level() was superseded by get_raid_level() in archangel and also had zero callers. Both removed.
* refactor: rename custom/ to installer/ for clarityCraig Jennings2026-02-231-0/+204
The custom/ directory name was an archiso implementation detail. Renamed to installer/ which clearly communicates that this directory contains the installer scripts and utilities that ship on the ISO. Updated all references in build.sh, Makefile, test-install.sh, and README.