NetBSD-Bugs archive

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

kern/60051: Netboot UEFI without disk



>Number:         60051
>Category:       kern
>Synopsis:       Netboot UEFI without disk
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 03 04:45:00 +0000 2026
>Originator:     Aran Clauson
>Release:        NetBSD 10.1
>Organization:
>Environment:
NetBSD owl.100acres.us 10.1 NetBSD 10.1 (GENERIC) #0: Mon Dec 16 13:08:11 UTC 2024  mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/amd64/compile/GENERIC amd64
>Description:
With PR #59978 applied, NetBSD will netboot with a usb drive installed, but will not boot without a storage device.

The problem is the bootinfo array is truncated at BOOTINFO_BIOSGEOM in locore.s.  Without a storage device, the length of this entry is zero and the start function stops processing entries.  On my system, this truncates the list from 12 to 5 items.  The kernel can't write to the console and cannot find the network interface to access NFS.  
>How-To-Repeat:
Apply 59978 and try to boot from a TFTP and NFS server.
>Fix:
Mark set
RCS file: /cvsroot/src/sys/arch/i386/stand/lib/bootinfo_biosgeom.c,v
retrieving revision 1.24
diff -u -r1.24 bootinfo_biosgeom.c
--- bootinfo_biosgeom.c	1 Aug 2019 13:11:03 -0000	1.24
+++ bootinfo_biosgeom.c	3 Mar 2026 04:30:53 -0000
@@ -179,5 +179,7 @@
 	if (nvalid < nhd)
 		bibg_len -= (nhd - nvalid) * sizeof(struct bi_biosgeom_entry);
 
-	BI_ADD(bibg, BTINFO_BIOSGEOM, bibg_len);
+    if (bibg_len > 0) 
+      BI_ADD(bibg, BTINFO_BIOSGEOM, bibg_len);
+    
 }



Home | Main Index | Thread Index | Old Index