Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/examples/guided.py
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2021-11-23 11:37:51 +0000
committerGitHub <noreply@github.com>2021-11-23 11:37:51 +0000
commit6b6c9c84bed1e4640f5f46282da1767827f977a9 (patch)
tree9a6750bd296e18cb36189ea06808524c1619d4e8 /examples/guided.py
parente15697119116487f84e72a22e99f8e46d714f21f (diff)
Adding a warning when /boot is reasonably too small (#738)
* Moved convert_size_to_gb() into disk/helpers.py, Added a Partition().size property meta function. Using the .size value to check if /boot is too small which will raise an exception. The only drawback is that it's done post-formatting. This in order to catch scenarios where formatting isn't used. * Changed /boot warning from 0.15GB to 0.25GB * Changed the wording in the warning when /boot is too small.
Diffstat (limited to 'examples/guided.py')
-rw-r--r--examples/guided.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/examples/guided.py b/examples/guided.py
index e48ad89d..1ee31d38 100644
--- a/examples/guided.py
+++ b/examples/guided.py
@@ -264,6 +264,12 @@ def perform_installation(mountpoint):
# This *can* be done outside of the installation, but the installer can deal with it.
installation.mount_ordered_layout(archinstall.storage['disk_layouts'])
+ # Placing /boot check during installation because this will catch both re-use and wipe scenarios.
+ for partition in installation.partitions:
+ if partition.mountpoint == installation.target + '/boot':
+ if partition.size <= 0.25: # in GB
+ raise archinstall.DiskError(f"The selected /boot partition in use is not large enough to properly install a boot loader. Please resize it to at least 256MB and re-run the installation.")
+
# if len(mirrors):
# Certain services might be running that affects the system during installation.
# Currently, only one such service is "reflector.service" which updates /etc/pacman.d/mirrorlist