Skip to content

Commit

Permalink
Add note about elevation
Browse files Browse the repository at this point in the history
  • Loading branch information
MichalStrehovsky authored Sep 5, 2021
1 parent 1efba18 commit 6293a2e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion efi-no-runtime/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ Refer to the general instructions at the root of the repo.

## Booting the generated program

Note: producing VHDX requires running from an elevated command prompt. It will not work without elevation.

Running `build.cmd` should produce a BOOTX64.EFI file in the current directory. There are multiple ways to run this. QEMU with an EFI firmware should work. I use Hyper-V.

Running `build.cmd vhd` will produce a VHDX file for you that you can run on Hyper-V directly (it prompts for elevation, so don't be surprised). You need to create a new Gen 2 virtual machine in Hyper-V and attach the generated disk. Make sure to turn off Secure boot in the virtual machine: the EFI image is not signed.
Running `build.cmd vhd` will produce a VHDX file for you that you can run on Hyper-V directly. You need to create a new Gen 2 virtual machine in Hyper-V and attach the generated disk. Make sure to turn off Secure boot in the virtual machine: the EFI image is not signed.

Similarly, adding `-p:BuildVHDX=true` to the `dotnet publish` line (when using the `*.csproj` project) will produce a bootable VHDX.

0 comments on commit 6293a2e

Please sign in to comment.