ValdikSS/windows2usb

UEFI boot menu entries reset to "Windows Boot Manager" after booting created USB

intgr opened this issue · 6 comments

intgr commented

As per request at https://aur.archlinux.org/packages/windows2usb-git/ here's a bug report.

On two occasions I wrote a USB stick using the ISO image from https://www.microsoft.com/en-us/software-download/windows10ISO (Windows 10 May 2019 Update). I tried to boot it first in EFI mode and then legacy, both methods failed. Both times, after this was tried, all EFI boot entries were gone and a just a "Windows Boot Manager" entry appeared.

I haven't the faintest how this happened, as you say "It doesn't have such code." For all I know it could be a firmware issue on my motherboard, that it crashed due to something on the USB and thought it needed to reset boot entries to defaults. It's an ancient crappy motherboard, MSI B75A-G43 with last BIOS update from 2013.

I also tried https://github.com/slacka/WoeUSB a few times. It did not boot in EFI mode either, but did boot in legacy mode. And EFI boot entries were not cleared. In the end, the installer didn't work anyway (got some dreaded message "We couldn't create a new partition or locate an existing one". FML)

So after spending two evenings on this, I ended up installing Windows inside a VM and then creating EFI boot entries manually, it worked!

I don't know what could cause such issue. The only external component used in boot process is UEFI-NTFS, but it's used only if you created USB drive in gptntfs mode.
I don't know why it didn't boot in BIOS mode if you created it in mbr mode.
I assume you have a very buggy BIOS. Could you post exact commands/modes you used to create your installation drive?

@intgr Did you debug this issue? Have you tried some other software, like Rufus?

intgr commented

Other than WoeUSB I didn't try anything else. I solved it by running the Windows installer in a VM instead.

But apparently it's default behavior in Windows 10 to always put itself as the default boot option. Every time I boot into Windows it's wrong again.

I can confirm Windows 10 setting itself at first place in UEFI boot order, which is unrelated to this project.

intgr commented

But for some reason with the windows2usb boot image, all other boot entries were deleted. I don't have an explanation for that, not sure if windows2usb had anything to do with it or not. But Windows does not normally do that -- it only changes the boot order.

windows2usb uses all stock Windows boot loaders and other files. The only third-party component is uefi-ntfs from Rufus project, which is used only in gptntfs mode, but it shouldn't change any boot records.
I believe your problem is caused not by windows2usb but by buggy motherboard firmware. I've tested windows2usb on different motherboards and different UEFI implementations (apito, insyde, tianocore) and had no issues.
I'm closing this bug. If someone reports something similar to this bug with windows2usb, I'll reopen it.