From owner-freebsd-questions@FreeBSD.ORG Mon May 26 02:43:37 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 16ED637B401 for ; Mon, 26 May 2003 02:43:37 -0700 (PDT) Received: from Gina.esfm.ipn.mx (esfm.ipn.mx [148.204.102.61]) by mx1.FreeBSD.org (Postfix) with ESMTP id 450E743FBD for ; Mon, 26 May 2003 02:43:36 -0700 (PDT) (envelope-from mrspock@esfm.ipn.mx) Received: from Gina.esfm.ipn.mx (localhost [127.0.0.1]) by Gina.esfm.ipn.mx (8.12.6p2/8.12.6) with ESMTP id h4Q9h4M2042926; Mon, 26 May 2003 04:43:04 -0500 (CDT) (envelope-from mrspock@esfm.ipn.mx) Received: from localhost (mrspock@localhost)h4Q9h4v2042923; Mon, 26 May 2003 04:43:04 -0500 (CDT) X-Authentication-Warning: Gina.esfm.ipn.mx: mrspock owned process doing -bs Date: Mon, 26 May 2003 04:43:04 -0500 (CDT) From: Eduardo Viruena Silva To: William Rose In-Reply-To: <1053936567.27834.26.camel@miniluv.zip-it.org> Message-ID: <20030526041433.R42397@Gina.esfm.ipn.mx> References: <1053936567.27834.26.camel@miniluv.zip-it.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-questions@freebsd.org Subject: Re: PXE boot seems to use incorrect NFS root X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 May 2003 09:43:37 -0000 On Mon, 26 May 2003, William Rose wrote: > Hi, > > I'm trying to set up my gateway machine to offer a FreeBSD live boot to > PXE capable clients, namely my Compaq TabletPC. The TabletPC has a > Intel Pro 100/M, which seems to work fine (after I patched the if_fxp.c > file with the new device id). I have working TFTP, DHCP and NFS servers > (as far as I can tell). I have a generic kernel plus options BOOTP, > BOOTP_NFSROOT, BOOTP_NFSV3 and BOOTP_COMPAT. > > I have created a new diskless root manually -- not by using the > technique suggested in the article on freebsd.org. But I've fixed > /etc/fstab to reflect the NFS mounted root. I'm not trying to run X > (yet). This is more to get a booting FreeBSD on a system that does not > have a CD-ROM, floppy or normal keyboard (USB keyboard and mouse only). > So I tend to run into problems as I can't get usbd to run, and this is > why I have only been able to do very limited debugging. > > What happens is that the PXE code runs, gets an IP address and loads the > pxeboot program via TFTP. This is then able to mount the NFS volume I > specify in the root-path option in /etc/dhcpd.conf. It loads the kernel > and modules, boots, detects devices (including my NIC), and runs DHCP to > get an IP again and the root-path so it can mount the NFS root. > > It fails shortly thereafter: > > [snipped up to DHCP Ack with option root-path] > Adjusted interface fxp0 > Shutdown interface faith0 > * Mounting root from nfs:192.168.0.1:/pxeboot > no such device 'pxeboot' > setrootbyname failed > NFS ROOT: 192.168.123.1:/pxeboot > Interface fxp0 IP-Address 192.168.0.7 Broadcast 192.168.0.255 > [blah blah blah] > fstab: /etc/fstab:0: No such file or directory > [blah blah blah] --------------------- You did not say which version of FreeBSD you are using. Diskless boot has two steps implemented by scripts: /etc/rc.diskless1 and /rc.etc/diskless2. If you have /conf/default/etc, this directory is copied in a memory file system where /etc is mounted. If you have /conf/client_IP/etc then you can configure a particular client in there, depending on its IP. As you can see, the process above can overwrite your /etc/fstab/ in two different points. Now, it seems to me you are not setting "/etc/fstab" correctly. Look at mine: Isabeau:/usr/diskless/rootfs/etc> cat fstab 192.168.123.112:/usr/diskless/rootfs / nfs rw 0 0 192.168.123.112:/usr /usr nfs rw 1 1 Isabeau:/usr/diskless/rootfs/etc> are you sure your /etc/fstab says: "nfs" after the mounting points? > > ... and drops to a shell I can't use (keyboard has stopped working now). > The value on the line marked by (*) seems to be coming from the > /etc/fstab on the exported /pxeboot root fs I have created (not option > root-path as I expected). nop, this is mounted by your kernel. > > Is this all my own silly fault for not using the approved technique? of course not. > What have I left out? I can send snippets of dhcpd or other > configuration files if helpful. > please post /etc/fstab > cheers, > Will >