[ipxe-devel] [ipxe/ipxe] Apple (#54)

Michael Kuron notifications at github.com
Sat May 28 14:49:15 UTC 2016


When booting iPXE over the network on a Mac via the method described at http://forum.ipxe.org/showthread.php?tid=7323&pid=11253#pid11253 (wrapping snponly.efi into a .nbi bundle and serving that via Apple's NetBoot/NetInstall service), one can chainload Linux kernels and EFI binaries just fine.
However, one cannot chainload Mac OS X 10.11 and higher because Apple does not use standard PXE EFI protocols to obtain the DHCP packet from EFI. For Mac OS X 10.10 and lower, this was no problem as the kernel contained a DHCP client (see [bsd/kern/netboot.c](http://opensource.apple.com//source/xnu/xnu-2782.40.9/bsd/kern/netboot.c), line 646) that was used when the DHCP packet could not be obtained from EFI. Mac OS X 10.11 removes that DHCP client and panics if no DHCP packet can be obtained from EFI.

This pull request adds support for the Apple NetBoot EFI protocol to iPXE so that iPXE can pass on its DHCP packet to the operating system.
With this patch applied, Mac OS X 10.11 and higher can be chainloaded like this:
```
set nbiname OSX-10111.nbi
set serverip ${next-server}
set tftpboot tftp://${serverip}
set netbootsp0 /Library/NetBoot/NetBootSP0
set root-path nfs:${serverip}:${netbootsp0}:${nbiname}/NetInstall.dmg
initrd --name x86_64\kernelcache ${tftpboot}/NetBoot/NetBootSP0/${nbiname}/i386/x86_64/kernelcache
kernel ${tftpboot}/NetBoot/NetBootSP0/${nbiname}/i386/booter
imgargs booter -v rp=${root-path}
boot
```
Without this patch applied, the above only worked on Mac OS X 10.10.5 and lower.

*Acknowledgements*:
The details about the Apple NetBoot EFI protocol came from https://github.com/Piker-Alpha/macosxbootloader/blob/master/sdk/include/Protocol/AppleNetBoot/AppleNetBoot.h as Apple has not, to my knowledge, published a specification about their EFI protocols.
You can view, comment on, or merge this pull request online at:

  https://github.com/ipxe/ipxe/pull/54

-- Commit Summary --

  * Apple NetBoot protocol
  * Reimplement Apple NetBoot protocol
  * Remove testing code
  * Merge remote-tracking branch 'origin/master' into apple

-- File Changes --

    M src/image/efi_image.c (8)
    A src/include/ipxe/applenetboot.h (10)
    A src/include/ipxe/efi/Protocol/AppleNetBoot.h (67)
    A src/interface/efi/efi_applenetboot.c (68)

-- Patch Links --

https://github.com/ipxe/ipxe/pull/54.patch
https://github.com/ipxe/ipxe/pull/54.diff

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/ipxe/ipxe/pull/54
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20160528/07636906/attachment.htm>


More information about the ipxe-devel mailing list