Skip to content

Commit c1c562c

Browse files
committed
Put Limine config and BIOS files in a limine/ subdir
1 parent aa44474 commit c1c562c

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

archinstall/lib/installer.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1242,6 +1242,7 @@ def _add_limine_bootloader(
12421242
info(f"Limine boot partition: {boot_partition.dev_path}")
12431243

12441244
limine_path = self.target / 'usr' / 'share' / 'limine'
1245+
config_path = None
12451246
hook_command = None
12461247

12471248
if SysInfo.has_uefi():
@@ -1261,19 +1262,26 @@ def _add_limine_bootloader(
12611262
except Exception as err:
12621263
raise DiskError(f'Failed to install Limine in {self.target}{efi_partition.mountpoint}: {err}')
12631264

1265+
config_path = efi_dir_path / 'limine.conf'
1266+
12641267
hook_command = (
12651268
f'/usr/bin/cp /usr/share/limine/BOOTIA32.EFI {efi_partition.mountpoint}/EFI/BOOT/'
12661269
f' && /usr/bin/cp /usr/share/limine/BOOTX64.EFI {efi_partition.mountpoint}/EFI/BOOT/'
12671270
)
12681271
else:
1272+
boot_limine_path = self.target / 'boot' / 'limine'
1273+
boot_limine_path.mkdir(parents=True, exist_ok=True)
1274+
1275+
config_path = boot_limine_path / 'limine.conf'
1276+
12691277
parent_dev_path = device_handler.get_parent_device_path(boot_partition.safe_dev_path)
12701278

12711279
if unique_path := device_handler.get_unique_path_for_device(parent_dev_path):
12721280
parent_dev_path = unique_path
12731281

12741282
try:
12751283
# The `limine-bios.sys` file contains stage 3 code.
1276-
shutil.copy(limine_path / 'limine-bios.sys', self.target / 'boot')
1284+
shutil.copy(limine_path / 'limine-bios.sys', boot_limine_path)
12771285

12781286
# `limine bios-install` deploys the stage 1 and 2 to the
12791287
SysCommand(f'arch-chroot {self.target} limine bios-install {parent_dev_path}', peek_output=True)
@@ -1282,7 +1290,7 @@ def _add_limine_bootloader(
12821290

12831291
hook_command = (
12841292
f'/usr/bin/limine bios-install {parent_dev_path}'
1285-
f' && /usr/bin/cp /usr/share/limine/limine-bios.sys /boot/'
1293+
f' && /usr/bin/cp /usr/share/limine/limine-bios.sys /boot/limine/'
12861294
)
12871295

12881296
hook_contents = f'''[Trigger]
@@ -1325,7 +1333,6 @@ def _add_limine_bootloader(
13251333
config_contents += f'\n/Arch Linux ({kernel}{variant})\n'
13261334
config_contents += '\n'.join([f' {it}' for it in entry]) + '\n'
13271335

1328-
config_path = self.target / 'boot' / 'limine.conf'
13291336
config_path.write_text(config_contents)
13301337

13311338
self.helper_flags['bootloader'] = "limine"

0 commit comments

Comments
 (0)