1

I installed windows 10 using USB in UEFI mode
USB (MBR)
installation target (GPT)

the USB installation media (created on Ubuntu) dual boots Ubuntu and Windows 10 using grub.

menuentry "Windows 10" {
    insmod ntfs
    insmod part_msdos
    insmod search_fs_uuid
    insmod chain
    insmod part_gpt
    search --set=root --label windows --hint hd0,msdos2
    chainloader /efi/boot/bootx64.efi
}

so I create partition on target media, click next, it starts copying files
after windows finishes installation and reboots, it doesn't boot.

on installation media, I use diskpart and find out that there is no EFI (fat32) partition.
there are:
16MB MSR partition (Microsoft System Reserved)
120GB Windows partition

how do I create the EFI partition ? (filled with stuff to make it boot)


(the title was my first search)

1 Answer 1

3

boot into installation media, Shift + 10 to open cmd.

"create EFI (fat32) partition"

taken from http://woshub.com/how-to-repair-deleted-efi-partition-in-windows-7

diskpart
list disk
select your disk
select disk 0
list partition
if you need to delete a partition:
     select the parition you want to delete
     select partition 3
     delete partition override
     just to be sure, list and reselect your disk
create partition efi size=100
format quick fs=fat32 label="System"
assign an unused letter (ex: A,B,K,G,...) for the next step
assign letter=A
exit

"fill with stuff to make it boot"

taken from http://woshub.com/how-to-repair-uefi-bootloader-in-windows-8

make directory
mkdir A:\EFI\Microsoft\Boot
cd into it:
     A:
     cd efi\mic*
     cd boot
OR
     cd /d A:\efi\microsoft\boot
your Windows volume should be C:, if not, change the letter or assign letter
bcdboot C:\Windows /s a: /f UEFI /v

  • a: is installation target
  • C:\Windows – is the path to the directory with Windows 10 installed;
  • /f ALL – means that you want to copy the Windows Boot Environment files, including those for UEFI and BIOS computers (potential ability to boot in UEFI and BIOS systems). To copy only the EFI bootloader, use the /f UEFI command;
  • /l en-us — is a type of the system locale. By default, en-us – English (USA) is used;
  • /c – this is a new BCDBoot option in Windows 10 that allows you to overwrite existing boot records (including debugsettings). Use this option to ignore old boot settings and create a clean BCD configuration;
  • /v – used to enable BCDBoot verbose output.

if it says successful, you may now reboot
else, read here for errors http://woshub.com/how-to-repair-uefi-bootloader-in-windows-8
1
  • Thanks for this, it fixed my issue after several hours of troubleshooting. Oct 25, 2023 at 15:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .