Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2021-03-21 13:00:37 +0100
committerAnton Hvornum <anton@hvornum.se>2021-03-21 13:00:37 +0100
commit75d1395b107d983c8b97f10ee757ee6f28487afa (patch)
treeafd02a5bb609a1fb238e5fd12700b977445a114b /archinstall/lib
parent886c60f9bca47d4053acd77685f8e19f48d57a04 (diff)
Marking newly created partitions as safe to format in use_entire_disk(), by adding allow_formatting=True to the partitions. Also added some debugging to help aiding in support cases.
Diffstat (limited to 'archinstall/lib')
-rw-r--r--archinstall/lib/disk.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/archinstall/lib/disk.py b/archinstall/lib/disk.py
index fcc53981..0a182eb0 100644
--- a/archinstall/lib/disk.py
+++ b/archinstall/lib/disk.py
@@ -217,8 +217,10 @@ class Partition():
def safe_to_format(self):
if self.allow_formatting is False:
+ log(f"Partition {self} is not marked for formatting.", level=LOG_LEVELS.Debug)
return False
elif self.target_mountpoint == '/boot' and self.has_content():
+ log(f"Partition {self} is a boot partition and has content inside.", level=LOG_LEVELS.Debug)
return False
return True
@@ -424,6 +426,9 @@ class Filesystem():
self.blockdevice.partition[0].target_mountpoint = '/boot'
self.blockdevice.partition[1].target_mountpoint = '/'
+ self.blockdevice.partition[0].allow_formatting = True
+ self.blockdevice.partition[1].allow_formatting = True
+
if encrypt_root_partition:
log(f"Marking partition {self.blockdevice.partition[1]} as encrypted.", level=LOG_LEVELS.Debug)
self.blockdevice.partition[1].encrypted = True