Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2021-03-21 11:31:49 +0100
committerAnton Hvornum <anton@hvornum.se>2021-03-21 11:31:49 +0100
commit886c60f9bca47d4053acd77685f8e19f48d57a04 (patch)
tree67383582ae9be282a921fafba97f57bc33d0af73 /archinstall
parenta75002a36d2e98d5618d88ac372fb9b5ed3575bf (diff)
Added some more debugging and error logs to the project. Mainly to indicate background tasks and errors to the debug log in case users need to submit it.
Diffstat (limited to 'archinstall')
-rw-r--r--archinstall/lib/disk.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/archinstall/lib/disk.py b/archinstall/lib/disk.py
index 77aa6528..fcc53981 100644
--- a/archinstall/lib/disk.py
+++ b/archinstall/lib/disk.py
@@ -233,6 +233,7 @@ class Partition():
raise DiskError(f"Attempting to encrypt a partition that was not marked for encryption: {self}")
if not self.safe_to_format():
+ log(f"Partition {self} was marked as protected but encrypt() was called on it!", level=LOG_LEVELS.Error, fg="red")
return False
handle = luks2(self, None, None)
@@ -407,6 +408,7 @@ class Filesystem():
return self.raw_parted(string).exit_code
def use_entire_disk(self, root_filesystem_type='ext4', encrypt_root_partition=True):
+ log(f"Using and formatting the entire {self.blockdevice}.", level=LOG_LEVELS.Debug)
self.add_partition('primary', start='1MiB', end='513MiB', format='fat32')
self.set_name(0, 'EFI')
self.set(0, 'boot on')
@@ -417,11 +419,13 @@ class Filesystem():
self.blockdevice.partition[0].filesystem = 'vfat'
self.blockdevice.partition[1].filesystem = root_filesystem_type
+ log(f"Set the root partition {self.blockdevice.partition[1]} to use filesystem {root_filesystem_type}.", level=LOG_LEVELS.Debug)
self.blockdevice.partition[0].target_mountpoint = '/boot'
self.blockdevice.partition[1].target_mountpoint = '/'
if encrypt_root_partition:
+ log(f"Marking partition {self.blockdevice.partition[1]} as encrypted.", level=LOG_LEVELS.Debug)
self.blockdevice.partition[1].encrypted = True
def add_partition(self, type, start, end, format=None):