Re-worked guided to allow for unsupported fileformats when checking which are supported, as well as selecting mount-points.
This commit is contained in:
parent
e2cd617d05
commit
76d3976df6
|
|
@ -104,26 +104,35 @@ else:
|
||||||
# 2. If so, ask if we should keep them or wipe everything
|
# 2. If so, ask if we should keep them or wipe everything
|
||||||
if archinstall.arguments['harddrive'].has_partitions():
|
if archinstall.arguments['harddrive'].has_partitions():
|
||||||
archinstall.log(f" ! {archinstall.arguments['harddrive']} contains existing partitions", fg='red')
|
archinstall.log(f" ! {archinstall.arguments['harddrive']} contains existing partitions", fg='red')
|
||||||
try:
|
partition_mountpoints = {}
|
||||||
partition_mountpoints = {}
|
for partition in archinstall.arguments['harddrive']:
|
||||||
for partition in archinstall.arguments['harddrive']:
|
try:
|
||||||
if partition.filesystem_supported():
|
if partition.filesystem_supported():
|
||||||
archinstall.log(f" {partition}")
|
archinstall.log(f" {partition}")
|
||||||
partition_mountpoints[partition] = None
|
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'):
|
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.arguments['harddrive'].keep_partitions = True
|
||||||
|
|
||||||
while True:
|
archinstall.log(f" ** You will now select where (inside the installation) to mount partitions. **")
|
||||||
partition = archinstall.generic_select(partition_mountpoints.values(), "Select a partition to assign mount-point to")
|
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
|
||||||
|
|
||||||
archinstall.arguments['harddrive'].allocate_partitions(selections)
|
mountpoint = input(f"Select a mount-point for {partition}: ")
|
||||||
archinstall.log('Using existing partition table reported above.')
|
#partition.mountpoint = mountpoint
|
||||||
else:
|
partition.allow_formatting = True
|
||||||
archinstall.arguments['harddrive'].keep_partitions = False
|
partition.target_mountpoint = mountpoint
|
||||||
except archinstall.UnknownFilesystemFormat as err:
|
|
||||||
archinstall.log(f"Current filesystem is not supported: {err}", fg='red')
|
archinstall.log('Using existing partition table reported above.')
|
||||||
input(f"Do you wish to erase all data? (y/n):")
|
else:
|
||||||
|
archinstall.arguments['harddrive'].keep_partitions = False
|
||||||
|
|
||||||
exit(0)
|
exit(0)
|
||||||
while (disk_password := getpass.getpass(prompt='Enter disk encryption password (leave blank for no encryption): ')):
|
while (disk_password := getpass.getpass(prompt='Enter disk encryption password (leave blank for no encryption): ')):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue