NetBSD-Users archive

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

Re: Booting CDs in Qemu



OK, thanks!   I’m not sure I fully understand what you mean by “moved the relevant file to the top”.  Do you mean you moved the \EFI\boot\bootx64.efi file to \EFI\bootx64.efi? 

There was an old reference I found in my search that seemed to imply this was  a solution, but then I don’t see how the NetBSD CD booted.  Doesn’t it’s bootx64.efi file live in \EFI\boot\bootx64.efi just like it does on the rEFInd CD?

-bob

On Aug 6, 2020, at 7:26 PM, Chavdar Ivanov <ci4ic4%gmail.com@localhost> wrote:

> On Fri, 7 Aug 2020 at 01:11, Chavdar Ivanov <ci4ic4%gmail.com@localhost> wrote:
>> 
>> On Fri, 7 Aug 2020 at 01:05, Robert Nestor <rnestor%mac.com@localhost> wrote:
>>> 
>>> Just dawned on me, I’m betting the NetBSD CD is configured to boot either via BIOS or UEFI and Qemu is probably trying BIOS first since that’s its default.
>> 
>> No, it definitely says that it is booting in EFI mode. if you
>> interrupt it and drop to the command prompt, you can see the efivars.
>> The graphics is also wsfb and the console looks like the NetBSD
>> console after a UEFI boot; X -configure makes the relevant xorg.conf
>> file (however, modesetting does not work, one has to change it to
>> wsfb; also in my case - over VNC - the mouse driver has to be changed
>> to 'ws', although even this way it works incorrectly).
>> 
>> I tried to boot the rEFInd.iso file, I presume the same you've tried -
>> of v. 0.12 - and got the same result as you - just the logo in the
>> middle of the screen.
>> 
>> I'll install manually rEFInd in the vm I just spun up to see if it can
>> be recognized.
> 
> I was able to install rEFInd manually in the efi partition of that
> NetBSD installation and boot it under OVMF (I rebooted the machine and
> just hit 'escape' in the VNC window, which got me to the EFI setup
> menu, where I located the relevant efi file and moved it to the top).
> 
> Chavdar
> 
>> 
>>> 
>>> -bob
>>> 
>>> On Aug 6, 2020, at 6:20 PM, Chavdar Ivanov <ci4ic4%gmail.com@localhost> wrote:
>>> 
>>>> With:
>>>> 
>>>> 
>>>> /usr/pkg/bin/qemu-system-x86_64 \
>>>>       -device qemu-xhci \
>>>>       -device usb-tablet \
>>>>       -machine q35 \
>>>>       -bios /usr/pkg/share/ovmf/OVMFX64.fd \
>>>>       -m 4096 \
>>>>       -k en-gb \
>>>>       -smp 2 \
>>>>       -accel nvmm \
>>>>       -vnc :1 \
>>>>       -drive format=raw,file=/dev/zvol/rdsk/pail/testu-new \
>>>>       -net tap,fd=3 3<>/dev/tap1 \
>>>>       -net nic \
>>>>       -cdrom /iso/NetBSD-9.99.69-amd64.iso
>>>> 
>>>> 
>>>> I was able to boot today's -current in efi mode, no problem.
>>>> Obviously, I access the console over vnc.
>>>> 
>>>> Chavdar
>>>> 
>>>> On Thu, 6 Aug 2020 at 23:33, Robert Nestor <rnestor%mac.com@localhost> wrote:
>>>>> 
>>>>> Something simple I must be missing here.  I downloaded the CD image of rEFInd from:
>>>>>       http://sourceforge.net/projects/refind/files/0.12.0/refind-cd-0.12.0.zip/download
>>>>> 
>>>>> Burned it to a CD and tried booting that CD on my PC.  It doesn’t boot using BIOS, but it does boot using UEFI.  So I know the CD is good.  I saved the ISO file that I used to burn the CD.
>>>>> 
>>>>> Tried booting the ISO file in qemu with:
>>>>>       qemu-system-x86_64 -boot d -cdrom refind.iso -m 512
>>>>> 
>>>>> And got an error that it couldn’t boot with error code 0009.  Ok this appears to mean that qemu tried booting it with a default BIOS boot which the CD isn’t configured for. The recommended solution is to either add the BIOS boot code to the CD or specify a OVMF/UEFI boot file to Qemu.
>>>>> 
>>>>> Installed the OVMF package and tried booting again with:
>>>>>       qmeu-system-x86_64 -bios /usr/pkg/share/ovmf/OVMFX64.bin —m 512 \
>>>>>              -boot d -cdrom refind.iso
>>>>> 
>>>>> Got the Tianocore splash screen then the UEFI shell.  Entered “exit” at the shell prompt and got a message "Graphics Console Started" and then nothing.  Also tried the OVMFIA32.fd file with identical results.  Adding “-vga std” to the command line didn’t change things either.
>>>>> 
>>>>> For grins I added “-accel mvmm” to the command line and got the error:
>>>>>       Failed to execute a VCPU
>>>>> 
>>>>> So I have three questions:  First, what am I missing to get this bootable CD to boot up in qemu?  And second, is there a limitation in NVMM that prevents it from running this boot sequence? And finally, if I get the magic sequence that allows the CD to boot with qemu, is there a way of booting without getting the UEFI shell prompt?
>>>>> 
>>>>> Thanks
>>>> 
>>>> 
>>>> 
>>>> --
>>>> ----
>>> 
>> 
>> 
>> --
>> ----
> 
> 
> 
> -- 
> ----



Home | Main Index | Thread Index | Old Index