Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
booting custom kernel and initrd in qemu unde efi [aolved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5945

PostPosted: Sun Apr 13, 2025 3:09 pm    Post subject: booting custom kernel and initrd in qemu unde efi [aolved] Reply with quote

Greetings,

I'm trying to test a new initramfs I'm working on for a system I have, I don't want to test on a live system to I'm trying to get qemu to work.
I've created a dummy fs to boot after, grabbed a kernel and skeleton initramfs, I ran this cmd: qemu-system-x86_64 -bios /usr/share/edk2/OvmfX64/OVMF_CODE.fd -kernel vmlinuz-linux-6.14.2-gentoo -nographic -append "console=ttyS0" -initrd initramfs -drive format=raw,file=guest.img.raw
and I get efi shell, what am I doing wrong?
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein


Last edited by DaggyStyle on Sun Apr 13, 2025 5:29 pm; edited 1 time in total
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5945

PostPosted: Sun Apr 13, 2025 3:13 pm    Post subject: Reply with quote

after examining the serial log, I see these errors:
Quote:
EFI stub: ERROR: Failed to decompress kernel
EFI stub: ERROR: efi_stub_entry() failed!

_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
pingtoo
Veteran
Veteran


Joined: 10 Sep 2021
Posts: 1639
Location: Richmond Hill, Canada

PostPosted: Sun Apr 13, 2025 3:20 pm    Post subject: Reply with quote

Do you even need UEFI for initramfs test? if not just take out "-bios /usr/share/edk2/OvmfX64/OVMF_CODE.fd" from your qemu command.

UEFI is a pre-boot management services (or specification if you insist) and your qemu command already specific kernel file location, so there is no need to invoke UEFI.
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5945

PostPosted: Sun Apr 13, 2025 5:29 pm    Post subject: Reply with quote

pingtoo wrote:
Do you even need UEFI for initramfs test? if not just take out "-bios /usr/share/edk2/OvmfX64/OVMF_CODE.fd" from your qemu command.

UEFI is a pre-boot management services (or specification if you insist) and your qemu command already specific kernel file location, so there is no need to invoke UEFI.

(facepalm) you are correct, I'm missing to much sleep hours.
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum