Skip to content

Commit

Permalink
Refactor _add_efistub_bootloader() use cmd list (#2127)
Browse files Browse the repository at this point in the history
  • Loading branch information
codefiles authored Sep 28, 2023
1 parent 3695c37 commit 7a9a934
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions archinstall/lib/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1076,23 +1076,22 @@ def _add_efistub_bootloader(

for kernel in self.kernels:
# Setup the firmware entry
label = f'Arch Linux ({kernel})'
loader = f"/vmlinuz-{kernel}"

cmdline = [
*microcode,
f"initrd=\\initramfs-{kernel}.img",
*kernel_parameters,
]

cmd = f'efibootmgr ' \
f'--disk {parent_dev_path} ' \
f'--part {boot_partition.partn} ' \
f'--create ' \
f'--label "{label}" ' \
f'--loader {loader} ' \
f'--unicode \'{" ".join(cmdline)}\' ' \
f'--verbose'
cmd = [
'efibootmgr',
'--disk', str(parent_dev_path),
'--part', str(boot_partition.partn),
'--create',
'--label', f'Arch Linux ({kernel})',
'--loader', f"/vmlinuz-{kernel}",
'--unicode', ' '.join(cmdline),
'--verbose'
]

SysCommand(cmd)

Expand Down

0 comments on commit 7a9a934

Please sign in to comment.