NetBSD-Users archive

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

Re: EFI and Xen



On 2/13/2025 10:54 AM, César Catrián C. wrote:
> Hello,
> 
> 
> I am migrating a Xen NetBSD 10 system to a new hardware and I would like to know if EFI is supported for XEN to pass on the vga console for keeping on loading the kernel.
> 
> That's because after Xen loading stage at boot, reach the stage of relinquishing VGA console, it goes blank.
> 
> If there is no solution just I will return to legacy boot.
> 
> 
> Kind regards

Hi,

I am seeing the same problem, but my system is so new that, unfortunately, legacy BIOS boot is not supported at all on the system, it is truly a UEFI-only system.

The system has an Intel Raptor Lake i5-14500 CPU, and it is configured to boot several systems, such as Fedora, Windows, Alma Linux, and Xen with the various Linux distros. Xen works well with various flavors of Linux Dom0 on the box. I decided to try out NetBSD 10.1, and I got NetBSD 10.1 with the GENERIC amd64 kernel booting on bare metal using UEFI.

So I followed the guide for port netbsd/xen by installing the Xen 4.18 kernel and tools from pkgsrc and adding a boot option for Xen to boot.cfg using the "load" command for the netbsd-XEN3_DOM0 kernel and the "multiboot" command for the Xen kernel.

When I try it I can see that the bootloader loads the Xen kernel and the Xen kernel displays some messages on the VGA console. Then I see that the bootloader loads the netbsd-XEN3_DOM0 kernel, but before any kernel messages are displayed from the netbsd DOM0 kernel the screen goes blank for several seconds and then falls back to the default UEFI boot option on the system, which happens to be grub2-efi for Fedora. That is normal behavior for the UEFI on my box: When the selected non-default boot option fails spectacularly, it just gives up and falls back to the default UEFI boot option.

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:

https://mail-index.netbsd.org/source-changes/2019/09/13/msg108951.html

The commit message reads:

> Add multiboot 2 support to x86 bootloaders
> 
> multiboot 2 is required to boot Xen on an EFI system.
> This also require a kernel patch for properly discovering
> the ACPI RSDP, which is available after 20190912, in
> src/sys/arch/x86/acpi/acpi_machdep.c 1.26-1.28
> 
> There are a few missing bit in this multiboot 2 implementation
> (which are unused by Xen):
> - Header tags Address, Freambuffer, and Relocatable are ignored
> - Tags APM and Network are not provided
> - Tags ACPI old and ACP new are only provided for ACPI boot
> - Tag boot device does not provides the subpart (BSD disklabel partition)
> 
> Notes:
> - multiboot2 is disabled in dosboot, otherwise the binary
>   gets too big and build fails.
> - in src/sys/arch/i386/stand/efiboot, consinit() is renamed
>   as efi_consinit() to avoid prototype conflicts in src/sys/sys/systm.h

Thanks for any information anyone might have to help me determine if it is possible to boot NetBSD/xen on my UEFI-only system.

Chuck Zmudzinski


Home | Main Index | Thread Index | Old Index