RFI Mac mini Late 2012 iPXE lpelinux chain booting with bless nextonly flag.

Originator:michalm.mac
Number:rdar://24237248 Date Originated:19.1.2016
Status:Open Resolved:
Product:Mac Product Version:Mac mini 6,2
Classification:Other bug Reproducible:Always
 
Summary:
I would like to request comment on problem I discovered related to booting with MBR legacy support and bless --nextonly flag. 

We are exprimenting with PXE boot in our Apple lab using iPXE (Mac minis Late 2012). This because we want to deploy Windows and Linux to Mac mini's second hard drive via PXE boot as done in PC classrooms. Since Mac firmware does not support PXE we are using iPXE on first hard drive partition.

iPXE is booting via Mac firmware lagacy MBR boot with BIOS emulation.

Boot looks like this: Mac Firmware -> iPXE -> downloads and runs lpxelinux.

There are several boot scenarios.

1) [works correctly] Booting iPXE once via. Apple firmware boot menu when holding down option key from iPXE on HDD partition (or iPXE USB flash drive).
2) [works correctly] Setting iPXE to permanently boot from HDD partion with bless --device /dev/diskX --setBoot --legacy 
3) [problem] Booting iPXE once from HDD partion using --nextonly flag (bless --device /dev/diskX --setBoot --legacy --nextonly)

iPXE starts, gets IP address, dowloads lpxelinux but ends with error:
Failed to load ldlinux.c32.
Boot Failed: ... (See attachment)

What is going on? Is there a reason for lpxelinux loading to fail during boot with --nextonly flag bug succeed without nextonly flag?

Steps to Reproduce:


Expected Results:


Actual Results:


Version:
Mac mini Late 2012 - Macmini6,2

Notes:
SIP does not apply here. Bless command would be run from Netbooted OS X or SIP would be disabled

Configuration:
Macmini6,2

Comments

One more note.

Case 1 boot to rEFInd through firmware boot menu: WORKS Boot (holding down option key) -> type firmware password (optional) -> select EFI Boot rEFInd -> select Boot Legacy OS iPXE -> load pxelinux

Case 2 permanent boot to rEFInd: FAILS bless --setBoot --folder /Volumes/rEFInd/EFI/refind --folder /Volumes/rEFInd/EFI/refind/x64_refind.efi Boot -> rEFInd -> select Boot Legacy OS iPXE -> load pxelinux <- fails with "Failed to load ldlinux.c32."

For Case 2 solution was to user --shortform option with bless.

--nextonly is still no go even with --shortform.

By michalm.mac at Feb. 17, 2016, 11:13 a.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!