NetBSD-Users archive

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

Re: EFI and Xen



On 5/14/2025 3:15 AM, Manuel Bouyer wrote:
> On Tue, May 13, 2025 at 10:59:13PM -0400, Chuck Zmudzinski wrote:
>> So, is netbsd/xen supposed to work with UEFI booting, or are there issues? I saw this commit which I thought might have enabled support for booting netbsd/xen on UEFI-only systems back in 2019:
> 
> snip
> 
> I have a server using EFI with Xen and NetBSD dom0. I use the NetBSD boot
> loader with:
> menu=Boot Xen PV:load /netbsd console=pc root=dk1; multiboot /xen-debug.gz dom0_mem=8192M console=com1,vga com1=115200,8n1 conring_size=4096k sync_console
> 
> If you have a serial console it may be worth a try, to get more messages.
> There are also Xen options to help debug this kind of issue (like:
> don't give the VGA console to dom0, delay before reboot and so on).
> If Xen keeps the VGA console, use console=com0 for NetBSD so that
> it sends it boot messages to Xen.
> 

Thanks for the helpful information!

One possible cause of the problem is that the older i915 driver we have which, IIRC, is ported from Linux 5.6 and is about 4 years old now, does not support my one year old Intel graphics chip. Still, the GENERIC kernel handles this by falling back to genfb0 so I still have a usable vga console with GENERIC. Before working on getting a serial console connected, I tried the console=com0 workaround but it did not help. I also tried setting gop to the display resolution of my monitor which the bootloader does not detect correctly, and also using userconf to disable i915* or acpivga*, and none of those workarounds helped either. Another thing I could try is Xen PVH Dom0 which I see has some users have successfully booted into a NetBSD Dom0 with but I think is still considered experimental by upstream for Xen 4.18.

Another odd thing I saw with this system (Intel Raptor Lake i5-14500). I first installed NetBSD 10.1 as a Xen HVM DomU on Xen 4.19.2 distributed by Fedora Linux, with a Fedora 41 Linux PV Dom0 before trying to boot NetBSD PV Dom0 on the pkgsrc version of Xen 4.18. In that configuration, the NetBSD GENERIC kernel did not detect hypervisor0 at mainbus0, and instead detected hyperv0 at cpu0, which would only be valid if the hypervisor was Microsoft Hyper-V instead of Xen! It still boots, but it uses the emulated Qemu devices for disk and network I/O instead of the Xen PV devices. Perhaps this is happening because, according to the information on the NetBSD port-xen HOWTO wiki page, some versions of Xen distributed by Linux distros don't compile Xen with CONFIG_PV_LINEAR_PT, which is required for NetBSD PV support. But I have not checked if Xen 4.19.2 shipped by Fedora is compiled without CONFIG_PV_LINEAR_PT. If Fedora's Xen 4.19.2 does have CONFIG_PV_LINEAR_PT, though, then something strange is happening on my system with Xen because I presume NetBSD/Xen HVM should detect hypervisor0, not hyperv0, when running on Xen with the CONFIG_PV_LINEAR_PT option.

I may need to get a new USB to serial adapter so I can get some debugging messages from the serial port on my Windows 11 laptop. I have an old USB to serial adapter that worked with a Windows 8.1 laptop but it stopped working when upgraded to Windows 10.

I will report back if/when I get more messages from the serial console.

Chuck Zmudzinski


Home | Main Index | Thread Index | Old Index