Post Reply 
 
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mac with MBR iPXE and bless nextonly
2016-01-19, 01:36
Post: #1
Mac with MBR iPXE and bless nextonly
We are exprimenting with PXE boot in out Apple lab using iPXE (Mac minis Late 2012).

Described problem may not be directly related to iPXE since it might be more of Apple firmware issue combined with pxelinux.
I've seen few Mac related post on this forum so someone could now what is going on.

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 USB flash drive or HDD partition.
2) [works correctly] Setting iPXE permanently 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 http://i.imgur.com/NIF3GC3.jpg

Do you think is just Apple bug or there might be explanation for this?

NVRAM states

Code:
NVRAM default (boot OS X from Macintosh HD)
efi-boot-device    <array><dict><key>MemoryType</key><integer size="64">0xb</integer><key>StartingAddress</key><integer size="64">0xff990000</integer><key>IOEFIDevicePathType</key><string>HardwareMemoryMapped</string><key>EndingAddress</key><integer size="64">0xffb2ffff</integer></dict><dict><key>IOEFIDevicePathType</key><string>MediaFirmwareVolumeFilePath</string><key>Guid</key><string>2B0585EB-D8B8-49A9-8B8C-E21B01AEF2B7</string></dict><dict><key>IOEFIBootOption</key><string>HD</string></dict></array>%00
efi-boot-device-data    %01%03%18%00%0b%00%00%00%00%00%99%ff%00%00%00%00%ff%ff%b2%ff%00%00%00%00%04​%06%14%00%eb%85%05+%b8%d8%a9I%8b%8c%e2%1b%01%ae%f2%b7%7f%ff%04%00
BootCampHD    %02%01%0c%00%d0A%03%0a%00%00%00%00%01%01%06%00%02%1f%03%12%0a%00%01%00%00%0​0%00%00%7f%ff%04%00

NVRAM after bless --device /dev/disk0s2 --setBoot --nextonly --legacy (boot through iPXE once via MBR legacy mode)

efi-boot-next    <array><dict><key>MemoryType</key><integer size="64">0xb</integer><key>StartingAddress</key><integer size="64">0xff990000</integer><key>IOEFIDevicePathType</key><string>HardwareMemoryMapped</string><key>EndingAddress</key><integer size="64">0xffb2ffff</integer></dict><dict><key>IOEFIDevicePathType</key><string>MediaFirmwareVolumeFilePath</string><key>Guid</key><string>2B0585EB-D8B8-49A9-8B8C-E21B01AEF2B7</string></dict><dict><key>IOEFIBootOption</key><string>HD</string></dict></array>
efi-boot-next-data    %01%03%18%00%0b%00%00%00%00%00%99%ff%00%00%00%00%ff%ff%b2%ff%00%00%00%00%04​%06%14%00%eb%85%05+%b8%d8%a9I%8b%8c%e2%1b%01%ae%f2%b7%7f%ff%04%00
BootCampHD    %02%01%0c%00%d0A%03%0a%00%00%00%00%01%01%06%00%02%1f%03%12%0a%00%01%00%00%0​0%00%00%7f%ff%04%00
efi-boot-device    <array><dict><key>MemoryType</key><integer size="64">0xb</integer><key>StartingAddress</key><integer size="64">0xff990000</integer><key>IOEFIDevicePathType</key><string>HardwareMemoryMapped</string><key>EndingAddress</key><integer size="64">0xffb2ffff</integer></dict><dict><key>IOEFIDevicePathType</key><string>MediaFirmwareVolumeFilePath</string><key>Guid</key><string>2B0585EB-D8B8-49A9-8B8C-E21B01AEF2B7</string></dict><dict><key>IOEFIBootOption</key><string>HD</string></dict></array>%00
efi-boot-device-data    %01%03%18%00%0b%00%00%00%00%00%99%ff%00%00%00%00%ff%ff%b2%ff%00%00%00%00%04​%06%14%00%eb%85%05+%b8%d8%a9I%8b%8c%e2%1b%01%ae%f2%b7%7f%ff%04%00

NVRAM after bless --device /dev/disk0s2 --setBoot --legacy (boot through iPXE permanently via MBR legacy mode)

