memtest86plus / windows-installer

Windows USB Installer for Memtest86+
GNU General Public License v2.0
7 stars 1 forks source link

UEFI and GPT boot is broken #1

Closed mirh closed 1 year ago

mirh commented 2 years ago

https://github.com/memtest86plus/windows-installer/blob/3a3f956678a0639a20a49c8a9c4d533a90f17f51/script/MT86Plus%20USB%20Installer.nsi#L155

First, the partition table isn't specified (not that you could, with this simple utility), and so whatever the current scheme is will be reused. (of note that the warnings in the drive select window are wrong, since you are just working on a single partition and never on the whole drive).

And if it's GPT I found no way to make it work. I originally thought the issue was just Windows creating a normal volume with type ebd0a0a2-b9e5-4433-87c0-68b6b72699c7, when it should be c12a7328-f81f-11d2-ba4b-00a0c93ec93b.. but even after forcing it my pc isn't happy.

In order to do anything at all, I had to convert the disk to mbr and then use legacy boot.

x86fr commented 2 years ago

Yes, GPT is not supported (but I don't really understand why using GPT on a USB Flash Drive).

mirh commented 2 years ago

I can guess in my case, it happened the last time I used rufus to set up a windows iso on the same stick. But to be sure there are many other ways this can happen (if it isn't already the default for many vendors in the year of the lord 2022).

If GPT is not supported though, then how can you claim to be even compatible with UEFI at all? I mean, I believe at least with CSM it should still technically be possible to do something more (either "bios boot from gpt" or "uefi boot from mbr"?) but in my quick testing anything but the most old and vanilla boot option didn't do anything.

x86fr commented 2 years ago

There's a misunderstanding here. UEFI does not "boot" on a media like BIOS used to do with MBR. UEFI just scans drives for a filesystem it can read (FAT32, NTFS, ...) and look for a \efi\boot\bootx64.efi file. Nothing more.

The part of Windows Installer which creates a MBR record using syslinux on a FAT32 formatted drives (or format it) is only used by BIOS or CSM. For UEFI, the Windows Installer just rename memtest64.efi to bootx64.efi and put it on the \efi\boot\ path.

You can do that manually on any drives (including GPT) and it will "boot" just fine.