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

Please include 64bit EFI loader in "generic" 32 bit x86 EFI images - some x64 systems won't boot without it. #14231

Open
1 task done
kitor opened this issue Dec 16, 2023 · 18 comments · May be fixed by #14944
Open
1 task done
Labels
bug issue report with a confirmed bug invalid

Comments

@kitor
Copy link

kitor commented Dec 16, 2023

Describe the bug

I have Wyse 5070 terminal (Pentium J5005). It has no legacy boot options, only UEFI.
Trying to boot generic-squashfs-combined-efi.img.gz from https://downloads.openwrt.org/releases/23.05.2/targets/x86/generic/ doesn't work, even if I add efi\boot\bootia32.efi as a boot option in BIOS.

However images from 64 subdirectory contain \efi\boot\bootx64.efi. After substituting that file into partition written from squashfs image variant - system boots fine intop OpenWRT.

This makes generic UEFI images not generic at all, as they boot only on 32 bit systems.

OpenWrt version

23.05.2

OpenWrt release

doesn't boot, can't check

OpenWrt target/subtarget

x86_64

Device

Dell Wyse 5070

Image kind

Official downloaded image

Steps to reproduce

No response

Actual behaviour

No response

Expected behaviour

No response

Additional info

No response

Diffconfig

No response

Terms

  • I am reporting an issue for OpenWrt, not an unsupported fork.
@kitor kitor added the bug issue report with a confirmed bug label Dec 16, 2023
Copy link

Invalid Version reported. 23.05.2
Is this from a clean repository?

Copy link

Invalid Release reported. doesn't boot, can't check
Is this from a clean repository?

Copy link

Invalid Target/Subtarget reported. x86_64
Is this from a supported device?

@kitor kitor changed the title 64 bit generic-squashfs-combined-efi.img.gz contains only 32bit EFI binary, doesn't boot on 64bit only system generic-squashfs-combined-efi.img.gz contains only 32bit EFI binary, doesn't boot on 64bit only system Dec 16, 2023
@kitor
Copy link
Author

kitor commented Dec 16, 2023

Yes, this is from clean repository. Or actually this is not even from repository but from official builds.

I understand requirements to fill software versions - but your "answer checks" fail when official pre-built image doesn't boot. How you expect reporter to fill this data in such case?

@kitor kitor changed the title generic-squashfs-combined-efi.img.gz contains only 32bit EFI binary, doesn't boot on 64bit only system Official x86 generic-squashfs-combined-efi.img.gz contains only 32bit EFI binary, doesn't boot on 64bit only system Dec 16, 2023
@Leo-PL
Copy link
Contributor

Leo-PL commented Dec 16, 2023

I think it is the subtarget naming, which is unclear, "64" subtarget has correct file, and works. When 64 subtarget was added, all other subtargets were 32-bit only, "generic" included. Perhaps it could be renamed "i686", "32" or something similar.

cc @jow-

@kitor
Copy link
Author

kitor commented Dec 16, 2023

Tbh it is generic as amd64 devices will run 32bit OS no issues. It is just about missing x64 boot binary - they can coexist in the same efi\boot directory making image really generic one.

@brada4
Copy link

brada4 commented Dec 16, 2023

It is implementation specifics. Does it work if you rename/copy ia32 to x64 loader? At least dell server EFI will not load 32bit PE bootloader at all. Likely they dont want you to drop managed service by reinstalling 32bit windows on "thin client"

@kitor
Copy link
Author

kitor commented Dec 16, 2023

No, it doesn't work when file is renamed. It boots fine when I just replaced bootia32.efi with bootx64.efi counterpart from x86-64 image. To be exact, I just added a new x64 file, leaving ia32 as is. Probably this is the same case where it just won't load 32 bit EFI binary.

There's already enough space on EFI partition to include both files.

@brada4
Copy link

brada4 commented Dec 16, 2023

You can change title to ... please include x64 bootloader in ia32 images...
Documentation says to use 64 if compatible.

The later ability to execute ia32 grub basically means that EFI they call BIOS is intentionally rigged to reject 32bit PE file, but later same binary type is supported to get grub loading kernel.

