Always create our own ESP
This commit is contained in:
1 file changed
+20
-24
@@ -678,23 +678,24 @@ run_partition_install() {
|
|||||||
abort "Aborted: BitLocker is active on this disk."
|
abort "Aborted: BitLocker is active on this disk."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
step "Looking for an existing Windows ESP on $disk"
|
# Omarchy always creates its own dedicated ESP in free space and never
|
||||||
local shared_esp
|
# adopts an existing (Windows) ESP. Sharing the Windows ESP is fragile:
|
||||||
shared_esp=$(detect_windows_esp || true)
|
# Windows Update/repair can reclaim or reformat it, the typical 100-260MiB
|
||||||
|
# Windows ESP is far too small for our Unified Kernel Images, and a shared
|
||||||
if [[ -n "$shared_esp" ]]; then
|
# ESP forces the install unencrypted. A separate Linux ESP keeps Windows
|
||||||
say "Found Windows ESP at $shared_esp — will install alongside."
|
# and Omarchy fully isolated and keeps LUKS on the table.
|
||||||
local tmp_mp esp_free_mib
|
#
|
||||||
tmp_mp=$(mktemp -d)
|
# shared_esp stays declared but is intentionally always empty so every
|
||||||
mount -o ro "$shared_esp" "$tmp_mp"
|
# downstream `[[ -z "$shared_esp" ]]` branch takes the dedicated-ESP path.
|
||||||
esp_free_mib=$(df -BM --output=avail "$tmp_mp" | tail -1 | tr -dc '0-9')
|
step "Checking existing EFI partitions on $disk"
|
||||||
umount "$tmp_mp"; rmdir "$tmp_mp"
|
local shared_esp=""
|
||||||
if (( esp_free_mib < 100 )); then
|
local detected_win_esp
|
||||||
abort "Windows ESP $shared_esp has only ${esp_free_mib}MiB free — need at least 100MiB for Omarchy."
|
detected_win_esp=$(detect_windows_esp || true)
|
||||||
fi
|
if [[ -n "$detected_win_esp" ]]; then
|
||||||
say "Windows ESP has ${esp_free_mib}MiB free."
|
say "Found a Windows ESP at $detected_win_esp — leaving it untouched."
|
||||||
|
say "Omarchy will create its own dedicated EFI partition in free space."
|
||||||
else
|
else
|
||||||
say "No Windows ESP detected on $disk — a new EFI partition will be created in free space."
|
say "A new EFI partition will be created in free space."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
step "Analyzing free space on $disk"
|
step "Analyzing free space on $disk"
|
||||||
@@ -807,11 +808,10 @@ run_partition_install() {
|
|||||||
ROOT_END_B=$((ROOT_START_B + INSTALL_SIZE_GIB * gib))
|
ROOT_END_B=$((ROOT_START_B + INSTALL_SIZE_GIB * gib))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Shared Windows ESP can't host our LUKS layout, so encryption isn't
|
# Default to encrypted and hide the unencrypted path behind Ctrl+C,
|
||||||
# offered in that case. Otherwise default to encrypted and hide the
|
# matching the full-disk flow. The dedicated Omarchy ESP always supports
|
||||||
# unencrypted path behind Ctrl+C, matching the full-disk flow.
|
# LUKS, so encryption is always on the table here.
|
||||||
local mode="encrypted" affirmative confirm_status
|
local mode="encrypted" affirmative confirm_status
|
||||||
[[ -n "$shared_esp" ]] && mode="forced_unencrypted"
|
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
step "Proposed layout on $disk"
|
step "Proposed layout on $disk"
|
||||||
@@ -832,10 +832,6 @@ run_partition_install() {
|
|||||||
unencrypted)
|
unencrypted)
|
||||||
affirmative="Yes, install without encryption"
|
affirmative="Yes, install without encryption"
|
||||||
;;
|
;;
|
||||||
forced_unencrypted)
|
|
||||||
say --foreground 8 "Shared Windows ESP cannot host encrypted Omarchy — installing unencrypted."
|
|
||||||
affirmative="Yes, install"
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user