Skip to content

Commit f30f817

Browse files
committed
rev
1 parent 81c605b commit f30f817

File tree

2 files changed

+3
-45
lines changed

2 files changed

+3
-45
lines changed

archinstoo/archinstall/lib/disk/device_handler.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
)
3939
from archinstall.lib.models.users import Password
4040
from archinstall.lib.output import debug, error, info
41-
from archinstall.lib.utils.env import Os
4241

4342
from .luks import Luks2
4443
from .utils import (
@@ -56,9 +55,6 @@ class DeviceHandler:
5655
def __init__(self) -> None:
5756
self._devices: dict[Path, BDevice] = {}
5857
self._partition_table = PartitionTable.default()
59-
if Os.get_env('ARCHINSTALL_SKIP_DEVICE_PROBE') == '1':
60-
debug('Skipping device probe due to ARCHINSTALL_SKIP_DEVICE_PROBE=1')
61-
return
6258
self.load_devices()
6359

6460
@property

archinstoo/archinstall/lib/installer.py

Lines changed: 3 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
DiskLayoutConfiguration,
2222
EncryptionType,
2323
FilesystemType,
24-
LsblkInfo,
2524
LvmVolume,
2625
PartitionModification,
2726
SectorSize,
@@ -992,23 +991,6 @@ def _get_luks_uuid_from_mapper_dev(self, mapper_dev_path: Path) -> str:
992991

993992
return lsblk_info.children[0].uuid
994993

995-
def _find_crypt_parent(self, dev_path: Path) -> LsblkInfo | None:
996-
try:
997-
lsblk_info = get_lsblk_info(dev_path, reverse=True, full_dev_path=True)
998-
except DiskError as err:
999-
debug(f'Unable to determine crypt parent for {dev_path}: {err}')
1000-
return None
1001-
1002-
def _walk(node: LsblkInfo) -> LsblkInfo | None:
1003-
if node.type == 'crypt':
1004-
return node
1005-
for child in node.children:
1006-
if found := _walk(child):
1007-
return found
1008-
return None
1009-
1010-
return _walk(lsblk_info)
1011-
1012994
def _get_kernel_params_partition(
1013995
self,
1014996
root_partition: PartitionModification,
@@ -1018,27 +1000,8 @@ def _get_kernel_params_partition(
10181000
kernel_parameters = []
10191001

10201002
if root_partition in self._disk_encryption.partitions:
1021-
crypt_parent = self._find_crypt_parent(root_partition.safe_dev_path)
1022-
if crypt_parent and crypt_parent.path != root_partition.safe_dev_path:
1023-
uuid = self._get_luks_uuid_from_mapper_dev(crypt_parent.path)
1024-
debug(f'Root partition is inside encrypted device, identifying by UUID: {uuid}')
1025-
kernel_parameters.append(f'cryptdevice=UUID={uuid}:{crypt_parent.name}')
1026-
1027-
if id_root:
1028-
if partuuid and root_partition.partuuid:
1029-
debug(
1030-
f'Identifying root partition inside LUKS by PARTUUID: {root_partition.partuuid}',
1031-
)
1032-
kernel_parameters.append(f'root=PARTUUID={root_partition.partuuid}')
1033-
elif root_partition.uuid:
1034-
debug(
1035-
f'Identifying root partition inside LUKS by UUID: {root_partition.uuid}',
1036-
)
1037-
kernel_parameters.append(f'root=UUID={root_partition.uuid}')
1038-
else:
1039-
raise ValueError('Root partition UUID could not be determined')
1040-
1041-
return kernel_parameters
1003+
# TODO: We need to detect if the encrypted device is a whole disk encryption,
1004+
# or simply a partition encryption. Right now we assume it's a partition (and we always have)
10421005

10431006
if partuuid:
10441007
debug(f'Root partition is an encrypted device, identifying by PARTUUID: {root_partition.partuuid}')
@@ -1498,8 +1461,7 @@ def _add_limine_bootloader(
14981461
hook_path.write_text(hook_contents)
14991462

15001463
kernel_params = ' '.join(self._get_kernel_params(root))
1501-
config_contents = '# Created by archinstall\n'
1502-
config_contents += 'timeout: 5\n'
1464+
config_contents = 'timeout: 5\n'
15031465

15041466
path_root = 'boot()'
15051467
if efi_partition and boot_partition != efi_partition:

0 commit comments

Comments
 (0)