acidanthera / bugtracker

Acidanthera Bugtracker
374 stars 42 forks source link

OpenDuet 0.8.8 and later cannot boot Linux EFISTUB #2371

Closed XRevan86 closed 4 months ago

XRevan86 commented 5 months ago

Starting with the version 0.8.8 OpenDuet refuses to boot any Linux kernel (including Unified Kernel Image).

The only thing that is printed out when executing the kernel is the word unsupported.

The bug is strictly within OpenDuet, OpenCore is not affected.

Possibly related to #2363.

mikebeaton commented 5 months ago

It's quite unusual to have OpenDuet set up as anything other than a way to boot into OpenCore as bootloader. Please could you provide a log of OpenCore as far as this failure, if this is your setup, if not could you please clarify your setup (e.g. is it set up to point directly at a Linix distro with Linux installed BOOTx64.efi?).

EDIT: In fact, I believe it's very unusual and would require modified code and own build. Therefore OC debug log which would have (and does) include the error would have helped, however...

mikebeaton commented 5 months ago

I can replicate the error - thanks for the report.

mikebeaton commented 5 months ago

@XRevan86 - Please can you confirm that the build at https://github.com/acidanthera/OpenCorePkg/actions/runs/7595331858 fixes the issue?

XRevan86 commented 5 months ago

@mikebeaton, yes, this works, thank you.

XRevan86 commented 5 months ago

is it set up to point directly at a Linux distro with Linux installed BOOTx64.efi?

I didn't mention it because it didn't matter when reproducing the issue.
I do use OpenDuet with a simple chainloader located at EFI/OC/OpenCore.efi that just loads BOOT/BOOTX64.EFI. That's a lot easier than to recompile OpenDuet every time.

XRevan86 commented 4 months ago

OpenDuet is not able to boot Linux 6.7 now, saying Volume Corrupt. I have not tested whether OpenCore can.

Looking at the changelog I see these changes related to EFISTUB: https://github.com/torvalds/linux/commit/50dcc2e0d62e3c4a54f39673c4dc3dcde7c74d52, https://github.com/torvalds/linux/commit/01b1e3ca0e5ce47bbae8217d47376ad01b331b07, https://github.com/torvalds/linux/commit/50d7cdf7a9b1ab6f4f74a69c84e974d5dc0c1bf1, https://github.com/torvalds/linux/commit/01638431c465741e071ab34acf3bef3c2570f878

mikebeaton commented 4 months ago

I can replicate the issue with Nitrux (I just picked up the first distro which I Googled which is shipping with it; I guess could have also have tried to upgrade some standard distro to bleeding edge). It's looking quite like an error at the kernel build end. (Not to say that 6.7 won't boot on standard loaders - it does - but to say that the layout looks broken all the same.) Which distro or which bleeding edge kernel build is showing the issue for you?

mikebeaton commented 4 months ago

I have confirmed that the issue exists in bleeding edge kernels for Ubuntu and Fedora and in 6.8rc as well as 6.7.

We still believe that the problem lies at the kernel end and have raised an issue: https://lore.kernel.org/linux-efi/CAHzAAWQ6srV6LVNdmfbJhOwhBw5ZzxxZZ07aHt9oKkfYAdvuQQ@mail.gmail.com/T/#u

mikebeaton commented 4 months ago

This has been accepted as an issue in the Linux kernel EFI support, and a fix is being released (and eventually back-ported to all the kernels it applies to):

https://lore.kernel.org/linux-efi/cover.1707141974.git.baskov@ispras.ru/T/#t

This will go into v6.8 as a fix and be backported to v6.7-stable. Once I am confident that all the EFI stub changes for x86 in v6.7 are in good shape, they will be backported to v6.6 as well. (v6.6 is a long term supported stable kernel)

If you need to use one of these kernels prior to any fix being backported, you will have to use OpenDuet pre-0.8.8.

mikebeaton commented 4 months ago

This is resolved in Linux kernel 6.8 rc4 and up, by this commit https://github.com/torvalds/linux/commit/e6f39a90de9213693db19aeb2ddea54163f104d7

vit9696 commented 4 months ago

This is also resolved in 6.7.5 and up (changelog) and 6.6.18 and up (changelog).