From owner-freebsd-current Tue Feb 18 17:11:36 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 060EA37B401 for ; Tue, 18 Feb 2003 17:11:34 -0800 (PST) Received: from Shenton.org (23.ebbed1.client.atlantech.net [209.190.235.35]) by mx1.FreeBSD.org (Postfix) with SMTP id 9A84D43F85 for ; Tue, 18 Feb 2003 17:11:32 -0800 (PST) (envelope-from chris@Shenton.Org) Received: (qmail 37799 invoked by uid 1000); 19 Feb 2003 01:11:31 -0000 To: current@freebsd.org Subject: Re: Diskless: 5.0R scripts, boot, NFS mount problems I didn't have in 4.7S References: <87el65pi4e.fsf@Pectopah.shenton.org> From: Chris Shenton Date: 18 Feb 2003 20:11:31 -0500 In-Reply-To: <87el65pi4e.fsf@Pectopah.shenton.org> Message-ID: <87fzql6pmk.fsf@Pectopah.shenton.org> Lines: 72 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Chris Shenton writes: > I've moved the "mount -a" near the top of rc.d/diskless since it > runs commands which are and not available until /usr is mounted > (e.g., mtree). The NFS mount fails with a message I don't > understand: > > [udp] pectopah.shenton.org:/usr: RPCPROG_NFS: RPC: Unknown host Tasteless self-followup: I get the same error when the boot process fails and drops me to a shell; I can get it with UDP or TCP mounts. For example: mount_nfs -U -2 192.168.255.185:/usr /mnt mount_nfs -U -3 192.168.255.185:/usr /mnt mount_nfs -T -2 192.168.255.185:/usr /mnt mount_nfs -T -3 192.168.255.185:/usr /mnt The only difference is the [udp] vs [tcp] in the error msg: [tcp] 192.168.255.185:/usr: RPCPROG_NFS: RPC: Unknown host I sniffed traffic with tcpdump and ethereal: the diskless client is contacting the server so it's not having problems resolving that IP addr. I'm not hard-core enough to understand what might cause this failure, which occurs in /usr/src/sbin/mount_nfs/mount_nfs.c: if (portspec != NULL) { /* `ai' contains the complete nfsd sockaddr. */ nfs_nb.buf = ai->ai_addr; nfs_nb.len = nfs_nb.maxlen = ai->ai_addrlen; } else { /* Ask the remote rpcbind. */ nfs_nb.buf = &nfs_ss; nfs_nb.len = nfs_nb.maxlen = sizeof nfs_ss; if (!rpcb_getaddr(RPCPROG_NFS, nfsvers, nconf, &nfs_nb, hostp)) { if (rpc_createerr.cf_stat == RPC_PROGVERSMISMATCH && trymntmode == ANY) { trymntmode = V2; goto tryagain; } snprintf(errbuf, sizeof errbuf, "[%s] %s:%s: %s", netid, hostp, spec, clnt_spcreateerror("RPCPROG_NFS")); return (returncode(rpc_createerr.cf_stat, &rpc_createerr.cf_error)); } } To see if this was a portmapper/rpcbind issue, I tried doing the client mount and specifying the port: mount -o port=2049 192.168.255.185:/usr /mnt and got a slightly different error: [udp] 192.168.255.185:/usr: RPCMNT: clnt_create: RPC: Unknown host and now I'm definitely over my head trying to read mount_nfs.c. :-( I don't understand this since the client is able to mount /usr/local/diskless to get the root filesystem and run the kernel. But I believe pxeboot is doing this, not a full FreeBSD binary. What's the difference in the way the mount? Any suggestions? Thanks. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message