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.py25
1 files changed, 16 insertions, 9 deletions
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" : {