From edwin@mavetju.org  Wed May  7 06:41:50 2008
Return-Path: <edwin@mavetju.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8E8941065673
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  7 May 2008 06:41:50 +0000 (UTC)
	(envelope-from edwin@mavetju.org)
Received: from mail5out.barnet.com.au (mail5.barnet.com.au [202.83.178.78])
	by mx1.freebsd.org (Postfix) with ESMTP id 4958B8FC1A
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  7 May 2008 06:41:49 +0000 (UTC)
	(envelope-from edwin@mavetju.org)
Received: by mail5out.barnet.com.au (Postfix, from userid 1001)
	id E35F52218CD4; Wed,  7 May 2008 16:41:48 +1000 (EST)
Received: from mail5auth.barnet.com.au (mail5.barnet.com.au [202.83.178.78])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "mail5auth.barnet.com.au", Issuer "*.barnet.com.au" (verified OK))
	by mail5.barnet.com.au (Postfix) with ESMTP id A69A421B2C16
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  7 May 2008 16:41:48 +1000 (EST)
Received: from k7.mavetju (k7.mavetju.org [10.251.1.18])
	by mail5auth.barnet.com.au (Postfix) with ESMTP id 50DAE2218C1D
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  7 May 2008 16:41:48 +1000 (EST)
Received: by k7.mavetju (Postfix, from userid 1001)
	id 0F522BAE; Wed,  7 May 2008 16:41:48 +1000 (EST)
Message-Id: <20080507064148.0F522BAE@k7.mavetju>
Date: Wed,  7 May 2008 16:41:48 +1000 (EST)
From: Edwin Groothuis <edwin@mavetju.org>
Reply-To: Edwin Groothuis <edwin@mavetju.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [patch] teach pxeboot.8 about ISC DHCP v3
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         123484
>Category:       docs
>Synopsis:       [patch] teach pxeboot.8 about ISC DHCP v3
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    edwin
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 07 06:50:00 UTC 2008
>Closed-Date:    
>Last-Modified:  Wed Jun 11 03:50:01 UTC 2008
>Originator:     Edwin Groothuis
>Release:        FreeBSD 6.3-RELEASE i386
>Organization:
-
>Environment:
System: FreeBSD k7.mavetju 6.3-RELEASE FreeBSD 6.3-RELEASE #0: Sun Feb 17 22:11:52 EST 2008 edwin@k7.mavetju:/usr/src/sys/i386/compile/SMP i386


>Description:

Fix documentation in pxeboot.8 with regarding to the DHCP server
configuration lines.

     The pxeboot binary is loaded just like any other boot file, by specifying
     it in the DHCP server's configuration file.  Below is a sample configura-
|    tion for the ISC DHCP v3 server:

           option domain-name "example.com";
           option routers 10.0.0.1;
           option subnet-mask 255.255.255.0;
           option broadcast-address 10.0.0.255;
           option domain-name-servers 10.0.0.1;
           server-name "DHCPserver";
           server-identifier 10.0.0.1;
+          next-server 10.0.0.1;

           default-lease-time 120;
           max-lease-time 120;

           subnet 10.0.0.0 netmask 255.255.255.0 {
                  filename "pxeboot";
                  range 10.0.0.10 10.0.0.254;
           }

+    next-server is the IP address of the next server in the bootstrap
+    process, i.e.  your TFTP server or NFS server.  pxeboot recognizes

See also http://www.mavetju.org/weblog/html/00110.html for some
details on the next-server change in the ISC DHCP server.

>How-To-Repeat:
>Fix:

Index: pxeboot.8
===================================================================
RCS file: /home/ncvs/src/sys/boot/i386/pxeldr/pxeboot.8,v
retrieving revision 1.8
diff -u -r1.8 pxeboot.8
--- pxeboot.8	7 Oct 2006 10:39:34 -0000	1.8
+++ pxeboot.8	7 May 2008 06:39:27 -0000
@@ -55,7 +55,7 @@
 .Nm
 binary is loaded just like any other boot file,
 by specifying it in the DHCP server's configuration file.
-Below is a sample configuration for the ISC DHCP v2 server:
+Below is a sample configuration for the ISC DHCP v3 server:
 .Bd -literal -offset indent
 option domain-name "example.com";
 option routers 10.0.0.1;
@@ -64,6 +64,7 @@
 option domain-name-servers 10.0.0.1;
 server-name "DHCPserver";
 server-identifier 10.0.0.1;
+next-server 10.0.0.1;
 
 default-lease-time 120;
 max-lease-time 120;
@@ -74,10 +75,11 @@
 }
 
 .Ed
