fix: handle esp at /boot/efi

This commit is contained in:
Rudra Saraswat 2026-04-04 03:48:43 +01:00
parent d492573916
commit 6a0e1d7596

View file

@ -191,6 +191,7 @@ def handle_boot(new_rootfs: RootFS, boot_config: dict) -> None:
stderr=subprocess.DEVNULL,
)
merge_into_tree("/boot", "/.boot.bkp")
subprocess.run(["mv", "/.update_rootfs", "/.old.update_rootfs"])
if boot_config["type"] == "bios":
if boot_config["loader"] == "grub":
@ -215,11 +216,12 @@ def handle_boot(new_rootfs: RootFS, boot_config: dict) -> None:
exit(1)
elif boot_config["type"] == "uefi":
if boot_config["loader"] == "grub":
efi_directory = "/boot/efi" if os.path.isdir("/boot/efi/EFI") else "/boot"
if (
new_rootfs.exec_chroot(
[
"grub-install",
"--efi-directory=/boot",
f"--efi-directory={efi_directory}",
"--target=x86_64-efi",
"--removable",
"--bootloader-id=blendOS",