Seems to me that this my little trip to the Windows land might actually trigger me to learn a thing or two about that OS. Naturally, I’m also planning to jot those things down here.
So while installing Windows to spare NVMe drive it decided to place its bootloader to existing EFI partition where up until then only Fedora had its EFI image. This behavior doesn’t suits me as I can’t offline drive while in windows and then pass it through to the Hyper-V machine (long story…).
Without further ado, to migrate EFI partition and install Windows boot files I had to do following:
- Start cmd.exe as administrator
- Find correct disk with
- Select that disk with
- List partitions with
- Select that partition with
- Shrink partition with (size in MB)
- Create new EFI partition with
create partition efi size=200
- Format partition as FAT32 with
format quick fs=fat32
- Assign letter to that new partition with
assign letter=y(can be free letter of your choosing)
Now to install boot files one can use:
bcdboot C:\Windows /s Y:
Make sure to replace
Y: with proper device names. My Windows install is from its own perspective on
C:\ thus command above.
After that’s done, make sure to re-order your boot order in BIOS/UEFI settings. If old drive is still being loaded prior to this one, Windows won’t let you offline that old drive.