index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Werner Llácer <wllacer@gmail.com> | 2022-02-01 16:44:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-01 16:44:39 +0100 |
commit | e3adab13e837cbca619a7914b76c72e4d1e6d4d8 (patch) | |
tree | 219fc45610b85d700074b9baf65ff72ee53ca9a5 /archinstall/lib/disk/filesystem.py | |
parent | 64bde666acae251ee4d8dd3c8166d14029f7f8fa (diff) |
-rw-r--r-- | archinstall/lib/disk/filesystem.py | 12 |
diff --git a/archinstall/lib/disk/filesystem.py b/archinstall/lib/disk/filesystem.py index b5dcdf85..64b8008c 100644 --- a/archinstall/lib/disk/filesystem.py +++ b/archinstall/lib/disk/filesystem.py @@ -7,7 +7,7 @@ from typing import Optional, Dict, Any, TYPE_CHECKING # https://stackoverflow.com/a/39757388/929999 if TYPE_CHECKING: from .blockdevice import BlockDevice - + from .partition import Partition from .validators import valid_fs_type from ..exceptions import DiskError @@ -76,7 +76,7 @@ class Filesystem: # We then iterate the partitions in order for partition in layout.get('partitions', []): # We don't want to re-add an existing partition (those containing a UUID already) - if partition.get('format', False) and not partition.get('PARTUUID', None): + if partition.get('wipe', False) and not partition.get('PARTUUID', None): print("Adding partition....") partition['device_instance'] = self.add_partition(partition.get('type', 'primary'), start=partition.get('start', '1MiB'), # TODO: Revisit sane block starts (4MB for memorycards for instance) @@ -113,11 +113,11 @@ class Filesystem: loopdev = f"{storage.get('ENC_IDENTIFIER', 'ai')}{pathlib.Path(partition['mountpoint']).name}loop" else: loopdev = f"{storage.get('ENC_IDENTIFIER', 'ai')}{pathlib.Path(partition['device_instance'].path).name}" - + partition['device_instance'].encrypt(password=partition['!password']) # Immediately unlock the encrypted device to format the inner volume with luks2(partition['device_instance'], loopdev, partition['!password'], auto_unmount=True) as unlocked_device: - if not partition.get('format'): + if not partition.get('wipe'): if storage['arguments'] == 'silent': raise ValueError(f"Missing fs-type to format on newly created encrypted partition {partition['device_instance']}") else: @@ -133,7 +133,7 @@ class Filesystem: break unlocked_device.format(partition['filesystem']['format'], options=format_options) - elif partition.get('format', False): + elif partition.get('wipe', False): if not partition['device_instance']: raise DiskError(f"Internal error caused us to loose the partition. Please report this issue upstream!") @@ -150,7 +150,7 @@ class Filesystem: def partprobe(self) -> bool: result = SysCommand(f'partprobe {self.blockdevice.device}') - + if result.exit_code != 0: log(f"Could not execute partprobe: {result!r}", level=logging.ERROR, fg="red") raise DiskError(f"Could not run partprobe: {result!r}") |