Subject: Re: BOOTP/BSDP failed: no FILENAME specified open /netbsd
To: None <port-macppc@netbsd.org>
From: Valeriy E. Ushakov <uwe@stderr.spb.ru>
List: port-macppc
Date: 05/14/2007 11:37:22
Joel CARNAT <joel@carnat.net> wrote:

> I'm trying to netboot my Mac mini.

I tried to netboot my ppc mini when I'd just got it and after a few
failures I found few pages on the net explaining that mini firmware
uses non-standard DHCP packets that ISC dhcpd (as shipped with netbsd)
doesn't understand.  There's even a patch to make it grok those
packets, but I figured burning a cd gonna be easier/faster.

Googling for

	 "mac mini" isc-dhcp patch

brings several pages that look familiar.


E.g. this page http://mike.passwall.com/macnc/ahowto.html says:

  No. None of the dhcp versions from ISC will work to deal with this
  as of present, nor does any other DHCP Server I tried.  THIS IS NOT
  THEIR FAULT!  Apple broke rules to make their system work.  Patches
  can be made for any of the versions of dhcp client from isc to work
  around Apple's not adhering to standards, but by default none of the
  dhcp systems I was able to try could deal with this NetBooting from
  Apple.

  (The standard that was broken that caused the patch to be required
  in a non Apple BootP/DHCP server was the MMS (Maximum Message Size)
  for BootP requests. I believe that normally, if a client does not
  state how large of a packet (in bytes) it can receive for response
  when it sends out a BootP request, the default is supposed to be 64
  bytes for vendor extentions. 64 bytes is not enough to pack all of
  these vendor special options. Just one alone can be over 50 bytes,
  and in some cases over 60 bytes.  The patch makes the "new" dhcp
  server look to see if option 221 is set in the incoming BootP/DHCP
  request, and is comparable to the string sent out by the client
  ("Apple MacNC") when requesting a Net Boot.  I could be wrong on
  this, and if I am, I am sure someone will tell me in an email
  message that uses ALL CAPS about how I am stupid, clueless and do
  not know about what I write! ;-)


And the patch at http://staff.harrisonburg.k12.va.us/~rlineweaver/macnb/
has this chunk that corroborates this:

+        /* Added for Mac NC to increase max packet size for return
+           Check to see if above set mms for future if Apple decides
+           To use industry standards to notify dhcpd of max packet size
+           Does anyone what the real max is for NetBooting Macs?
+           I know it is bad to make a guess and make it bigger than it
+           should be but it works for now. If anyone knows it, let me know!
+           This only applies to bootp requests and not dhcp requests. */
+        if (!mms && inpacket &&
+        	(op = lookup_option (&dhcp_universe, inpacket -> options, 
+                                 DHO_MAC_NC_CLIENT_ID))  &&
+		(!strcmp (op->data.data, "Apple MacNC")))  {
+			log_info("Received BootP request from Macintosh netboot client");
+                        mms = 576;
+        }
+
 	/* If the client has provided a maximum DHCP message size,
 	   use that; otherwise, if it's BOOTP, only 64 bytes; otherwise
 	   use up to the minimum IP MTU size (576 bytes). */

SY, Uwe
-- 
uwe@stderr.spb.ru                       |       Zu Grunde kommen
http://snark.ptc.spbu.ru/~uwe/          |       Ist zu Grunde gehen