index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Anton Hvornum <anton@hvornum.se> | 2021-11-22 11:27:49 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-22 11:27:49 +0000 |
commit | 29d0b3d15570a12ad89feff8b49dd9be478e69c2 (patch) | |
tree | 7a10426dca04a436fc3bf7edc68b89ac70d1b866 /archinstall | |
parent | c264fd466aca54bcc1a7210165ee143b5f0aa6f3 (diff) |
-rw-r--r-- | archinstall/lib/disk/user_guides.py | 25 |
diff --git a/archinstall/lib/disk/user_guides.py b/archinstall/lib/disk/user_guides.py index e9332b7b..a7d9a6e5 100644 --- a/archinstall/lib/disk/user_guides.py +++ b/archinstall/lib/disk/user_guides.py @@ -23,8 +23,8 @@ def suggest_single_disk_layout(block_device, default_filesystem=None): layout[block_device.path]['partitions'].append({ # Boot "type" : "primary", - "start" : "5MiB", - "size" : "513MiB", + "start" : "5MB", + "size" : "513MB", "boot" : True, "encrypted" : False, "format" : True, @@ -36,16 +36,23 @@ def suggest_single_disk_layout(block_device, default_filesystem=None): layout[block_device.path]['partitions'].append({ # Root "type" : "primary", - "start" : "518MiB", + "start" : "518MB", "encrypted" : False, "format" : True, - "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 } }) + # Set a size for / (/root) + if using_subvolumes or block_device.size < MIN_SIZE_TO_ALLOW_HOME_PART: + # We'll use subvolumes + # Or the disk size is too small to allow for a separate /home + layout[block_device.path]['partitions'][-1]['size'] = '100%' + else: + layout[block_device.path]['partitions'][-1]['size'] = f"{min(block_device.size, 20)}GB" + 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 @@ -71,7 +78,7 @@ def suggest_single_disk_layout(block_device, default_filesystem=None): "type" : "primary", "encrypted" : False, "format" : True, - "start" : f"{min(block_device.size*0.2, 20)*1024}MiB", + "start" : f"{min(block_device.size+0.5, 20.5)}GB", "size" : "100%", "mountpoint" : "/home", "filesystem" : { @@ -115,8 +122,8 @@ def suggest_multi_disk_layout(block_devices, default_filesystem=None): layout[root_device.path]['partitions'].append({ # Boot "type" : "primary", - "start" : "5MiB", - "size" : "513MiB", + "start" : "5MB", + "size" : "513MB", "boot" : True, "encrypted" : False, "format" : True, @@ -128,7 +135,7 @@ def suggest_multi_disk_layout(block_devices, default_filesystem=None): layout[root_device.path]['partitions'].append({ # Root "type" : "primary", - "start" : "518MiB", + "start" : "518MB", "encrypted" : False, "format" : True, "size" : "100%", @@ -143,7 +150,7 @@ def suggest_multi_disk_layout(block_devices, default_filesystem=None): "type" : "primary", "encrypted" : False, "format" : True, - "start" : "4MiB", + "start" : "5MB", "size" : "100%", "mountpoint" : "/home", "filesystem" : { |