Subject: Re: PXE boot support
To: Andreas Gustafsson <gson@nominum.com>
From: Jason R Thorpe <thorpej@wasabisystems.com>
List: port-i386
Date: 02/18/2002 08:58:52
On Sun, Feb 17, 2002 at 09:33:57PM -0800, Andreas Gustafsson wrote:

 > Cool - thank you :-).

You are most welcome :-)

 > This morning I successfully PXE-booted a diskless i386 system using an
 > Intel EtherExpress PRO/100 card, a flash chip flashed with the Intel
 > Boot Agent, and a DHCPD+TFTP+NFS server.

Cool.

 > One problem I noticed was that the system defaulted to booting with a
 > serial console.  This is because pxeboot defines DIRECT_SERIAL in the
 > Makefile and calls initio(CONSDEV_AUTO) in main.c; if DIRECT_SERIAL is
 > defined, CONSDEV_AUTO will prefer the serial port over the PC console
 > whether it is connected to anything or not.  I suggest making the
 > following change which was made to the biosboot main.c in 1998 but
 > never made it to netboot or pxeboot:

Ok, I'll fix this up.  Thanks for the patch.

 > Another minor problem: although a pxeboot built from this morning's
 > sources had no problem loading from /tftpboot/pxeboot.bin and then
 > booting a kernel called "netbsd", the current sources seem to use the
 > DHCP "filename" option for both the filename of the pxeboot image and
 > the filename of the kernel.  This seems suboptimal - I am now running
 > a kernel called "pxeboot.bin" loaded by a pxeboot image also called
 > "pxeboot.bin", but it would be nice if I could give them different
 > names again.

Ah, yes, this will be addressed shortly when I commit the NetBSD
Vendor Class Identifier changes to libsa and the kernel (which I'll
probably do in a couple of hours).  When that change is made, pxeboot
will no longer put "PXEClient" in its VCI option (which now upon further
reflection, it probably should never have done in the first place, but
the code that was borrowed from FreeBSD did it, and I clearly didn't think
hard enough about it when I used that code to implement by pxeboot).  This
will allow you to distinguish between the PXE BIOS's DHCP requests and
pxeboot's, and so you can do something like this:

	class "pxe-clients-ia32" {
		match if substring (option vendor-class-identifier, 0, 20) =
		    "PXEClient:Arch:00000";
		filename "pxeboot.bin";
	}

	host net4501 {
		hardware ethernet 0:0:24:c0:2f:90;
		fixed-address 10.0.0.4;
		option root-path "/u1/diskless/net4501";
	}

So, only IA32 PXE BIOS requests will see "pxeboot.bin" in the DHCP reply.

(Really, I promise I will document this stuff in diskless(8) once I
get the NetBSD VCI option stuff committed :-)

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>