Skip to content

Commit

Permalink
Minor fixes for UKI (#2279)
Browse files Browse the repository at this point in the history
  • Loading branch information
codefiles authored Dec 1, 2023
1 parent dc477fb commit 2aeb1b5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
13 changes: 6 additions & 7 deletions archinstall/lib/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ def minimal_installation(
SysCommand(f'/usr/bin/arch-chroot {self.target} chmod 700 /root')

if mkinitcpio and not self.mkinitcpio(['-P']):
error(f"Error generating initramfs (continuing anyway)")
error('Error generating initramfs (continuing anyway)')

self.helper_flags['base'] = True

Expand Down Expand Up @@ -1157,11 +1157,10 @@ def _config_uki(

ucode = self._get_microcode()

esp = efi_partition.mountpoint

diff_mountpoint = None
if esp != Path('/efi'):
diff_mountpoint = str(esp)

if efi_partition.mountpoint != Path('/efi'):
diff_mountpoint = str(efi_partition.mountpoint)

image_re = re.compile('(.+_image="/([^"]+).+\n)')
uki_re = re.compile('#((.+_uki=")/[^/]+(.+\n))')
Expand Down Expand Up @@ -1190,12 +1189,12 @@ def _config_uki(
preset.write_text(''.join(config))

# Directory for the UKIs
uki_dir = self.target / esp.relative_to(Path('/')) / 'EFI/Linux'
uki_dir = self.target / efi_partition.relative_mountpoint / 'EFI/Linux'
uki_dir.mkdir(parents=True, exist_ok=True)

# Build the UKIs
if not self.mkinitcpio(['-P']):
error(f"Error generating initramfs (continuing anyway)")
error('Error generating initramfs (continuing anyway)')

def add_bootloader(self, bootloader: Bootloader, uki_enabled: bool = False):
"""
Expand Down
2 changes: 1 addition & 1 deletion schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
]
},
"uki": {
"description": "Set to true to use a unified kernel images",
"description": "Set to true to use unified kernel images",
"type": "boolean"
},
"custom-commands": {
Expand Down

0 comments on commit 2aeb1b5

Please sign in to comment.