Limine: use UUID for accessing boot partition if not same as ESP (#3267)

This commit is contained in:
mintsuki 2025-03-20 22:35:32 +01:00 committed by GitHub
parent 26194d6b47
commit 931f47a037
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 2 deletions

View File

@ -1349,6 +1349,10 @@ Exec = /bin/sh -c "{hook_command}"
kernel_params = ' '.join(self._get_kernel_params(root))
config_contents = 'timeout: 5\n'
path_root = 'boot()'
if efi_partition and boot_partition != efi_partition:
path_root = f'uuid({boot_partition.partuuid})'
for kernel in self.kernels:
for variant in ('', '-fallback'):
if uki_enabled:
@ -1360,9 +1364,9 @@ Exec = /bin/sh -c "{hook_command}"
else:
entry = [
'protocol: linux',
f'path: boot():/vmlinuz-{kernel}',
f'path: {path_root}:/vmlinuz-{kernel}',
f'cmdline: {kernel_params}',
f'module_path: boot():/initramfs-{kernel}{variant}.img',
f'module_path: {path_root}:/initramfs-{kernel}{variant}.img',
]
config_contents += f'\n/Arch Linux ({kernel}{variant})\n'