NetBSD Problem Report #59978
From www@netbsd.org Sun Feb 8 01:48:50 2026
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
client-signature RSA-PSS (2048 bits) client-digest SHA256)
(Client CN "mail.netbsd.org", Issuer "R13" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id BC84A1A923D
for <gnats-bugs@gnats.NetBSD.org>; Sun, 8 Feb 2026 01:48:49 +0000 (UTC)
Message-Id: <20260208014848.AAF971A923E@mollari.NetBSD.org>
Date: Sun, 8 Feb 2026 01:48:48 +0000 (UTC)
From: aran@100acres.us
Reply-To: aran@100acres.us
To: gnats-bugs@NetBSD.org
Subject: bootx64 cannot lookup files over nfsv3
X-Send-Pr-Version: www-1.0
X-From4GNATS: "aran@100acres.us via gnats" <gnats-admin@NetBSD.org>
>Number: 59978
>Category: lib
>Synopsis: bootx64 cannot lookup files over nfsv3
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: lib-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Feb 08 01:50:00 +0000 2026
>Last-Modified: Thu Jun 04 10:10:01 +0000 2026
>Originator: Aran Clauson
>Release: 10.1, pkgin
>Organization:
Personal
>Environment:
NetBSD owl.100acres.us 10.1 NetBSD 10.1 (GENERIC) #0: Mon Dec 16 13:08:11 UTC 2024 mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64
>Description:
I am net-booting UEFI from a diskless amd64 system. It gets bootx64.efi from tftp. It finds and loads boot.cfg and the kernel over NFSv3, but fails to find /stand/amd64/10.1/nfs/nfs.kmod. From tcpdump, it does an nfs_lookup on /stand, which succeeds, but bootx64 incorrectly says that it isn't a directory. This is because of the variable length file handle.
The patch below shifts the file attributes into the correct location.
>How-To-Repeat:
Net boot amd64, NFSv3 from UEFI.
>Fix:
RCS file: /cvsroot/src/sys/lib/libsa/nfs.c,v
retrieving revision 1.50.24.1
diff -c -r1.50.24.1 nfs.c
*** nfs.c 20 Sep 2024 11:31:32 -0000 1.50.24.1
--- nfs.c 8 Feb 2026 01:36:05 -0000
***************
*** 328,333 ****
--- 328,335 ----
}
setfh(newfd, replv3->fh);
+ alen = fhstore(d->version, replv3->fh);
+ memmove(&(replv3->fa), replv3->fh + alen + 4, sizeof(replv3->fa));
if (replv3->fattrflag) {
(void)memcpy(&newfd->u_fa.v3, &replv3->fa,
>Audit-Trail:
From: "Michael van Elst" <mlelstv@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/59978 CVS commit: src/sys/lib/libsa
Date: Thu, 4 Jun 2026 10:05:02 +0000
Module Name: src
Committed By: mlelstv
Date: Thu Jun 4 10:05:02 UTC 2026
Modified Files:
src/sys/lib/libsa: nfs.c
Log Message:
Fix PR 59978 (boot over NFSv3).
To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/lib/libsa/nfs.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.