+.Va next-server
+is the IP address of the next server in the bootstrap process, i.e.
+your TFTP server or NFS server.
 .Nm
 recognizes
-.Va next-server
-and
 .Va option root-path
 directives as the server and path to NFS mount for file requests,
 respectively, or the server to make TFTP requests to.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-doc->brd 
Responsible-Changed-By: brd 
Responsible-Changed-When: Sat May 10 01:56:32 UTC 2008 
Responsible-Changed-Why:  
grab. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=123484 
Responsible-Changed-From-To: brd->edwin 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Wed May 28 22:22:23 UTC 2008 
Responsible-Changed-Why:  
Take back (brd agreed) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=123484 

From: Edwin Groothuis <edwin@mavetju.org>
To: FreeBSD Gnats Submit <freebsd-gnats-submit@freebsd.org>
Cc:  
Subject: docs/123484: [patch] teach pxeboot.8 about ISC DHCP v3
Date: Wed, 11 Jun 2008 13:44:48 +1000

 ----- Forwarded message from Ruslan Ermilov <ru@freebsd.org> -----
 
 > > > Not having the next-server statement in the DHCP configuration will
 > > > prevent QEMU to boot via TFTP. I don't know if it will work with
 > > > NFS if the statement isn't there, but it won't work with TFTP
 > > > anymore.
 > > > 
 > > The proposed patch is incorrect, as explained.  It needs to be
 > > fixed, but in a different way.
 > 
 > I tried this:
 > 
 >     subnet 192.168.253.0 netmask 255.255.255.0 {
 > 	    range 192.168.253.20 192.168.253.120;
 > 	    option routers 192.168.253.1;
 > 
 > 	    option bootfile-name "pxeboot";
 > 	    option root-path "192.168.253.2:/mnt/ad8/qemu/os/FreeBSD-6.3";
 > 	    filename "pxeboot";
 > 	    server-identifier 192.168.253.1;
 >     #       next-server 192.168.253.1;
 >     }
 > 
 > My QEMU host doesn't do PXE booting, it keeps doing DHCP requests.
 > I wouldn't be surprsed if it was an implementation-specific thing
 > per ROM on the NIC.
 > 
 > The moment I uncomment the next-server statement, it loads pxeboot
 > via TFTP from 192.168.253.1 and then NFS from 192.168.253.2.
 > 
 > How about I make the text to:
 > 
 >      The pxeboot binary is loaded just like any other boot file,
 >      by specifying it in the DHCP server's configuration file.
 >      Below are the relevant lines for the configuration of the ISC
 >      DHCP v3 server, where 10.0.0.1 is the network router, 10.0.0.2
 >      is the DHCP server, 10.0.0.3 is the TFTP server and 10.0.0.4
 >      is the NFS server:
 > 
 >            server-name "DHCPserver";
 >            server-identifier 10.0.0.2;
 >            option routers 10.0.0.1;
 >            option domain-name-servers 10.0.0.2;
 > 
 >            subnet 10.0.0.0 netmask 255.255.255.0 {
 >                 range 10.0.0.10 10.0.0.254;
 > 		next-server 10.0.0.3;
 >                 filename "pxeboot";
 > 		option root-path "10.0.0.4:/exports/FreeBSD-6.3";
 >            }
 > 
 This part looks good (except for the mix of tabs/spaces :-).
 
 >      pxeboot uses the next-server option as the TFTP server
 >      to download the file specified in the filename directive and
 >      root-path option as the NFS server and NFS mount path for the
 >      file system. Note that pxeboot expects to fetch /boot/loader.rc
 >      from the specified server before loading any other files.
 > 
 This is misleading.  The first sentence above basically says that
 "pxeboot is used to download pxeboot".  Instead, it's like follows:
 
 1.  The PXE ROM uses either "next-server" (if specified) or the
     DHCP server's IP as the TFTP server to download the "pxeboot"
     binary specified in the "filename" directive
 
 2.  "pxeboot" then uses:
     for NFS (default compilation):
       - root-path with an embedded IP address,
       - next-server's root-path
       - DHCP server's root-path
     for TFTP (when compiled with option LOADER_TFTP_SUPPORT):
       - next-server
       - DHCP server
       (e.g. as in 1 above).
 
 
 Cheers,
 -- 
 Ruslan Ermilov
 ru@FreeBSD.org
 FreeBSD committer
 
 ----- End forwarded message -----
 
 -- 
 Edwin Groothuis      |            Personal website: http://www.mavetju.org
 edwin@mavetju.org    |              Weblog: http://www.mavetju.org/weblog/
>Unformatted:
