Hi fellow devs,
I am currently working on a bootloader for x86_64 bios and uefi.
When i try to boot using qemu, it drops into uefi shell, instead of running the loader.
The iso-image doesnt seem to work at all.
The weird part is: i can successfully manually start the efi app in the hd image.
Why doesnt qemu boot it automatically?
I must be doing something wrong...
Any help or ideas would be highly appericiated.
the repo can be found here.
Cheers,
Codepoet2005
uefi drops into shell
- CodePoet2005
- Posts: 17
- Joined: Sat Dec 28, 2024 1:02 pm
- Libera.chat IRC: CodePoet2005
- Location: Always @ Home
- GitHub: https://codeberg.org/CodePoet2005
-
sebihepp
- Member

- Posts: 256
- Joined: Tue Aug 26, 2008 11:24 am
- GitHub: https://github.com/sebihepp
Re: uefi drops into shell
Does it drop into the uefi shell when using the cd image, the hd image or both?
- CodePoet2005
- Posts: 17
- Joined: Sat Dec 28, 2024 1:02 pm
- Libera.chat IRC: CodePoet2005
- Location: Always @ Home
- GitHub: https://codeberg.org/CodePoet2005
Re: uefi drops into shell
Both drop in the uefi shell,
the difference is that i can access the fat filesystem normally on my hd image, i can also manually start /EFI/BOOT/BOOTX64.EFI. I want it to boot automatically instead. From what i understand it should (is this correct?)
The cd image doesnt seem to be working at all (i cannot access the fat fs),
I dont think it has anything to do with the fat images im making, since the hd works ok.
-
sebihepp
- Member

- Posts: 256
- Joined: Tue Aug 26, 2008 11:24 am
- GitHub: https://github.com/sebihepp
Re: uefi drops into shell
You use "imgr" to create the image. It isn't available on my ubuntu, not even on apt-get, and google only finds image editors, but no manpage. What is that program?
I am not familiar with clang, but are you sure your program is PE and not ELF?
I am not familiar with clang, but are you sure your program is PE and not ELF?
- CodePoet2005
- Posts: 17
- Joined: Sat Dec 28, 2024 1:02 pm
- Libera.chat IRC: CodePoet2005
- Location: Always @ Home
- GitHub: https://codeberg.org/CodePoet2005
Re: uefi drops into shell
Hi,
Thanks for the suggestion but the output file is a valid PE executable.
Imgr is my own program and can be found here.
In a nutshell: it creates partitions, filesystems and copies files/folders into filesystems.
btw, the fat image made using imgr is verified using some other tools, so it should be good.
Cheers,
Codepoet2005
Thanks for the suggestion but the output file is a valid PE executable.
Imgr is my own program and can be found here.
In a nutshell: it creates partitions, filesystems and copies files/folders into filesystems.
btw, the fat image made using imgr is verified using some other tools, so it should be good.
Cheers,
Codepoet2005
-
Octocontrabass
- Member

- Posts: 6247
- Joined: Mon Mar 25, 2013 7:01 pm
Re: uefi drops into shell
Is OVMF configured to try to boot from your drive? It may not be, if you're reusing a copy of OVMF_VARS from a different QEMU configuration. Try a fresh copy of OVMF_VARS, or check the boot order by pressing ESC during the OVMF splash screen.CodePoet2005 wrote: ↑Sun Feb 15, 2026 8:44 amThe weird part is: i can successfully manually start the efi app in the hd image.
- CodePoet2005
- Posts: 17
- Joined: Sat Dec 28, 2024 1:02 pm
- Libera.chat IRC: CodePoet2005
- Location: Always @ Home
- GitHub: https://codeberg.org/CodePoet2005
Re: uefi drops into shell
Changing both the firmware image itself and the vars did the trickOctocontrabass wrote: ↑Mon Feb 16, 2026 6:57 pmIs OVMF configured to try to boot from your drive? It may not be, if you're reusing a copy of OVMF_VARS from a different QEMU configuration. Try a fresh copy of OVMF_VARS, or check the boot order by pressing ESC during the OVMF splash screen.CodePoet2005 wrote: ↑Sun Feb 15, 2026 8:44 amThe weird part is: i can successfully manually start the efi app in the hd image.
I should have checked the firmware beforehand, but i assumed i would "just work", like qemu with bios
Thanks for the help.
Cheers,
Codepoet2005