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.
This commit is contained in:
parent
c303a75192
commit
551cb98a9d
@ -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."
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user