index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Anton Hvornum <anton@hvornum.se> | 2022-04-26 13:17:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-26 13:17:40 +0200 |
commit | 12b5e2e4e9537fbae0ec21ced9d21482b29610d3 (patch) | |
tree | beca57117b44080c161ca0142f07a90bdfee5ae1 /archinstall/lib/disk | |
parent | 1bce561a0ca22d6735f9a46ee39e5e22e0c17cb8 (diff) |
-rw-r--r-- | archinstall/lib/disk/user_guides.py | 28 |
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 [] } }) |