Grub 2.12 is unable to boot the Windows system using the chainloader /efi/Microsoft/Boot/bootmgfw.efi.

Bug #2078307 reported by haobinnan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
New
Undecided
Unassigned

Bug Description

I am using Shim 15.8 in combination with GRUB2.12. One of the GRUB menu items, chainloader /efi/Microsoft/Boot/bootmgfw.efi, fails to boot, while it works correctly with GRUB2.06. Below is a screenshot of the error.

Revision history for this message
haobinnan (haobinnan) wrote :
Revision history for this message
haobinnan (haobinnan) wrote :
Revision history for this message
haobinnan (haobinnan) wrote :

I discovered that a 32-bit UEFI BIOS cannot boot a 64-bit Linux kernel using GRUB 2.12, while it can with GRUB 2.06.

Revision history for this message
Mate Kukri (mkukri) wrote :

Can you please specify the exact shim version and vendor (reason I am asking is due to suspecting that you aren't using the Ubuntu shim due to your shim-review submission)?

If it isn't the current Ubuntu shim, does it enable NX?

What exact Windows version are you trying to boot?

Also about the "64-bit Linux kernel on 32-bit UEFI", 32-bit UEFI isn't supported by Ubuntu, and untested by us.

Revision history for this message
haobinnan (haobinnan) wrote :

I am using the shim from https://github.com/rhboot/shim/releases/download/15.8/shim-15.8.tar.bz2, not the Ubuntu shim.

I believe the NX is enabled by default in shim version 15.8.

I have tried booting both Windows 10 and Windows 11, but neither worked.

Regarding "64-bit Linux kernel on 32-bit UEFI," I think the grub2.12 code has implemented some special restrictions. There are indeed use cases for this, and grub2.06 doesn't have this issue. It seems that grub2.12 does have this problem.

Revision history for this message
Mate Kukri (mkukri) wrote :

This is a bug tracker for Ubuntu users, not an upstream support forum. I will verify that dual-booting Ubuntu and Windows works or not, beyond that I don't think I can do much more.

If you have a specific issue in the code we ship rather than a generic "X doesn't work on my downstream build of your stuff", I could be more amenable.

> Regarding "64-bit Linux kernel on 32-bit UEFI," I think the grub2.12 code has implemented some special restrictions

It is not a special restriction, the UEFI stub loader simply does not support mixed mode, which we have switched to. There is a fallback to the legacy loader which might work, but that is on purpose disabled when NX enforcement is required.

Revision history for this message
haobinnan (haobinnan) wrote :

> If you have a specific issue in the code we ship rather than a generic "X doesn't work on my downstream build of your stuff", I could be more amenable.

The Ubuntu version is likely to encounter this issue as well, so I hope it can be addressed.

> It is not a special restriction, the UEFI stub loader simply does not support mixed mode, which we have switched to. There is a fallback to the legacy loader which might work, but that is on purpose disabled when NX enforcement is required.

While it's true that mixed mode is no longer supported, there are indeed scenarios where this is needed. Could we add support for this in the Ubuntu grub2 code?

Revision history for this message
haobinnan (haobinnan) wrote :

If you need any additional information, please let me know, and I will fully cooperate with the investigation.

Revision history for this message
haobinnan (haobinnan) wrote :

I've seen some motherboards with a 32-bit UEFI BIOS but an x86_64 CPU. On such computers, you can install a 64-bit Linux system, but you must use bootia32.efi to load the 64-bit Linux kernel in order to boot. If you use bootx64.efi, it won't boot.

Additionally, GRUB2 also needs to support booting Microsoft's bootmgfw.efi (using chainloader /efi/Microsoft/Boot/bootmgfw.efi). This falls under the scope of dual-boot setups, which many users use. GRUB 2.06 works fine for this, but the issue arises because GRUB 2.12 no longer supports mixed mode.

Revision history for this message
Mate Kukri (mkukri) wrote :

> I've seen some motherboards with a 32-bit UEFI BIOS but an x86_64 CPU. On such computers, you can install a 64-bit Linux system, but you must use bootia32.efi to load the 64-bit Linux kernel in order to boot. If you use bootx64.efi, it won't boot.

I don't doubt the existence of such devices, I just said they are not supported by Ubuntu.

Revision history for this message
Mate Kukri (mkukri) wrote :

> Additionally, GRUB2 also needs to support booting Microsoft's bootmgfw.efi (using chainloader /efi/Microsoft/Boot/bootmgfw.efi). This falls under the scope of dual-boot setups, which many users use. GRUB 2.06 works fine for this, but the issue arises because GRUB 2.12 no longer supports mixed mode.

Can you actually verify that this is the case with the _Ubuntu_ shim + _Ubuntu_ GRUB build? As I said, it's not our job to support downstream builds. The shim+GRUB+Windows all have to be 64-bit for this to work of course.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.