@kitor kitor changed the title Official x86 generic-squashfs-combined-efi.img.gz contains only 32bit EFI binary, doesn't boot on 64bit only system Please include 64bit EFI loader in "generic" 32 bit x86 EFI images - some x64 systems won't boot without it. Dec 16, 2023
@kitor
Copy link
Author

kitor commented Dec 16, 2023

Sure, updated the title.

@ehem
Copy link
Contributor

ehem commented Jan 6, 2024

I think it is the subtarget naming, which is unclear, "64" subtarget has correct file, and works. When 64 subtarget was added, all other subtargets were 32-bit only, "generic" included. Perhaps it could be renamed "i686", "32" or something similar.

I suppose one might rename it "pentium4". Several people seem interested in reducing the number of x86 targets, in which case it seems very likely "x86/generic" will be nuked.

What seems more plausible is to rename "x86/64" to "generic64".

@brada4
Copy link

brada4 commented Jan 6, 2024

wont boot on particular system. it needs EFI (PE) x64 bootloader to call PE ia32 grub.

@ehem
Copy link
Contributor

ehem commented Jan 6, 2024

Looking at information to make sure. Pentium J5005 "Instruction Set", "64-bit"; which means this is amd64. Dell Wyse 5070, "Minimum memory": "4 GB", "Maximum memory": "8 GB".

Given the specifications, you want "64" not "generic". (I've been complaining about "generic" being the most specialized of the x86 targets)

@brada4
Copy link

brada4 commented Jan 6, 2024

Yes, it is more of archaeological curiosity than a practical long term usage. Not debian nor SuSE rolling supplies x64 loader in 32bit images.

@kitor
Copy link
Author

kitor commented Jan 6, 2024

Given the specifications, you want "64" not "generic". (I've been complaining about "generic" being the most specialized of the x86 targets)

Yes, I know, however - as you mentioned, the issue is about "generic" not being generic at all.

Yes, it is more of archaeological curiosity than a practical long term usage. Not debian nor SuSE rolling supplies x64 loader in 32bit images.

Sure, but they name it "i386" and "amd64" not "generic" "x64" "geode" and so on. OpenWRT naming, as above - suggests generic is the one that should run everywhere, while other ones are specialized. This is highly confusing.

What seems more plausible is to rename "x86/64" to "generic64".

I still think it would be slightly confusing as it doesn't indicate "generic" is 32 bit only.

Several people seem interested in reducing the number of x86 targets, in which case it seems very likely "x86/generic" will be nuked.

That would obviously solve the issue too :)

@brada4
Copy link

brada4 commented Jan 6, 2024

but generic runs everywhere since 1993. Rest is how you deal with bios novelties.

@HunterDG
Copy link

To be clear, does a "generic" Openwrt build exist that boots 32 bit UEFI/64 bit CPU combos (like older Intel atoms)?

@brada4
Copy link

brada4 commented Mar 18, 2024

You have to measure on the system. Full 32bit chain boots. 64bit subject to EFI supporting 64bit PE grub (or better if you have BIOS to boot either)

ehem added a commit to ehem/openwrt that referenced this issue Mar 20, 2024
There is a desire to reduce the time spent on x86 OpenWRT platforms.
"generic" is most suitable for removal.  The few systems which could
use "generic" must now opt for "legacy" (or for a lucky few "64").

Closes: openwrt#14231
Signed-off-by: Elliott Mitchell <ehem+openwrt@m5p.com>
ehem added a commit to ehem/openwrt that referenced this issue Mar 20, 2024
There is a desire to reduce the time spent on x86 OpenWRT platforms.
"generic" is most suitable for removal.  The few systems which could
use "generic" must now opt for "legacy" (or for a lucky few "64").

Closes: openwrt#14231
Signed-off-by: Elliott Mitchell <ehem+openwrt@m5p.com>
@ehem ehem linked a pull request Mar 20, 2024 that will close this issue
ehem added a commit to ehem/openwrt that referenced this issue May 8, 2024
There is a desire to reduce the time spent on x86 OpenWRT platforms.
"generic" is most suitable for removal.  The few systems which could
use "generic" must now opt for "legacy" (or for a lucky few "64").

Closes: openwrt#14231
Signed-off-by: Elliott Mitchell <ehem+openwrt@m5p.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issue report with a confirmed bug invalid
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants