Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boot 64 bit Windows on 32 Bit UEFI? #2

Open
archeYR opened this issue Feb 13, 2020 · 71 comments
Open

Boot 64 bit Windows on 32 Bit UEFI? #2

archeYR opened this issue Feb 13, 2020 · 71 comments

Comments

@archeYR
Copy link

archeYR commented Feb 13, 2020

There are some tablets/cheap laptops with an x64 capable processor, that are crippled by 32 bit UEFI firmware, thus these can boot 32 bit Windows only. Could it be possible to load 64 bit Windows on 32 bit version of quibble (reverse of what is mentioned in To-do list)? Thank you for your work in any case.

@maharmstone
Copy link
Owner

I wasn't aware of that! Yes, if that's happening, it'd make sense to have amd64-on-x86 support as well.

@Manouchehri
Copy link

If you’re curious, I wrote about the backstory about half a decade ago: Manouchehri/vi8#4 (comment)

@amluto
Copy link

amluto commented Feb 21, 2020

(I’m a Linux kernel person.)

Linux supports 64-bit kernels on 32-bit UEFI. There is special kernel support for runtime services, and I doubt Windows has this support. The best way to support this on Windows is probably to tell Windows that runtime services are not available.

@1nikolas
Copy link

1nikolas commented Apr 25, 2020

If you were wondering why these cheap laptops/tablets can boot only 32 bit uefi here is a good explanation from Intel themselves. Essentially Intel makes cheap motherboards for computer manufactures which are prebuilt with ram, soc (integrated cpu), soundcard etc. So what they say in the blog post is that a cheap laptop with 32gb/64gb emmc and 2gb of ram can't benefit from a 64bit os. This is kinda true but since most apps are now dropping 32bit support, there is actually a benefit of doing that. If we can manage to boot 64 bit Windows on a locked firmware which only supports 32 bit uefi, we can install a lighter custom version of Windows 10 or even Windows 7/8. But is it possible though?

@maharmstone
Copy link
Owner

It's definitely theoretically possible - there's no problem booting a 64-bit OS from a 16-bit BIOS, after all. It'll just take some work.

From the article:

This means your Black Friday special purchase with 2GB of RAM and 16-32GB of internal flash storage doesn't see any 64-bit architecture benefits.

This is flat-out wrong. Off the top of my head, you have more registers, you have the lack of segmentation speeding things up slightly, you have RIP-relative addressing speeding up rebasing, and you have a faster calling convention. Apart from that...

@z4v4l
Copy link

z4v4l commented May 7, 2020

https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/uefi-requirements-that-apply-to-all-windows-platforms

Windows expects Runtime Services. And apparently their bitness must be the same as the OS. (and it's a reasonable assumption. not counting cases, when it's made due "because we can" reasons. Windows also could have "da speshul kernal support" for mismatched bitness RTS (after all, there is WoW) but why could it be needed except to show off?)

@maharmstone
Copy link
Owner

Yep, I've already twigged that. If you were booting 64-bit Windows from 32-bit UEFI or vice versa, you'd have to forego Runtime Services and convince Windows it was doing an old-fashioned BIOS boot. That's the way Quibble worked through most of its development, so that's not an issue.

@ShadowEO
Copy link

It should also be noted that a lot of these machines also lack CSM support (such as in my case with the NuVision TMAX TM101W638L) and loads of vendors refuse to update their BIOS since Connected Standby now is supported on 64-bit.

If you can pull this feat off, I'd be glad to test it out as I've been longing to run 64-bit Windows on this machine for WSL support (and my guilty pleasure, WoW, which dropped 32-bit support two years ago).

@dimasirfandanu
Copy link

is this released yet?

@sidliu2000
Copy link

I have an older onda v919 z3975 atom that is similar. It is still a very capable machine with 4 core. would be great to run 64 bit windows or linux or even chromeos. But UEFI is crippled to 32 bit.

@1nikolas
Copy link

1nikolas commented Dec 13, 2020

