How do you use the qemu with OVMF.fd?
How do you use the qemu with OVMF.fd?
As we all know, we can use the qemu to boot the os which supports UEFI. But, When I use the qemu to boot my os, It‘s always stuck in this interface.
How can I jump this interface?-
- Member
- Posts: 510
- Joined: Wed Mar 09, 2011 3:55 am
Re: How do you use the qemu with OVMF.fd?
We need more information. How are you starting QEMU, and with what options.
It looks like OVMF is attempting to boot from the network (PXE boot). Is this how you intend to boot your OS, or are you booting it from a disk image?
It looks like OVMF is attempting to boot from the network (PXE boot). Is this how you intend to boot your OS, or are you booting it from a disk image?
Re: How do you use the qemu with OVMF.fd?
actually, I don't want qemu boot from network. I just want it skip this step.linguofreak wrote:We need more information. How are you starting QEMU, and with what options.
It looks like OVMF is attempting to boot from the network (PXE boot). Is this how you intend to boot your OS, or are you booting it from a disk image?
Re: How do you use the qemu with OVMF.fd?
Go into the UEFI setup screen (by pressing F12 or ESC if I recall correctly), select Boot Manager from the menu and change the boot sequence. If I were you, I'd add EFI Shell too to the list as the last option, that would save you lot of headaches later.benji wrote:actually, I don't want qemu boot from network. I just want it skip this step.
If you are interested, the boot manager in TianoCore is implemented here, and it looks like this:
Cheers,
bzt
Re: How do you use the qemu with OVMF.fd?
It's useless. Because it only skip this once. I don't want to edit the list each time.bzt wrote:Go into the UEFI setup screen (by pressing F12 or ESC if I recall correctly), select Boot Manager from the menu and change the boot sequence. If I were you, I'd add EFI Shell too to the list as the last option, that would save you lot of headaches later.benji wrote:actually, I don't want qemu boot from network. I just want it skip this step.
If you are interested, the boot manager in TianoCore is implemented here, and it looks like this:
Cheers,
bzt
-
- Member
- Posts: 510
- Joined: Wed Mar 09, 2011 3:55 am
Re: How do you use the qemu with OVMF.fd?
How are you starting QEMU? Are you starting it from the command line? If so, what is the exact command you're using to start it? Are you using a GUI wrapper like virt-manager to do your setup?
Re: How do you use the qemu with OVMF.fd?
Indeed, assuming you downloaded the prebuilt OVMF images, you should run with something like this:linguofreak wrote:How are you starting QEMU? Are you starting it from the command line? If so, what is the exact command you're using to start it? Are you using a GUI wrapper like virt-manager to do your setup?
Code: Select all
qemu-system-i386 -bios OVMF-pure-efi.fd <other options>
[nx] kernel: http://github.com/zhiayang/nx
-
- Member
- Posts: 797
- Joined: Fri Aug 26, 2016 1:41 pm
- Libera.chat IRC: mpetch
Re: How do you use the qemu with OVMF.fd?
Are you building and running this on a Linux distro?
Re: How do you use the qemu with OVMF.fd?
yes, And I met a problem that is I have a disk with GTP partition. In this disk, I build a test.EFI with edk2 in uefi.hd. Now, I want to qemu run my test.EFI directly. I don't want to qemu drop into UEFI shell each time. How do I do? This is How I run qemu with ovmf.fd:MichaelPetch wrote:Are you building and running this on a Linux distro?
Code: Select all
qemu-system-x86_64 -bios OVMF.fd -hda uefi.hd -net none
Re: How do you use the qemu with OVMF.fd?
If you want your OS or UEFI program to run "automatically", then AFAIK it must be placed in /EFI/BOOT/BOOTX64.EFI (or maybe BOOTX86.EFI for 32-bit), and you must setup the boot order in the configuration appropriately.
Alternatively you can probably find a way to write to the NVRAM of the machine and modify the "default" path that it looks for the EFI (I think this is possible on real machines, [remembered rEFInd doing something like that?] but not sure about QEMU).
Alternatively you can probably find a way to write to the NVRAM of the machine and modify the "default" path that it looks for the EFI (I think this is possible on real machines, [remembered rEFInd doing something like that?] but not sure about QEMU).
[nx] kernel: http://github.com/zhiayang/nx