diff --git a/usr/lib/akshara/utils/update.py b/usr/lib/akshara/utils/update.py index 70f668d..b076630 100644 --- a/usr/lib/akshara/utils/update.py +++ b/usr/lib/akshara/utils/update.py @@ -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",