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

2005-06-24 Thread Brian Candler
On Fri, Jun 24, 2005 at 01:50:37PM -0400, John Baldwin wrote:
> 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
> % make LOADER_TFTP_SUPPORT=yes
> % cp /usr/obj/usr/src/sys/boot/i386/pxeldr/pxeboot /usr/tftpboot

Thank you, that's very clear. Re-reading the manpage I do now see the phrase
"selectable through compile-time options"; perhaps it would be worth also
showing those options.

Is there any fundamental reason why both couldn't be compiled in at once,
e.g. limitations on the pxeboot binary size? Or is it just awkward to
implement?

I would have no objection to

options root-path = "tftp://192.168.0.1/usr/tftpboot";

I would also have no objection to "pxeboot.nfs" and "pxeboot.tftp" being
built :-)

I'll try building the tftp version when back in the office next week.

Thanks again,

Brian.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


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

2005-06-24 Thread John Baldwin
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: 192.168.0.1
>   pxe_open: server path: /pxeroot
>   pxe_open: gateway ip: 0.0.0.0
>   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 192.168.0.240
> 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 "192.168.0.1:/usr/tftpboot";
>
> 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
% make LOADER_TFTP_SUPPORT=yes
% cp /usr/obj/usr/src/sys/boot/i386/pxeldr/pxeboot /usr/tftpboot

-- 
John Baldwin <[EMAIL PROTECTED]>  <><  http://www.baldwin.cx/~john/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org

-- 
John Baldwin <[EMAIL PROTECTED]>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


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

2005-06-24 Thread Brian Candler
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: 192.168.0.1
  pxe_open: server path: /pxeroot
  pxe_open: gateway ip: 0.0.0.0
  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 192.168.0.240 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 "192.168.0.1:/usr/tftpboot";

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?

Regards,

Brian Candler.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"