I have a dev machine with BIOS and after compiling my kernel and initrd, I'm able to use it with a simple menuentry:
menuentry "mlinux" {
linux /boot/mlinuz quiet
initrd /boot/minitramfs
}
However running this on another machine with UEFI fails, I get:
error: kernel doesn't support EFI handover.
error: you need to load the kernel first.
I thought maybe this has to do with lack of support for UEFI in my kernel so I recompiled it with EFI_STUB support (had to enable ACPI too). Now I get a dark screen. If I add echo before each step and remove quiet, I'll see echo messages but nothing more, no kernel msg, nothing.
After seeing this question and this post, I copied my kernel to:
- /boot/efi/mlinuz.efi
- /boot/efi/EFI/mlinuz.efi
- /boot/efi/EFI/BOOT/mlinuz.efi
and have used theses addresses as my path in menuentry, still none of them work saying file can't be found. Where should I copy the file and what should be in my menuentry?
Side question: if I boot with my own linux kernel but the custom initrd, I can launch my program but can't interact with it using keyboard. Any idea why!?
EDIT: found about linuxefi and initrdefi but since it can't find the file, I drop to command line, use ls to find my hard and then use linuxefi (hd0,pt2)/mlinuz64.efi but it doesn't do anything.
EFI handover, previously I had CONFIG ofEFI&EFI_STUBenabled (which made error go away but showed blank screen) then saw this and after enabling FRAMEBUFFER related confs, I can now see the output. I guess framebuffer was the issue and I only neededCONFIG_EFIand not evenCONFIG_EFI_STUB?