grub4dos icon indicating copy to clipboard operation
grub4dos copied to clipboard

grub4efi - bootia32.efi crashes under Virtual Box 5 and QEMU UEFI32

Open steve6375 opened this issue 2 years ago • 15 comments

Using VBox 5 and UEFI32 mode Direct boot from USB to grub4efi bootia32.efi crashes. grubfm bootia32.efi boots OK. If I load grub4efi bootia32.efi from grubfm (UEFI32) it crashes.

Sometimes displays (hd0,0) before crashing. image

Has anyone tested UEFI32? (I don't have a UEFI32 system, so I cannot test a real system).

steve6375 avatar Aug 16 '21 10:08 steve6375

Are you using g4e external commands? The external commands that come with the g4e zip archive under ia32 uefi are corrupted. As far as I know external commands under IA32 UEFI can't get the correct uefi system table and image handle, so all external commands calling uefi don't work.

a1ive avatar Aug 16 '21 11:08 a1ive

yaya has no plans to solve this bug for now. I also doubt that there is a need to continue supporting ia32 uefi.

a1ive avatar Aug 16 '21 11:08 a1ive

I don't think it gets that far. I have set up a pause at \efi\grub\menu.lst and it does not get there. I load the grub4efi bootia32.efi file using grubfm under UEFI in VBox and then it crashes. however I can load the bootia32.efi file using Clover UEFI32 (from a BIOS\Legacy boot) and I get a menu!

In the download there is only one \ext folder in the download? So are you saying the ext folder is for UEFI64 only? In future will it also support 32bit or will there be a \ext64 and a \ext32 folder?

P.S. Q about ntloader.i386 ??? Is this UEFI32 executable (which I assumed) or is it MBR64 executable or MBR32 executable or any Legacy BIOS executable ???

steve6375 avatar Aug 16 '21 11:08 steve6375

I load the grub4efi bootia32.efi file using grubfm under UEFI in VBox and then it crashes. however I can load the bootia32.efi file using Clover UEFI32 (from a BIOS\Legacy boot) and I get a menu!

I think this should be a bug in vbox uefi firmware. vmware player uefi ia32 ok.

a1ive avatar Aug 16 '21 11:08 a1ive

So are you saying the ext folder is for UEFI64 only?

yes.

In future will it also support 32bit or will there be a \ext64 and a \ext32 folder?

I can't get it to work for now.

a1ive avatar Aug 16 '21 11:08 a1ive

P.S. Q about ntloader.i386 ??? Is this UEFI32 executable (which I assumed) or is it MBR64 executable or MBR32 executable or any Legacy BIOS executable ???

ntloader supports 2 uefi boot protocols: uefi chainloader and linuxefi (kernel command in g4e)

protocol bios linux16 efi32 chainloader efi32 linuxefi efi64 chainloader efi64 linuxefi
ntloader.i386
ntloader

a1ive avatar Aug 16 '21 12:08 a1ive

thanks. So under grub4efi, kernel ntloader will work for UEFI64 and UEFI32.

steve6375 avatar Aug 16 '21 12:08 steve6375

thanks. So under grub4efi, kernel ntloader will work for UEFI64 and UEFI32.

yes.

a1ive avatar Aug 16 '21 12:08 a1ive

QEMU UEFI32 also crashes (reboots when grub4efi bootia32.efi is chainloaded from grubfm). If QEMU UEFI32 boots directly from \EFI\BOOT\BOOTIA32.efi (grub4efi) it just resets Tianocore and tries to boot again in endless loop. bootx64.efi is OK in QEMU UEFI64 mode

steve6375 avatar Aug 16 '21 19:08 steve6375

I have Acer netbook with 32bit UEFI. I've been using successfully bootia32.efi from release 2021-01-12-4f0879b. However it missed parttype command so I upgraded to grub4dos-for_UEFI-2021-08-18.

Now netbook disables to boot. When I chainload it from grubefi it just gives endless message: `/EndEntire

file path: /ACPI(a0341d0,0)/PCI(0,14)/USB(1,0)/HD(1,800,775800,77e4ab9900000000,1,1)/File(\efi\boot)/File(GRUB4DOS_BOOTIA32.EFI)/EndEntire`

It would be nice to have grub4dos for 32bit UEFI working with parttype support. It gives possiblity to boot much more types of ISOs.

pablocool avatar Aug 19 '21 13:08 pablocool

@steve6375 you are not using the correct parameters for both which OVMF.fd you are using ? which parameters you added ? quick test show both VBox 5 UEFI 32 mode and QEMU UEFI 32 boot fine try in windows 1- qemu-system-i386 -drive file="%PROGRAMFILES(X86)%/qemu/share/edk2-i386-code.fd",if=pflash,format=raw,readonly=on -drive file="%PROGRAMFILES(X86)%/qemu/share/edk2-i386-vars.fd",if=pflash,format=raw,readonly=off -drive file=\.\PhysicalDrive1,if=ide,index=0,media=disk,format=raw -m 1024

auto use low memory will fail use -m 256 at least

2- vbox5 VBox 5 UEFI 32 go to settings ->system>processor then uncheck enable PAE/NX options this option is to use memory more than 4g in 32 bit system form host cpu and use them all . this option causes the problem it is compatible for UEFI 64.

2022-07-19_18-29-11

https://user-images.githubusercontent.com/12494184/179847954-9ea0bd00-86fb-4002-94c0-f2d3d32ed930.mp4

memoarfaa avatar Jul 19 '22 21:07 memoarfaa

Thanks, but my problem is i first UEFI32-boot to grubfm (by a1ive) and then load the grub4efi bootia32.efi file from grubfm. The screen is blank and it just hangs. With the UEFI64 and grubfm -> bootx64.efi there is no problem. PAE is disabled (or enabled) - both fail.

steve6375 avatar Jul 19 '22 21:07 steve6375

also boot fine

https://user-images.githubusercontent.com/12494184/179854341-0acb9eeb-0173-4494-8532-b90cabda4331.mp4

may be menu.lst need graphics mode with font how you load grubfm in vbox5 iso ueb etc .. iso my fial

memoarfaa avatar Jul 19 '22 21:07 memoarfaa

I just get black screen. No text at all. No cursor. /menu.lst just has pause Hello in it. the bootia32.efi file is on an NTFS partition, but I dont see how that matters. image

steve6375 avatar Jul 19 '22 21:07 steve6375

Sorry, I found my problem! My menu.lst was running one of the ext utilities (efidiskinfo) and all the ext utilities hang under uefi32. My mistake!

steve6375 avatar Jul 20 '22 08:07 steve6375