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:
authorAnton Hvornum <anton@hvornum.se>2021-11-08 23:25:36 +0000
committerGitHub <noreply@github.com>2021-11-08 23:25:36 +0000
commita6629815e31fb2ba6db5bcca661b9734b9e0cdd8 (patch)
treefd14028d45fe2be56c2094ceffff49fc38746b19 /archinstall/lib/disk/user_guides.py
parent68a1e42cfeed4c8986e7fb42330aefeb9a772710 (diff)
parent01b620ba81cc5a091fd9b516f1493739d89f0b8b (diff)
Merge pull request #702 from dylanmtaylor/subvolume-disk-size
If using subvolumes, make root partition 100% instead of using home
Diffstat (limited to 'archinstall/lib/disk/user_guides.py')
-rw-r--r--archinstall/lib/disk/user_guides.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/archinstall/lib/disk/user_guides.py b/archinstall/lib/disk/user_guides.py
index 5354fe2a..a70a82db 100644
--- a/archinstall/lib/disk/user_guides.py
+++ b/archinstall/lib/disk/user_guides.py
@@ -8,6 +8,10 @@ def suggest_single_disk_layout(block_device, default_filesystem=None):
default_filesystem = ask_for_main_filesystem_format()
MIN_SIZE_TO_ALLOW_HOME_PART = 40 # Gb
+ using_subvolumes = False
+
+ if default_filesystem == 'btrfs':
+ using_subvolumes = input('Would you like to use BTRFS subvolumes? (Y/n): ').strip().lower() in ('', 'y', 'yes')
layout = {
block_device.path : {
@@ -35,14 +39,14 @@ def suggest_single_disk_layout(block_device, default_filesystem=None):
"start" : "513MiB",
"encrypted" : False,
"format" : True,
- "size" : "100%" if block_device.size < MIN_SIZE_TO_ALLOW_HOME_PART else f"{min(block_device.size, 20)*1024}MiB",
+ "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
}
})
- if default_filesystem == 'btrfs' and input('Would you like to use BTRFS subvolumes? (Y/n): ').strip().lower() in ('', 'y', 'yes'):
+ 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
# https://unix.stackexchange.com/questions/246976/btrfs-subvolume-uuid-clash