Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--archinstall/lib/disk.py8
-rw-r--r--examples/guided.py8
2 files changed, 15 insertions, 1 deletions
diff --git a/archinstall/lib/disk.py b/archinstall/lib/disk.py
index 49bef1be..44462a21 100644
--- a/archinstall/lib/disk.py
+++ b/archinstall/lib/disk.py
@@ -624,3 +624,11 @@ def get_filesystem_type(path):
return b''.join(handle).strip().decode('UTF-8')
except SysCallError:
return None
+
+def disk_layouts():
+ try:
+ handle = sys_command(f"lsblk -f -o+TYPE,SIZE -J")
+ return json.loads(b''.join(handle).decode('UTF-8'))
+ except SysCallError as err:
+ log(f"Could not return disk layouts: {err}")
+ return None \ No newline at end of file
diff --git a/examples/guided.py b/examples/guided.py
index c281d033..40bebabf 100644
--- a/examples/guided.py
+++ b/examples/guided.py
@@ -7,6 +7,9 @@ if archinstall.arguments.get('help'):
print("See `man archinstall` for help.")
exit(0)
+# For support reasons, we'll log the disk layout pre installation to match against post-installation layout
+archinstall.log(f"Disk states before installing: {archinstall.disk_layouts()}", level=archinstall.LOG_LEVELS.Debug)
+
def ask_user_questions():
"""
First, we'll ask the user for a bunch of user input.
@@ -385,5 +388,8 @@ def perform_installation(mountpoint):
except:
pass
+ # For support reasons, we'll log the disk layout post installation (crash or no crash)
+ archinstall.log(f"Disk states after installing: {archinstall.disk_layouts()}", level=archinstall.LOG_LEVELS.Debug)
+
ask_user_questions()
-perform_installation_steps()
+perform_installation_steps() \ No newline at end of file