index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Anton Hvornum <anton.feeds@gmail.com> | 2021-03-09 10:41:57 +0100 |
---|---|---|
committer | Anton Hvornum <anton.feeds@gmail.com> | 2021-03-09 10:41:57 +0100 |
commit | 1f62a97c902bf0697e7502ec7f9e17c13147390b (patch) | |
tree | 9b618ab546f9e8f3d884247ec73e9680f90c6224 | |
parent | 16b0f4a4a48e6e0363db653a6ec1cedbb4741647 (diff) |
-rw-r--r-- | archinstall/lib/disk.py | 5 | ||||
-rw-r--r-- | examples/guided.py | 4 |
diff --git a/archinstall/lib/disk.py b/archinstall/lib/disk.py index 92982499..7d4a34c6 100644 --- a/archinstall/lib/disk.py +++ b/archinstall/lib/disk.py @@ -352,6 +352,11 @@ class Filesystem(): b''.join(sys_command(f'sync')) return True + def find_root_partition(self): + for partition in self.blockdevice: + if partition.target_mountpoint == '/' or partition.mountpoint == '/': + return partition + def raw_parted(self, string:str): x = sys_command(f'/usr/bin/parted -s {string}') o = b''.join(x) diff --git a/examples/guided.py b/examples/guided.py index 13bf2414..ebdd3678 100644 --- a/examples/guided.py +++ b/examples/guided.py @@ -276,6 +276,10 @@ with archinstall.Filesystem(archinstall.arguments['harddrive'], archinstall.GPT) if archinstall.arguments['harddrive'].keep_partitions is False: fs.use_entire_disk(root_filesystem_type=archinstall.arguments.get('filesystem', 'btrfs'), encrypt_root_partition=archinstall.arguments.get('!encryption-password', False)) + # Otherwise, check if encryption is desired and mark the root partition as encrypted. + elif archinstall.arguments.get('!encryption-password', None): + root_partition = fs.find_root_partition() + root_partition.encrypted = True # After the disk is ready, iterate the partitions and check # which ones are safe to format, and format those. |