If you are trying to restore a boot using Windows 10/11 installed on GPT partition from the command line (bootrec /fixboot) in recovery mode of the installation media and getting the error “Access denied”, do the following:
- Run the commands
diskpart list volume
looking for the number of FAT32 partition with the EFI bootloader, and also current letter of our system’s drive C (might be another or also can be not assigned)
- Choosing partition with the bootloader an assigning the letter:
select volume N assign letter=L
Instead of N needs to use the number of the partition and instead of L any currently not used drive letter.
- If the system drive (C) is also without letter, assigning the letter same way
- Enter exit to close DISKPART.
- Executing the follwong command (use your drive letters instead, C in this example is where the system stored, L – assigned by us letter of the EFI partition)
bcdboot C:\windows /s L: /f UEFI