Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib
diff options
context:
space:
mode:
Diffstat (limited to 'archinstall/lib')
-rw-r--r--archinstall/lib/disk/filesystem.py2
-rw-r--r--archinstall/lib/disk/partition.py6
-rw-r--r--archinstall/lib/disk/user_guides.py8
3 files changed, 10 insertions, 6 deletions
diff --git a/archinstall/lib/disk/filesystem.py b/archinstall/lib/disk/filesystem.py
index ac3c9d17..177c58f7 100644
--- a/archinstall/lib/disk/filesystem.py
+++ b/archinstall/lib/disk/filesystem.py
@@ -98,7 +98,7 @@ class Filesystem:
if storage['arguments'] == 'silent':
raise ValueError(f"Missing encryption password for {partition['device_instance']}")
else:
- from .user_interaction import get_password
+ from ..user_interaction import get_password
partition['password'] = get_password(f"Enter a encryption password for {partition['device_instance']}")
partition['device_instance'].encrypt(password=partition['password'])
diff --git a/archinstall/lib/disk/partition.py b/archinstall/lib/disk/partition.py
index a459a820..e9688965 100644
--- a/archinstall/lib/disk/partition.py
+++ b/archinstall/lib/disk/partition.py
@@ -173,7 +173,7 @@ class Partition:
def detect_inner_filesystem(self, password):
log(f'Trying to detect inner filesystem format on {self} (This might take a while)', level=logging.INFO)
- from .luks import luks2
+ from ..luks import luks2
try:
with luks2(self, storage.get('ENC_IDENTIFIER', 'ai') + 'loop', password, auto_unmount=True) as unlocked_device:
@@ -206,7 +206,7 @@ class Partition:
"""
A wrapper function for luks2() instances and the .encrypt() method of that instance.
"""
- from .luks import luks2
+ from ..luks import luks2
handle = luks2(self, None, None)
return handle.encrypt(self, *args, **kwargs)
@@ -274,7 +274,7 @@ class Partition:
self.filesystem = filesystem
elif filesystem == 'crypto_LUKS':
- # from .luks import luks2
+ # from ..luks import luks2
# encrypted_partition = luks2(self, None, None)
# encrypted_partition.format(path)
self.filesystem = filesystem
diff --git a/archinstall/lib/disk/user_guides.py b/archinstall/lib/disk/user_guides.py
index 5354fe2a..a70a82db 100644
--- a/archinstall/lib/disk/user_guides.py
+++ b/archinstall/lib/disk/user_guides.py
@@ -8,6 +8,10 @@ def suggest_single_disk_layout(block_device, default_filesystem=None):
default_filesystem = ask_for_main_filesystem_format()
MIN_SIZE_TO_ALLOW_HOME_PART = 40 # Gb
+ using_subvolumes = False
+
+ if default_filesystem == 'btrfs':
+ using_subvolumes = input('Would you like to use BTRFS subvolumes? (Y/n): ').strip().lower() in ('', 'y', 'yes')
layout = {
block_device.path : {
@@ -35,14 +39,14 @@ def suggest_single_disk_layout(block_device, default_filesystem=None):
"start" : "513MiB",
"encrypted" : False,
"format" : True,
- "size" : "100%" if block_device.size < MIN_SIZE_TO_ALLOW_HOME_PART else f"{min(block_device.size, 20)*1024}MiB",
+ "size" : "100%" if (using_subvolumes or block_device.size < MIN_SIZE_TO_ALLOW_HOME_PART) else f"{min(block_device.size, 20)*1024}MiB",
"mountpoint" : "/",
"filesystem" : {
"format" : default_filesystem
}
})
- if default_filesystem == 'btrfs' and input('Would you like to use BTRFS subvolumes? (Y/n): ').strip().lower() in ('', 'y', 'yes'):
+ if default_filesystem == 'btrfs' and using_subvolumes:
if input('Do you want to use a recommended structure? (Y/n): ').strip().lower() in ('', 'y', 'yes'):
# https://btrfs.wiki.kernel.org/index.php/FAQ
# https://unix.stackexchange.com/questions/246976/btrfs-subvolume-uuid-clash