Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/disk/user_guides.py
diff options
context:
space:
mode:
Diffstat (limited to 'archinstall/lib/disk/user_guides.py')
-rw-r--r--archinstall/lib/disk/user_guides.py28
1 files changed, 24 insertions, 4 deletions
diff --git a/archinstall/lib/disk/user_guides.py b/archinstall/lib/disk/user_guides.py
index 90d323c7..63ec1d9b 100644
--- a/archinstall/lib/disk/user_guides.py
+++ b/archinstall/lib/disk/user_guides.py
@@ -23,12 +23,17 @@ def suggest_single_disk_layout(block_device :BlockDevice,
MIN_SIZE_TO_ALLOW_HOME_PART = 40 # GiB
using_subvolumes = False
using_home_partition = False
+ compression = False
if default_filesystem == 'btrfs':
prompt = 'Would you like to use BTRFS subvolumes with a default structure?'
choice = Menu(prompt, ['yes', 'no'], skip=False, default_option='yes').run()
using_subvolumes = choice == 'yes'
+ prompt = 'Would you like to use BTRFS compression?'
+ choice = Menu(prompt, ['yes', 'no'], skip=False, default_option='yes').run()
+ compression = choice == 'yes'
+
layout = {
block_device.path : {
"wipe" : True,
@@ -73,7 +78,8 @@ def suggest_single_disk_layout(block_device :BlockDevice,
"wipe" : True,
"mountpoint" : "/" if not using_subvolumes else None,
"filesystem" : {
- "format" : default_filesystem
+ "format" : default_filesystem,
+ "mount_options" : ["compress=zstd"] if compression else []
}
})
@@ -124,7 +130,8 @@ def suggest_single_disk_layout(block_device :BlockDevice,
"wipe" : True,
"mountpoint" : "/home",
"filesystem" : {
- "format" : default_filesystem
+ "format" : default_filesystem,
+ "mount_options" : ["compress=zstd"] if compression else []
}
})
@@ -151,6 +158,17 @@ def suggest_multi_disk_layout(block_devices :List[BlockDevice],
home_device = select_largest_device(block_devices, gigabytes=MIN_SIZE_TO_ALLOW_HOME_PART)
root_device = select_disk_larger_than_or_close_to(block_devices, gigabytes=ARCH_LINUX_INSTALLED_SIZE, filter_out=[home_device])
+ compression = False
+
+ if default_filesystem == 'btrfs':
+ # prompt = 'Would you like to use BTRFS subvolumes with a default structure?'
+ # choice = Menu(prompt, ['yes', 'no'], skip=False, default_option='yes').run()
+ # using_subvolumes = choice == 'yes'
+
+ prompt = 'Would you like to use BTRFS compression?'
+ choice = Menu(prompt, ['yes', 'no'], skip=False, default_option='yes').run()
+ compression = choice == 'yes'
+
log(f"Suggesting multi-disk-layout using {len(block_devices)} disks, where {root_device} will be /root and {home_device} will be /home", level=logging.DEBUG)
layout = {
@@ -193,7 +211,8 @@ def suggest_multi_disk_layout(block_devices :List[BlockDevice],
"wipe" : True,
"mountpoint" : "/",
"filesystem" : {
- "format" : default_filesystem
+ "format" : default_filesystem,
+ "mount_options" : ["compress=zstd"] if compression else []
}
})
if has_uefi():
@@ -208,7 +227,8 @@ def suggest_multi_disk_layout(block_devices :List[BlockDevice],
"wipe" : True,
"mountpoint" : "/home",
"filesystem" : {
- "format" : default_filesystem
+ "format" : default_filesystem,
+ "mount_options" : ["compress=zstd"] if compression else []
}
})