Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/disk
diff options
context:
space:
mode:
authorHTV04 <53527582+HTV04@users.noreply.github.com>2022-01-04 08:31:21 -0500
committerGitHub <noreply@github.com>2022-01-04 13:31:21 +0000
commita68a23d10a08052091df9550d119810db94a2fdf (patch)
treed4f4645853fc58f26aa87e21d481dcffc2eb973c /archinstall/lib/disk
parent3474176e641eed9ced37c918b157fd35c07dc388 (diff)
Add prompt for /home partition (#801)
Diffstat (limited to 'archinstall/lib/disk')
-rw-r--r--archinstall/lib/disk/user_guides.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/archinstall/lib/disk/user_guides.py b/archinstall/lib/disk/user_guides.py
index 8dbd15dd..3d48c104 100644
--- a/archinstall/lib/disk/user_guides.py
+++ b/archinstall/lib/disk/user_guides.py
@@ -9,6 +9,7 @@ def suggest_single_disk_layout(block_device, default_filesystem=None, advanced_o
MIN_SIZE_TO_ALLOW_HOME_PART = 40 # Gb
using_subvolumes = False
+ using_home_partition = False
if default_filesystem == 'btrfs':
using_subvolumes = input('Would you like to use BTRFS subvolumes with a default structure? (Y/n): ').strip().lower() in ('', 'y', 'yes')
@@ -45,10 +46,14 @@ def suggest_single_disk_layout(block_device, default_filesystem=None, advanced_o
}
})
+ if not using_subvolumes and block_device.size >= MIN_SIZE_TO_ALLOW_HOME_PART:
+ using_home_partition = input('Would you like to create a separate partition for /home? (Y/n): ').strip().lower() in ('', 'y', 'yes')
+
# Set a size for / (/root)
- if using_subvolumes or block_device.size < MIN_SIZE_TO_ALLOW_HOME_PART:
+ if using_subvolumes or block_device.size < MIN_SIZE_TO_ALLOW_HOME_PART or not using_home_partition:
# We'll use subvolumes
# Or the disk size is too small to allow for a separate /home
+ # Or the user doesn't want to create a separate partition for /home
layout[block_device.path]['partitions'][-1]['size'] = '100%'
else:
layout[block_device.path]['partitions'][-1]['size'] = f"{min(block_device.size, 20)}GB"
@@ -69,7 +74,7 @@ def suggest_single_disk_layout(block_device, default_filesystem=None, advanced_o
# else:
# pass # ... implement a guided setup
- elif block_device.size >= MIN_SIZE_TO_ALLOW_HOME_PART:
+ elif using_home_partition:
# If we don't want to use subvolumes,
# But we want to be able to re-use data between re-installs..
# A second partition for /home would be nice if we have the space for it