Fix: ensure disk is unmounted before partitioning and use sudo for reboot

This commit is contained in:
2026-02-05 14:55:18 +01:00
parent 45b0fa5a84
commit 3a226108ec
2 changed files with 36 additions and 1 deletions

View File

@@ -247,7 +247,8 @@ class InstallerWindow(Adw.ApplicationWindow):
def on_restart(b):
import subprocess
try:
subprocess.run(["systemctl", "reboot"])
# Use sudo since we might be running as liveuser
subprocess.run(["sudo", "systemctl", "reboot"])
except Exception as e:
print(f"Failed to reboot: {e}")
self.close()