I have an older onda v919 z3975 atom that is similar. It is still a very capable machine with 4 core. would be great to run 64 bit windows or linux or even chromeos. But UEFI is crippled to 32 bit.

Running 64bit Windows would depend on this project.

Linux you can run 64bit (in fact you can't run 32bit linux on uefi afaik). On most of the distros you will need to add an efi file to the installer and then boot again to the live cd after the install to add that file to your installation in order for it to boot (you dont need to do this on fedora official and arch custom builds).

Chromeos you can run 32bit only but in my case, eventhough the laptop I have has a chromeos version, it doesn't boot no matter what I do..

Btw I have a Lenovo 100s-11iby

@sidliu2000
Copy link

Why chromeos can run only 32 bit? Chromeos should be 64 bit only by now.

@1nikolas
Copy link

Why chromeos can run only 32 bit? Chromeos should be 64 bit only by now.

I mean in a locked firmware where you can only boot 32bit uefi. There is no trick to boot the 64bit version afaik

@sidliu2000
Copy link

I am hoping this Quibble project might be able to help.

@1nikolas
Copy link

1nikolas commented Dec 13, 2020

I am hoping this Quibble project might be able to help.

The readme says:

Quibble is the custom Windows bootloader

So it won't help :( It's only for Windows

@phuclv90
Copy link

phuclv90 commented Feb 8, 2021

(I’m a Linux kernel person.)

Linux supports 64-bit kernels on 32-bit UEFI. There is special kernel support for runtime services, and I doubt Windows has this support. The best way to support this on Windows is probably to tell Windows that runtime services are not available.

Indeed to run 64-bit Linux on a 32-bit UEFI a thunking layer is needed to convert things between the 32 and 64-bit ABIs. The kernel needs to be built with CONFIG_EFI_MIXED=y to have that capability. But since Windows has always require the bitness of the OS the match that of UEFI, I don't think MS will spend time creating that thunking layer for Windows

@binarymaster
Copy link

I don't think MS will spend time creating that thunking layer for Windows

I see this problem bothers a lot of people, so I think this problem will be addressed in ReactOS at some point.

@phuclv90
Copy link

phuclv90 commented Feb 8, 2021

Anyway I don't know what this has to do with quibble, because it's a mainly kernel thing instead of bootloader. If it's just because of the bootloader I guess you can just boot up TianoCore then boot 64-bit Windows from it without problem. I'm not sure if it TianoCore currently supports booting from 32-bit UEFI or not but I've did that to boot 64-bit Windows from GPT disk on a BIOS system. There may be other methods as well: Installing Windows x64 on 32-bit UEFI (EFI-IA32) via GRUB

@1nikolas
Copy link

1nikolas commented Feb 8, 2021

Anyway I don't know what this has to do with quibble, because it's a mainly kernel thing instead of bootloader. If it's just because of the bootloader I guess you can just boot up TianoCore then boot 64-bit Windows from it without problem. I'm not sure if it TianoCore currently supports booting from 32-bit UEFI or not but I've did that to boot 64-bit Windows from GPT disk on a BIOS system. There may be other methods as well: Installing Windows x64 on 32-bit UEFI (EFI-IA32) via GRUB

that method doesn't work unfortunately. It just tells you to chainload the windows x64 boot file from grub which throws an error

@ShadowEO
Copy link

ShadowEO commented Mar 8, 2021

Anyway I don't know what this has to do with quibble, because it's a mainly kernel thing instead of bootloader. If it's just because of the bootloader I guess you can just boot up TianoCore then boot 64-bit Windows from it without problem. I'm not sure if it TianoCore currently supports booting from 32-bit UEFI or not but I've did that to boot 64-bit Windows from GPT disk on a BIOS system. There may be other methods as well: Installing Windows x64 on 32-bit UEFI (EFI-IA32) via GRUB

This method doesn't work, it only works with Linux, I've tried it multiple different ways and can't get Grub EFI to chainload a 64-bit Windows EFI executable. Your suggestion for TianoCore also doesn't help those that can't boot into CSM mode, such as these tablets that are locked into IA32 UEFI only (despite having a 64-bit capable Atom in them). Without CSM mode, you can't boot into Duet which is a requirement for that method.

@Gelip
Copy link

Gelip commented Mar 10, 2021

If you compiled quibble as EBC (EFI Byte Code), can you run Windows 32-bit on UEFI 64-bit or Windows 64-bit on UEFI 32-bit?

@Prototyped
Copy link

Lenovo's ThinkPad 8 from 2014, then reviewed as the Rolls Royce of small Windows tablets, has several SKUs that are stuck with a 32-bit-only, no-CSM UEFI. These Bay Trail tablets support Connected Standby, presumably why they launched with 32-bit only UEFI. They only have 2 GB RAM, so the utility of 64-bit Windows (which is considerably more memory hungry than 32-bit Windows) is limited, but it would be cool to at least have the option.

I have booted the Lubuntu 64-bit live ISO off the 32-bit UEFI, so Linux is clearly fine with it. Windows definitely isn't.

@ShadowEO
Copy link

@Prototyped Linux has the ability to take over Runtime Services within it's kernel, essentially replacing the running UEFI implementation with itself. Grub sets this up and then the kernel finishes it. Since the kernel essentially takes the UEFI environment out of play, it can boot itself in 64-bit. Windows however doesn't have this ability.

@TheMadHau5
Copy link

@Prototyped Linux has the ability to take over Runtime Services within it's kernel, essentially replacing the running UEFI implementation with itself. Grub sets this up and then the kernel finishes it. Since the kernel essentially takes the UEFI environment out of play, it can boot itself in 64-bit. Windows however doesn't have this ability.

May I know how and where this is implemented?

@phuclv90
Copy link

phuclv90 commented Apr 14, 2021

@TheMadHau5
May I know how and where this is implemented?

It's a thunking layer that MS simply just doesn't bother spending effort writing. Here are the related commits

@mirh
Copy link

mirh commented Apr 15, 2021

Take note that until some refactoring in early 2020, some "legit effort by bootloader" was also needed.

@maharmstone
Copy link
Owner

systemd contains EFI code? Why am I not surprised...

You can write EFI runtime services drivers that stay resident while the OS is running - that'd be one way to implement a thunking layer. Or you could just fake it, depending on exactly which runtime services Windows actually uses.

@mirh
Copy link

mirh commented Apr 15, 2021

Systemd merged gummiboot a long time ago, but it could have been as well an entirely different project.
They don't really share anything AFAIK and it's also probably the leanest bootloader out there.

@Juli199696
Copy link

Juli199696 commented May 11, 2021

Im also very interested in this Topic. Got an Z3736 Board with 32Bit Efi and 32bit Windows.

Also the reason i know that why many of that boards are 32bit is that in that time Intel annouced the Baytrail Atom chips the 64bit efi was not ready for release and a little buggy. So the developers of the boards where forced to use the 32bit version. I dont know if that is true but thats what i have read in the internet about that topic. So are there any news about it?

@1nikolas
Copy link

1nikolas commented May 11, 2021

Im also very interested in this Topic. Got an Z3736 Board with 32Bit Efi and 32bit Windows.

Also the reason i know that why many of that boards are 32bit is that in that time Intel annouced the Baytrail Atom chips the 64bit efi was not ready for release and a little buggy. So the developers of the boards where forced to use the 32bit version. I dont know if that is true but thats what i have read in the internet about that topic. So are there any news about it?

Intel's explanation is that the systems with 2gb of ram are not going to be compatible with x64 Windows 10 so there is no point of supporting x64 UEFI

A 64-bit OS does theoretically perform better than a 32-bit OS, but those performance gains are tied to larger amounts of memory (over 4GB). The 64-bit version of Windows takes up more disk space, thanks to larger binaries (hello, bigger opcodes) and any underlying 64/32-bit translation layers. This means your Black Friday special purchase with 2GB of RAM and 16-32GB of internal flash storage doesn't see any 64-bit architecture benefits.

@1nikolas
Copy link

My tabled has 4gb,and because of this limitation i can't even use all the ram,what a waste

Yeah that's dumb. In your case it will be useful. But in most cases these devices only have 1 or 2gb of ram (like mine)

@SupertigerDev
Copy link

@1nikolas Windows 11 works even with 1gb ram on a VM.

@1nikolas
Copy link

@1nikolas Windows 11 works even with 1gb ram on a VM.

the fact that it runs doesn't mean it's usable. With no apps running it should be at like 80% ram. Anyway we can try that if this gets done some day

@SupertigerDev
Copy link

@1nikolas mhm I don't really mind about how usable it will be to be honest 😂 I just wanna see it

@ShadowEO
Copy link

ShadowEO commented Jul 9, 2021

The problem could be installing it, puppyLinux run entirely on RAM,and i can save data on external storage,so i don't need to install anything on the computer,if i try to fully install something i think that the bootloader will just not boot the os on the hard drive(happened to other users of the tablet)

Yeah installing 64bit Windows would be ideal but it seems that @maharmstone doesn't have the time to implement that. The issue is open for 1.5 years..

It's more that it's a huge ask to implement. The Linux Kernel can do this because it takes over Runtime Services, but there's no such mechanism in Windows and the thunking between the binary architectures would need to be implemented outside of Windows.

One way I see around this problem would be to use a bare-metal 64-bit client hypervisor (such as Xen or XenClient, if one can find a good copy or get OpenXT to work on their hardware) and use that, as many of these machines do natively support VT-x and can run 64-bit VMs through that support. That does strip the user of GPU and certain hardware support, but you would essentially be running 64-bit Windows on the ia32-locked platform.

@SupertigerDev
Copy link

@ShadowEO But can I interact with the os on the same device?

@ShadowEO
Copy link

ShadowEO commented Aug 2, 2021

@ShadowEO But can I interact with the os on the same device?

I am unsure, I haven't been able to install OpenXT in a VM with nested virtualization to try it out. I don't want to install it on my main machine to try it because I need the machine for work.

XenClient was a bare-metal hypervisor that would indeed let you interact with the OS on the same device. OpenXT is supposed to be an open source replacement for XenClient, so I would assume.

@IminatoPo
Copy link

IminatoPo commented Aug 5, 2021

I have an older onda v919 z3975 atom that is similar. It is still a very capable machine with 4 core. would be great to run 64 bit windows or linux or even chromeos. But UEFI is crippled to 32 bit.

Running 64bit Windows would depend on this project.

Linux you can run 64bit (in fact you can't run 32bit linux on uefi afaik). On most of the distros you will need to add an efi file to the installer and then boot again to the live cd after the install to add that file to your installation in order for it to boot (you dont need to do this on fedora official and arch custom builds).

Chromeos you can run 32bit only but in my case, eventhough the laptop I have has a chromeos version, it doesn't boot no matter what I do..

Btw I have a Lenovo 100s-11iby

I have the x205ta, and it has the same chip with Lenovo 100s-11iby, I installed Manjaro KDE 64bit version followed this guide below:
https://github.com/shane-eng/majaro_KDE_asus_X205TA

@ShadowEO
Copy link

ShadowEO commented Oct 1, 2021

This feature would literally save running modern versions of Windows on these devices now. Microsoft seems to have stopped providing 32-bit versions of Windows as of the upcoming 11, meaning these arbitrarily bit-locked tablets are essentially either Windows 10 only, or Linux machines from this point on.

@1nikolas
Copy link

1nikolas commented Oct 1, 2021

This feature would literally save running modern versions of Windows on these devices now. Microsoft seems to have stopped providing 32-bit versions of Windows as of the upcoming 11, meaning these arbitrarily bit-locked tablets are essentially either Windows 10 only, or Linux machines from this point on.

I mean, would these cheap devices even be compatible with Windows 11 anyways? (Cpu gen, tpm, ram, etc) Unless you do a 'hacky' install which would probably be insecure.

I personally installed Linux on my device because it was running slow on Windows 10. Let alone 11

@SupertigerDev
Copy link

SupertigerDev commented Oct 1, 2021

Linux doesn't run well on my tablet. I get audio issues such as when plugging in the headphone jack, audio is outputted from the device and the headphones at the same time. I have no way to fix it either :(

@1nikolas
Copy link

1nikolas commented Oct 1, 2021

Linux doesn't run well on my tablet. I get audio issues such as when plugging in the headphone jack, audio is outputted from the device and the headphones at the same time. I have no way to fix it either :(

Which distro did you try? My ideapad 100s sound works just fine. Maybe you need something with latest kernel (like Arch). Unless it's a hardware problem

@SupertigerDev
Copy link

I Think I tried mint Linux or something. I also tried Android x86 with the same problem. Definitely not hardware since it works fine in windows 10

@1nikolas
Copy link

1nikolas commented Oct 1, 2021

Try using ArchLinux (or RebornOS for a more user friendly ui) and see if it works there. Maybe it was a bug fixed on the latest kernel (which mint and ubuntu do not use)

@SupertigerDev
Copy link

tried installing rebornos os, it doesn't have bootai32.efi included so I downloaded it and put it in the correct file, it booted to the grub command line thing. I have tried to chainload or whatever but I get "unknown error". this seems complicated to install :/

@ShadowEO
Copy link

ShadowEO commented Oct 7, 2021

This feature would literally save running modern versions of Windows on these devices now. Microsoft seems to have stopped providing 32-bit versions of Windows as of the upcoming 11, meaning these arbitrarily bit-locked tablets are essentially either Windows 10 only, or Linux machines from this point on.

I mean, would these cheap devices even be compatible with Windows 11 anyways? (Cpu gen, tpm, ram, etc) Unless you do a 'hacky' install which would probably be insecure.

I personally installed Linux on my device because it was running slow on Windows 10. Let alone 11

I would like to point out that just because it's not considered "compatible" does not make it any less secure as long as there is indeed a TPM module, and yes, many of those devices do indeed have a TPM installed and available, and the processors are usually generally very capable, though the OEM decided to lock the system to running 32-bit only code.

@supertiger1234 This is perhaps not a good place to get into the topic of installing a linux distribution on one of these devices, look up "Intel Bay/Cherry Trail Atom Linux installation" (here's one though)

The message you're receiving is either due to your PC being EXACTLY what I described in this topic earlier (IA32 UEFI on a 64-bit processor, which locks out bootx64.efi booting) or you aren't a 64-bit machine at all. If you know your processor IS 64-bit capable, then you're using the wrong version of Grub (you need the IA32-AMD64 build, not the AMD64 build itself)

@SupertigerDev
Copy link

@ShadowEO I already googled how to install Linux. I followed their guide properly yet I still get this error. I've installed other Linux 64 bit versions fine, but not this one :/ the guide you sent already does what I did.

@ShadowEO
Copy link

ShadowEO commented Oct 8, 2021

Your distribution probably instance the wrong grub package. For these machines, on Debian derived distros, the correct package is grub-efi-amd64:i386

The :i386 at the end is crucial, as this installs a 64-bit capable grub EFI binary that can run under 32-bit

@SupertigerDev
Copy link

@ShadowEO well, someone above suggested me to try out rebornos. I don't see any :i386 images on their website :/ unless I'm blind.

@ShadowEO
Copy link

ShadowEO commented Oct 12, 2021

Here, download this Debian package here and extract it (if your distribution has a dpkg package, install it and use dpkg-deb to extract it). Take the BOOTIA32.EFI from the extracted contents, and put it with your already installed BOOTX64.EFI (on your ESP, or in the BOOT/EFI folder on the install media (this has so-so results and I've found myself manually typing the boot commands due to how most distribution install media). It should use the already installed Grub configuration files, and boot into your 64-bit Kernel.

This isn't the best place to talk about this BTW, installing a 64-bit version of Linux is far off-topic of this issue ticket, if you have further problems, I suggest searching Google with this search query: "64-bit Linux on bay trail tablet". Idk if Github has a messaging system, but I'm sure @maharmstone would appreciate if the issue ticket stayed on topic.

@SupertigerDev
Copy link

@ShadowEO like I said, I already googled and tried what I you told me to do below. I just give up with this tablet. I'm gonna leave it on windows 10.

tried installing rebornos os, it doesn't have bootai32.efi included so I downloaded it and put it in the correct file, it booted to the grub command line thing. I have tried to chainload or whatever but I get "unknown error". this seems complicated to install :/

@ShadowEO
Copy link

@ShadowEO like I said, I already googled and tried what I you told me to do below. I just give up with this tablet. I'm gonna leave it on windows 10.

tried installing rebornos os, it doesn't have bootai32.efi included so I downloaded it and put it in the correct file, it booted to the grub command line thing. I have tried to chainload or whatever but I get "unknown error". this seems complicated to install :/

It definitely is difficult, especially for installing a distribution. You could attempt Debian or Ubuntu, I believe they have this fix in the 64-bit version by default. As for creating a bootloader that could escalate us up to AMD64 mode despite the built-in UEFI firmware DOES appear possible, as the Windows-On-ARM team created a bootloader that escalates them from ARM32 to AARCH64.

@z4v4l
Copy link

z4v4l commented Oct 12, 2021 via email

@yurikoles
Copy link

Why don't you propose a bounty for that issue, instead of crying endless tears in countless posts?

@yurikoles
Copy link

E.g. start from sending one of those crappy netbooks to the @maharmstone. Or you expect him to buy one of those machines and spend a crazy amount of time hacking on this just because of your tears?

@ShadowEO
Copy link

ShadowEO commented Oct 13, 2021

maybe it's possible on x64, if the 64 bit OS can use 32 bit Runtime Services, but what you say about ARM is not possible. on ARM64, UEFI is required to run at the highest available, non secure pivileged level, that is EL2 or EL1. most probably, the former. so, architecturally, if EL2 is using AARCH32 execution state, lower levels (EL1), which the loader and OS could use, cannot use AARCH64 execution state. this is in addition to the fact, that Secure Monitor, running at EL3 and which is required if EL2 is present, must be using AARCH64 execution state. in short, the "escalation" on ARM is only possible on entering to higher ELs, and not vice versa. look Chapter D1.21.1 Implication of Exception levels implemented of the DDI0487A document.

It seems to be for Qualcomm platforms, which is something I missed (however Qualcomm still uses ARM processors), but would it bother you to actually do some checking? Here, I have a link to the project I spoke of: https://github.com/imbushuo/boot-shim

@SupertigerDev
Copy link

SupertigerDev commented Oct 13, 2021

Why don't you propose a bounty for that issue, instead of crying endless tears in countless posts?

Hey calm down there. No need to get mad. No one's crying here. Just here to find out if this is possible.

@SupertigerDev
Copy link

SupertigerDev commented Oct 13, 2021

E.g. start from sending one of those crappy netbooks to the @maharmstone. Or you expect him to buy one of those machines and spend a crazy amount of time hacking on this just because of your tears?

Why would I buy someone that, I'd rather buy a new device that can run windows 11 😂😂 again, not crying. Just seeing if it's possible to do this. Didn't know I'd make people angry by just asking. This issue is made for this reason. So idk why it's even a problem to talk about it. I'm not expecting anyone to buy anything, and I never said they should.

Repository owner locked and limited conversation to collaborators Oct 13, 2021
@maharmstone
Copy link
Owner

I'm fed up of receiving notifications about this thread...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests