PXE boot seems to use incorrect NFS root
Eduardo Viruena Silva
mrspock at esfm.ipn.mx
Mon May 26 02:43:37 PDT 2003
On Mon, 26 May 2003, William Rose wrote:
> 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
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
More information about the freebsd-questions