From 551cb98a9d7cd177b377375f8421d83a08952f4a Mon Sep 17 00:00:00 2001 From: Stefan Strobl Date: Wed, 24 Dec 2025 15:25:42 +0100 Subject: [PATCH] fix(installer): verify mounts after installer completion Add verification that critical mounts (root and ESP) are still intact after void-installer exits. Catches cases where installer accidentally reformats filesystems despite instructions. Fail fast with clear error message if mounts disappeared, rather than proceeding to post-install and encountering cryptic errors. Decision: Check mounts immediately after installer rather than during post-install to provide clear failure point and message. Alternative considered: Monitor installer process to prevent reformatting, rejected as too invasive and complex. --- src/installer.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/installer.sh b/src/installer.sh index 614fea4..3dc24e5 100644 --- a/src/installer.sh +++ b/src/installer.sh @@ -58,4 +58,14 @@ run_installer() { fi read -r -p "Press Enter once the installer is complete..." _ + + # Verify critical mounts are still intact after installer + if ! findmnt "$MOUNT_ROOT" >/dev/null 2>&1; then + die "Root mount disappeared after installer. The installer may have reformatted the filesystem." + fi + if ! findmnt "$ESP_MOUNT" >/dev/null 2>&1; then + die "ESP mount disappeared after installer. The installer may have reformatted the filesystem." + fi + + log_info "Mount verification passed." }