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
grub: Support 32bit EFI on 64bit platforms #54625
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How well did you test this?
I clearly mixed up the branches. I have a client running a version of this patch. I will post the correct branch once I have access to it in a few hours. @infinisil The architecture of the EFI boot loader has to be changed on the install ISO, so that the ISO is bootable on these systems. The same config flag is then used to install the correct architecture of grub. Because it affects the ISO as well as grub, I decided to use a generic boot loader flag. Systemd-boot does not support this kind of booting, I could add an assert to systemd-boot to make that clear. |
I'm waiting for the update to review and test, but let's ask anyway: do you have a ready-to-use qemu invocation that uses the ia32 EFI bootloader to boot the |
@samueldr This is x86 only so, no. And I am not sure how well you can emulated mixed EFI systems with qemu in general. @infinisil I uploaded the correct patch now. Any feedback is welcome. |
D'oh! I meant ia32 to boot x86_64... Too many arches. (I edited my previous comment.)
Turns out that using a 32-bit Tianocore build is all that's required. Once the build is set to forcei686, building a 32 bit Tianocore and starting as follows works. Trying to boot a x86_64-only iso with the same setup fails.
Seems to work fine, and from light reading online it's pretty much verified that boards with a 32 bit UEFI would behave the same way than that qemu invocation. As far as working, 👍 this PR seems to work as intended, at least for the iso image. @matthewbauer could you validate whether the changes including the name |
Seems like we just missed the windows for 19.03. I assumed mixed (U)EFI support seems to be on the agenda of at least a few people. @matthewbauer Did you have time to look at this yet? If @samueldr Anything else I can do to move this along? |
d6a10e9
to
3d2b2cd
Compare
@matthewbauer: Thank you for your feedback. I added the proposed changes. |
@infinisil Would you mind taking another look, so we can get this merged? |
I reviewed pretty much irrelevant code, so this is fine
@GrahamcOfBorg test installer.simpleUefiGrub |
Glad to hear that. What is missing to get this merged? |
I think we should backport this to 19.03 |
Done, [release-19.03 de621d4] grub: Support 32bit EFI on 64bit x86 platforms |
Motivation for this change
With these changes it is possible to boot, install and run a 64bit NixOS on 64bit machines with a 32bit EFI. Example for such systems are the first few generations of Intel Apple Mac Pros or certain Intel Atom based systems.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)