Merge pull request #409 from archlinux/torxed-partitioning

Adds partition layout to the install logs before and after installation
This commit is contained in:
Anton Hvornum 2021-05-01 10:13:33 +00:00 committed by GitHub
commit 7f2334bbfe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 1 deletions

View File

@ -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

View File

@ -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()