fix: handle esp at /boot/efi
This commit is contained in:
parent
d492573916
commit
6a0e1d7596
1 changed files with 3 additions and 1 deletions
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue