Daemon News Ezine BSD News BSD Mall BSD Support Forum BSD Advocacy BSD Updates

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

Re: pxeboot, NFS and root-path: bug or documentation error?

On Friday 24 June 2005 01:03 pm, Brian Candler wrote:
> I have been setting up a pxeboot "jumpstart" environment for FreeBSD 4.11,
> following the instructions at
> http://www.freebsd.org/doc/en_US.ISO8859-1/articles/pxe/
> Rather than build pxeboot like this:
> # rm -rf /usr/obj/*
> # cd /usr/src/sys/boot
> # make
> # cp /usr/src/sys/boot/i386/pxeldr/pxeboot /usr/tftpboot
> I just copied /boot/pxeboot from the FreeBSD-4.11 CD-ROM. Otherwise I
> followed the instructions very closely.
> The pxeboot client machine is a Compaq ProLiant DL380.
> On first attempt, it got as far as pxeboot starting, and then:
>   pxe_open: server addr:
>   pxe_open: server path: /pxeroot
>   pxe_open: gateway ip:
>   Booting [kernel]...
>   can't load 'kernel'
>   can't load 'kernel.old'
> And my NFS server logs a failed attempt to mount /pxeroot:
>   Jun 24 16:32:40 sr-mon-00 mountd[642]: mount request from
> for non existent path /pxeroot
>   Jun 24 16:32:49 sr-mon-00 last message repeated 59 times
> This is strange; I thought that at this stage pxeboot would be pulling
> across the kernel and ramdisk via TFTP from /usr/tftpboot, although the
> documentation is far from clear. pxeboot(8) says:
>      pxeboot recognizes next-server and option root-path directives as the
>      server and path to NFS mount for file requests, respectively, or the
>      server to make TFTP requests to.
> (Erm, so exactly how do I choose whether to use NFS or to use TFTP for the
> next stage?)
> Anyway, assuming that I'm forced to use NFS at this point, I added another
> DHCP option:
>   option root-path "";
> This option is not shown in the example dhcpd.conf in pxeboot(8), nor in
> the article referred to above. However, if I also put an entry in the NFS
> server's /etc/hosts file for the client DHCP address, it then works
> properly.
> So the question is: when pxeboot runs on the client, is it able to fetch
> loader.rc, the kernel and ramdisk via TFTP, or only via NFS?
> If it's only NFS, then I think the pxeboot(8) manpage, and the pxeboot
> article, ought to be updated. If it *can* use TFTP, does anyone have any
> suggestions for what I was doing wrong?

It uses TFTP to fetch the pxeboot binary itself.  After that, it uses either 
NFS or TFTP.  By default it uses NFS to access /boot/loader and friends.  If 
you want it to just use TFTP and not use NFS at all, you need to recompile 
pxeboot with LOADER_TFTP_SUPPORT=yes defined in make.  That is:

% cd /sys/boot
% make clean
% cp /usr/obj/usr/src/sys/boot/i386/pxeldr/pxeboot /usr/tftpboot

John Baldwin <john@xxxxxxxxxx>  <><  http://www.baldwin.cx/~john/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org

John Baldwin <jhb@xxxxxxxxxxx>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org