From b36280f1a6e8a13db3192068cd5e12fe98f9e75d Mon Sep 17 00:00:00 2001 From: Ryan Hughes Date: Thu, 21 May 2026 18:06:52 -0400 Subject: [PATCH] omarchy-iso-cleanup-disk: add --protected mode; adapter: doc pre-mount mount semantics --- configs/airootfs/usr/local/bin/omarchy-iso-cleanup-disk | 7 +++++++ .../share/omarchy-iso/orchestrator/archinstall_adapter.py | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/configs/airootfs/usr/local/bin/omarchy-iso-cleanup-disk b/configs/airootfs/usr/local/bin/omarchy-iso-cleanup-disk index 914e8c7..61c5a70 100755 --- a/configs/airootfs/usr/local/bin/omarchy-iso-cleanup-disk +++ b/configs/airootfs/usr/local/bin/omarchy-iso-cleanup-disk @@ -10,6 +10,13 @@ set -uo pipefail +if [[ ${1:-} == --protected ]]; then + target="${2:-}" + [[ -n $target ]] || { echo "Usage: $0 --protected " >&2; exit 1; } + findmnt -R "$target" >/dev/null 2>&1 && umount -R "$target" || true + exit 0 +fi + disk="${1:-}" [[ -n $disk && -b $disk ]] || { echo "Need a block device argument; got '$disk'" >&2; exit 1; } diff --git a/configs/airootfs/usr/share/omarchy-iso/orchestrator/archinstall_adapter.py b/configs/airootfs/usr/share/omarchy-iso/orchestrator/archinstall_adapter.py index c4747c3..5327f3c 100644 --- a/configs/airootfs/usr/share/omarchy-iso/orchestrator/archinstall_adapter.py +++ b/configs/airootfs/usr/share/omarchy-iso/orchestrator/archinstall_adapter.py @@ -9,7 +9,10 @@ The canonical call sequence (mirrored from archinstall.scripts.guided.py) is: FilesystemHandler(disk_config).perform_filesystem_operations() with Installer(mountpoint, disk_config, kernels=, silent=) as inst: - inst.mount_ordered_layout() + # guided.py:84-85 SKIPS this for DiskLayoutType.Pre_mount — pre-mounted + # configs do their own mounting before the Installer context opens. + if disk_config.config_type != DiskLayoutType.Pre_mount: + inst.mount_ordered_layout() inst.sanity_check(offline=, skip_ntp=, skip_wkd=) inst.generate_key_files() # encrypted only inst.set_mirrors(handler, mirror_config, on_target=False)