qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Too slow edk2 bios boot?


From: Laszlo Ersek
Subject: Re: Too slow edk2 bios boot?
Date: Wed, 23 Jun 2021 17:23:19 +0200

On 06/23/21 07:47, Bin Meng wrote:
> Hi Laszlo,
> 
> On Wed, Jun 23, 2021 at 12:13 AM Laszlo Ersek <lersek@redhat.com> wrote:
> 
>> On 06/18/21 15:06, Bin Meng wrote:
>>> On Fri, Jun 18, 2021 at 7:46 PM Gerd Hoffmann <kraxel@redhat.com> wrote:
>>>
>>>> On Fri, Jun 18, 2021 at 06:46:57PM +0800, Bin Meng wrote:
>>>>> Hi Laszlo,
>>>>>
>>>>> Using the QEMU shipped edk2 bios, for i386, it boots very quickly to
>>>>> the EFI shell.
>>>>>
>>>>> $ qemu-system-i386 -nographic -pflash edk2-i386-code.fd
>>
>> Ouch. Don't do this. If you use just one pflash chip, then a unified FD
>> file is expected in that chip, containing both varstore and firmware
>> executable.
>>
>> Upstream QEMU does not bundle / install unified FD files however. What it
>> provides are separate executables and varstore *templates*.
>>
>> If you don't want to create a permanent variable store file for your VM,
>> from the template called "edk2-i386-vars.fd", then the minimum command line
>> is something like this:
>>
>> qemu-system-i386 \
>>   -drive if=pflash,unit=0,format=raw,readonly=on,file=edk2-i386-code.fd \
>>   -drive if=pflash,unit=1,format=raw,snapshot=on,file=edk2-i386-vars.fd \
>>
>> (Nowadays I should use the "blockdev" syntax instead of "-drive", but I've
>> not updated my scripts thus far ;))
>>
> 
> Thank you. I suggest we document this in the QEMU documentation [1]

Already documented in "docs/interop/firmware.json".

>>>> qemu -nic none ?
>>>>
>>>
>>> Yep this works. Thanks a lot!
>>
>> If you need neither NICs nor disks in your guest at all, then "-nic none"
>> is indeed the simplest solution.
>>
> 
> If using NICs in the guest, then we have to adjust the order in the BIOS
> boot menu?

No; assuming you have a device (NIC or disk) you'd like to boot off of,
and a NIC you wouldn't, specify the "bootindex" device property for the
devices in the first category (with the desired decimal indices), and
omit the "bootindex" device property for the devices in the second category.

Thanks
Laszlo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]