efi-boot-device    <array><dict><key>MemoryType</key><integer size="64">0xb</integer><key>StartingAddress</key><integer size="64">0xff990000</integer><key>IOEFIDevicePathType</key><string>HardwareMemoryMapped</string><key>EndingAddress</key><integer size="64">0xffb2ffff</integer></dict><dict><key>IOEFIDevicePathType</key><string>MediaFirmwareVolumeFilePath</string><key>Guid</key><string>2B0585EB-D8B8-49A9-8B8C-E21B01AEF2B7</string></dict><dict><key>IOEFIBootOption</key><string>HD</string></dict></array>
efi-boot-device-data    %01%03%18%00%0b%00%00%00%00%00%99%ff%00%00%00%00%ff%ff%b2%ff%00%00%00%00%04​%06%14%00%eb%85%05+%b8%d8%a9I%8b%8c%e2%1b%01%ae%f2%b7%7f%ff%04%00
BootCampHD    %02%01%0c%00%d0A%03%0a%00%00%00%00%01%01%06%00%02%1f%03%12%0a%00%01%00%00%0​0%00%00%7f%ff%04%00
Find all posts by this user
Quote this message in a reply
2016-01-27, 13:58
Post: #2
RE: Mac with MBR iPXE and bless nextonly
(2016-01-19 01:36)MichalM.Mac Wrote:  iPXE starts, gets IP address, dowloads lpxelinux but ends with error:
Failed to load ldlinux.c32.
Boot Failed: ... see http://i.imgur.com/NIF3GC3.jpg

That error is coming from pxelinux. In your screenshot, iPXE seems to be working.

You could try booting your OS directly with iPXE, bypassing pxelinux completely.

Michael
Visit this user's website Find all posts by this user
Quote this message in a reply
2016-02-09, 21:26
Post: #3
RE: Mac with MBR iPXE and bless nextonly
I encountered this problem again in different scenario:

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."

I was able to solve Case 2 using bless --shortform flag. From bless man page:

Quote:Use an abbreviated device path form. This option can allow for booting from new devices, at the expense of boot time performance. This is only supported on EFI-based systems.

However using --shortform with --nextonly does not seem to fix issue from first post:

Code:
bless --device /dev/disk0s2 --setBoot --nextonly --legacy --shortform

I guess this thread[/u] is bit off topic for iPXE forum but I hope it will at least help someone doing google searches on similiar issue.
Find all posts by this user
Quote this message in a reply
2016-02-11, 15:46 (This post was last modified: 2016-02-11 15:48 by SebastianRoth.)
Post: #4
RE: Mac with MBR iPXE and bless nextonly
(2016-02-09 21:26)MichalM.Mac Wrote:  I encountered this problem again in different scenario:
...

Have your tried loading iPXE via TFTP yet? No need to write anything to disk/USB key. Just put an iPXE EFI binary on your TFTP and off you go. Would be interesting to see if that's working or even causing a different error.

Code:
bless --netboot --booter tftp://x.x.x.x/ipxe.efi

And by the way, why do you need to chainload pxelinux from iPXE?
Find all posts by this user
Quote this message in a reply
2016-02-12, 00:33 (This post was last modified: 2016-02-12 00:36 by MichalM.Mac.)
Post: #5
RE: Mac with MBR iPXE and bless nextonly
(2016-02-11 15:46)SebastianRoth Wrote:  Have your tried loading iPXE via TFTP yet? No need to write anything to disk/USB key. Just put an iPXE EFI binary on your TFTP and off you go. Would be interesting to see if that's working or even causing a different error.

Yes. I can netboot ipxe.efi. However 64 bit ipxe.efi does not want to load 32 bit pxelinux.0 (Could not boot image: Exec format error) -> I have to use 32bit iPXE loaded through Mac's legacy BIOS mode.


Quote:And by the way, why do you need to chainload pxelinux from iPXE?
Faculty infrastructure is built this way to install PC classrooms. pxelinux is used to display menu with various options (boot linux over network to restore image on local hard drive, boot into memtest, etc.). So far so good. I am able to deploy Linux and Windows. Solving problem with --nextonly flag would help to automate it a bit more but I can live with it. For Mac side of thigs I user standard tools like NetBoot, DeployStudio, ASR multicast, AutoDMG, Munki, etc.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)