Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/guided.py39
1 files changed, 24 insertions, 15 deletions
diff --git a/examples/guided.py b/examples/guided.py
index 5e8a64c1..abbecd3a 100644
--- a/examples/guided.py
+++ b/examples/guided.py
@@ -104,26 +104,35 @@ else:
# 2. If so, ask if we should keep them or wipe everything
if archinstall.arguments['harddrive'].has_partitions():
archinstall.log(f" ! {archinstall.arguments['harddrive']} contains existing partitions", fg='red')
- try:
- partition_mountpoints = {}
- for partition in archinstall.arguments['harddrive']:
+ partition_mountpoints = {}
+ for partition in archinstall.arguments['harddrive']:
+ try:
if partition.filesystem_supported():
archinstall.log(f" {partition}")
partition_mountpoints[partition] = None
+ except archinstall.UnknownFilesystemFormat as err:
+ archinstall.log(f" {partition} (Filesystem not supported)", fg='red')
+ #archinstall.log(f"Current filesystem is not supported: {err}", fg='red')
+ #input(f"Do you wish to erase all data? (y/n):")
+
+ if (option := input('Do you wish to keep one/more existing partitions or format entire drive? (k/f): ')).lower() in ('k', 'keep'):
+ archinstall.arguments['harddrive'].keep_partitions = True
+
+ archinstall.log(f" ** You will now select where (inside the installation) to mount partitions. **")
+ archinstall.log(f" ** The root would be a simple / and the boot partition /boot as it's relative paths. **")
+ while True:
+ partition = archinstall.generic_select(partition_mountpoints.keys(), "Select a partition to assign mount-point to: ")
+ if not partition:
+ break
- if (option := input('Do you wish to keep one/more existing partitions or format entire drive? (k/f): ')).lower() in ('k', 'keep'):
- archinstall.arguments['harddrive'].keep_partitions = True
-
- while True:
- partition = archinstall.generic_select(partition_mountpoints.values(), "Select a partition to assign mount-point to")
+ mountpoint = input(f"Select a mount-point for {partition}: ")
+ #partition.mountpoint = mountpoint
+ partition.allow_formatting = True
+ partition.target_mountpoint = mountpoint
- archinstall.arguments['harddrive'].allocate_partitions(selections)
- archinstall.log('Using existing partition table reported above.')
- else:
- archinstall.arguments['harddrive'].keep_partitions = False
- except archinstall.UnknownFilesystemFormat as err:
- archinstall.log(f"Current filesystem is not supported: {err}", fg='red')
- input(f"Do you wish to erase all data? (y/n):")
+ archinstall.log('Using existing partition table reported above.')
+ else:
+ archinstall.arguments['harddrive'].keep_partitions = False
exit(0)
while (disk_password := getpass.getpass(prompt='Enter disk encryption password (leave blank for no encryption): ')):