memtest86plus / windows-installer

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

USB Installer creates only 32bit version of mt86plus (no 64bit version) for use with CSM (Legacy BIOS Mode via SYSLINUX) #6

Open obiwan-bartek opened 2 years ago

obiwan-bartek commented 2 years ago

I can see some inconsistency. The "Windows USB Installer" creates USB Flash that contains mt86+ in flavors:

The "Linux ISO w/ GRUB (64 bits)" ISO contains mt86+ UEFI x64 (64 bit) AND mt86+ for Legacy BIOS Boot in x64 (64bit) flavor!

Why not add this mt86+ for Legacy BIOS Boot in 64bit flavor to USB installer as well? That way the USB Installer will create as universal Flash as can be (both, UEFI32 and UEFI64, and also Legacy BIOS 32bit and Legacy BIOS 64bit).

_In fact I have tried this (just copy the "\boot\memtest" image from the GRUB flavor ISO, onto the flash drive created via "Windows USB Installer", changed it's name to eg, "mt8664", and added an appropriate entry in syslinux.cfg to add the image. And it works OK. Both 32 bit and 64 bit flavors of MemTest86plus for Legacy BIOS Boot can be in the same medium, and both of them works.

x86fr commented 2 years ago

The goal is to build an universal USB key, able to boot on any system. UEFI auto-select the required binary (32 vs 64b) but CSM uses the default 32 bit binary.

Solving this requires a selection of the CSM binary by the user on the installer OR a way to autodetect a 64bit CPU within syslinux.

obiwan-bartek commented 1 year ago

Why selection of the CSM binary by the user on the installer? The installer can create both binaries on USB flash, and add 2 menu items for them in syslinux/grub menu, selecting the 32bit as the default one (as it will work on either 32 and 64 bits). If a user wants to use 64bit, it can do it by selecting this flavor in boot menu.

As for the second way, there is a syslinux module named ifcpu64.c32 which does exactly this. https://wiki.syslinux.org/wiki/index.php?title=Ifcpu64.c32

But for my perspective, I think that a better way is to leave the choice of booted version to the user. Or set the default option in boot menu to autoselect using ifcpu64.c32, and the second and third options to "force 32b" and "force 64b".

x86fr commented 1 year ago

The ifcpu64.c32 is probably the way to go. I'll try to add this as soon as possible.