Re: Boot an EFI system with QEMU

2023-04-25 Thread Steve McIntyre
On Tue, Apr 25, 2023 at 07:00:21PM +0200, Valentin Caracalla wrote:
>Hello Steve,
>
>thanks a lot for the tip! However, I'm a complete novice when it comes to 
>running custom firmware in QEMU. I just tried the following:
>
>1.: Download the latest EDK2 release from Github:
>
>https://github.com/tianocore/edk2/archive/refs/tags/edk2-stable202302.tar.gz
>
>2.: Extract the OVMF firmware file:
>
>tar xz edk2-edk2-stable202302/OvmfPkg/OvmfPkgX64.fdf 
>3.: Try to run it with QEMU:
>
>sudo qemu-system-x86_64 -accel kvm -bios 
>edk2-edk2-stable202302/OvmfPkg/OvmfPkgX64.fdf -smp 2 -m 2G /dev/sda
>This will just give me a QEMU error message ("could not load PC BIOS"). Is it 
>possible to boot an EFI system with QEMU without downloading a custom firmware 
>file, i.e. is there a Debian package providing this functionality?

My local test scripts for UEFI boot do other things too, but I add the
following:

-pflash  -pflash 

where I copy matching images from /usr/share/OVMF in the ovmf
package. See the file /usr/share/doc/ovmf/README.Debian for what the
different files offer (secure boot, etc.).

-- 
Steve McIntyre, Cambridge, UK.st...@einval.com
"Yes, of course duct tape works in a near-vacuum. Duct tape works
 anywhere. Duct tape is magic and should be worshipped."
   -― Andy Weir, "The Martian"



Re: Boot an EFI system with QEMU

2023-04-25 Thread Nicolas George
Valentin Caracalla (12023-04-25):
> thanks a lot for the tip! However, I'm a complete novice when it comes to 
> running custom firmware in QEMU. I just tried the following:
> 
> 1.: Download the latest EDK2 release from Github:

I could boot a VM with a UEFI bootloader using only files packaged by
the host operating system, an old Ubuntu LTS, 18 IIRC. I do not have my
notes near at hand, but I found the procedure easily either on some
stackoverflow question or possibly in the answers of an AI search
engine, as I am frequently toying with them these days.

HtH

Regards,

-- 
  Nicolas George


signature.asc
Description: PGP signature


Boot an EFI system with QEMU

2023-04-25 Thread Valentin Caracalla
Hello Steve,

thanks a lot for the tip! However, I'm a complete novice when it comes to 
running custom firmware in QEMU. I just tried the following:

1.: Download the latest EDK2 release from Github:

https://github.com/tianocore/edk2/archive/refs/tags/edk2-stable202302.tar.gz

2.: Extract the OVMF firmware file:

tar xz edk2-edk2-stable202302/OvmfPkg/OvmfPkgX64.fdf