Update bootctl command for new --variables= option (#3396)

Co-authored-by: Anton Hvornum <torxed@archlinux.org>
This commit is contained in:
Korbin Bickel 2025-06-22 07:55:38 -04:00 committed by GitHub
parent 43963a1d8f
commit 46550221d1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 2 deletions

View File

@ -1174,10 +1174,13 @@ class Installer:
# Install the boot loader
try:
SysCommand(f'arch-chroot {self.target} bootctl {" ".join(bootctl_options)} install')
# Force EFI variables since bootctl detects arch-chroot
# as a container environemnt since v257 and skips them silently.
# https://github.com/systemd/systemd/issues/36174
SysCommand(f"arch-chroot {self.target} bootctl --variables=yes {' '.join(bootctl_options)} install")
except SysCallError:
# Fallback, try creating the boot loader without touching the EFI variables
SysCommand(f'arch-chroot {self.target} bootctl --no-variables {" ".join(bootctl_options)} install')
SysCommand(f"arch-chroot {self.target} bootctl --variables=no {' '.join(bootctl_options)} install")
# Loader configuration is stored in ESP/loader:
# https://man.archlinux.org/man/loader.conf.5