Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Netboot and iPXE
2012-07-27, 22:37
Post: #1
Netboot and iPXE
I'm fairly new to iPXE and what all it can do, but it looks like a great system and I'm working to integrate it into FOG for imaging computers over a network. On the PC side my initial testing works great, but I'm coming up against the giant hassle of Mac's. At this point FOG does not support Mac imaging, but we're working toward making this a possibility.

The problem is booting over the network to our linux image for the actual imaging process. Since Mac's can't natively PXE boot I've been trying to figure out a good workaround for getting them into iPXE. To keep things as simple as possible I would rather stay away from having to add anything to the Mac's to make them work, so I'm looking into how I can make iPXE into an acceptable netboot image. My first thought was to just convert ipxe.iso to a bootable DMG, but that failed (Mac doesn't see it as a mountable system?). At this point I'm looking for any suggestions or input on how to get the Mac's into iPXE. I've spent some time searching around and it looks like some people have tried booting with the iPXE efi, but with mixed results and not clearly documented.

Again, any ideas would be greatly appreciated.
Find all posts by this user
Quote this message in a reply
2012-08-01, 14:58
Post: #2
RE: Netboot and iPXE
Generally, the easiest way is to boot the Mac with either a USB stick or a CD with grub or another bootloader installed, and include ipxe.lkrn on the CD and boot that from grub. At that point iPXE should be running and it will do a DHCP and continue as any other normal PC.

If that doesn't work, please report back. I do know that Mac computers can run iPXE (in some way), because I see it in action here: https://www.youtube.com/watch?v=_EjACczyySE
Visit this user's website Find all posts by this user
Quote this message in a reply
2012-08-01, 17:10
Post: #3
RE: Netboot and iPXE
I have been able to boot to iPXE with a CD on a Mac, but I'd really like to be able to get iPXE loaded without needing any external media.
Find all posts by this user
Quote this message in a reply
2012-08-08, 11:38
Post: #4
RE: Netboot and iPXE
You might find some answers in these Wikipedia articles:

https://en.wikipedia.org/wiki/NetBoot
https://en.wikipedia.org/wiki/Boot_Servi...y_Protocol
https://en.wikipedia.org/wiki/Remote_Install_Mac_OS_X
Visit this user's website Find all posts by this user
Quote this message in a reply
2012-08-14, 13:00
Post: #5
RE: Netboot and iPXE
This link was also posted recently on IRC: http://brandon.penglase.net/index.php?ti...tboot_Macs
Visit this user's website Find all posts by this user
Quote this message in a reply
2012-08-26, 06:14
Post: #6
RE: Netboot and iPXE
The holy grail of mac, getting netboot to work with a pxe server. From the post it says here.

filename "/osx/i386/booter";
next-server 10.25.64.32;
option root-path = "http://10.25.64.32/build.sparseimage";

Not sure what would go here in order to 'iPXE boot', a compiled EFI binary for iPXE perhaps?
Find all posts by this user
Quote this message in a reply
2012-08-29, 10:39
Post: #7
RE: Netboot and iPXE
It's relatively easy to build a plist file for a 'bootfileonly' option which supplies an EFI compatible binary. From memory I was successful in getting it to serve an run a grub efi binary, but wasn't successful in getting the ipxe efi binary to run. Part of it I believe may have been 16 vs 32/64bit based efi binary? But it was a good 6 months ago since i tried last.

It also seems that the macs if you boot them in EFI mode don't seem to initialise everything like they do in legacy bios mode (ie: cd boot). USB Keyboard among others rings a bell as being an issue last time i worked on it, but as said that was some time ago.

I'll see if i can dig out the guts of the plist file for bootfileonly next time i have a chance, but i do have alot of stuff on my plate for the next month, so won't get a chance to work on it again before Oct at the earliest, and then i'm off on leave for 2 weeks in mid oct.
Find all posts by this user
Quote this message in a reply
2012-08-31, 02:32
Post: #8
RE: Netboot and iPXE
Hey guys, just to contribute and if anyone else is working on this again, this is the last NBImageInfo.plist file I was working with at the time and was able to get a grub efi loading, but not the iPXE efi.

If you're not familiar with basic Netboot basically got to:
\Library\Netboot\NetbootSP0
Create an iPXE.nbi folder (or other preferred name)
Create a file named NBImageInfo.plist containing the following:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Architectures</key>
    <array>
        <string>i386</string>
    </array>
    <key>BackwardCompatible</key>
    <false/>
    <key>BootFile</key>
    <string>grub.efi</string>
    <key>Description</key>
    <string>iPXE BootStrap</string>
    <key>DisabledSystemIdentifiers</key>
    <array/>
    <key>EnabledSystemIdentifiers</key>
    <array/>
    <key>Index</key>
    <integer>403</integer>
    <key>IsDefault</key>
    <false/>
    <key>IsEnabled</key>
    <false/>
    <key>IsInstall</key>
    <false/>
    <key>Kind</key>
    <integer>1</integer>
    <key>Language</key>
    <string>Default</string>
    <key>Name</key>
    <string>iPXE Bootstrap</string>
    <key>SupportsDiskless</key>
    <false/>
    <key>Type</key>
    <string>BootFileOnly</string>
</dict>
</plist>

Create an i386 folder INSIDE your iPXE.nbi folder
Place grub.efi or other file you're trying to boot inside the i386 folder. Update filename from above as appropriate depending on what you're trying to load.

Jp.
Find all posts by this user
Quote this message in a reply
2012-09-04, 11:50 (This post was last modified: 2012-09-04 11:52 by jpwise.)
Post: #9
RE: Netboot and iPXE
Hopefully noone minds some double posting. I'd like to collate information relating to my attempts to boot iPXE 'over' the network on Apple iMac/Macbook hardware.

NOTE: This is not the same as putting it on a CD and booting it using CD.

As I understand based on my research to date, when you boot to CD using iPXE (or windows/linux) etc, the Mac is booting in Bios Compatibility mode - Refer http://en.wikipedia.org/wiki/Apple–Intel...re#Booting.

Firstly that rules out booting a standard ipxe.usb compiled binary image from usb, and limits you to using a CD interface.

Ideally I would like to bootstrap the Mac into iPXE using the Mac Netboot environment without using usb (see above post). This is limited to compatible EFI binaries only however. If a suitable Binary can be built and confirmed OK using a USB stick then the same binary can generally also be run using Netboot.

Grub2-EFI i have successfully compiled and booted from usb stick by placing the compiled efi binary in the correct location on the usb stick (see Ubuntu UEFIBooting page). As above the resulting binary could also be served and executed over Netboot aswell.

Grub-EFI & Grub2-EFI however do NOT support linux16 to execute 16 bit binaries. Various websites show menu entries chaining ipxe.lkrn using grub and the linux16 command, however on grub efi versions the command doens't exist, so can't do it that way. It also errors if you try the normal 'linux' command.

So far my attempts to compile an ipxe EFI file haven't resulted in a functionary EFI binary insofar as grub or the Mac were concerned at any rate. Also further to that after reading some of Doc TB's posts on the Memtest86 forum I suspect for most test programs people (including me) tend to run over iPxe they're not going to run properly with the iMac/Macbook in EFI mode anyway as they're expecting to address a PC Bios interface.. so memtest, harddrive test programs, etc are all out unless the Apple unit can be switched to Bios Compatible mode (this is speculation on my part - but appears consistent with available information)

Right now I think my next set of efforts will be around EFI boot loaders, particularly any that can chain off to Bios based loaders. rEFIt is one of the more commonly known Apple ones but hasn't had much development for a while. rEFInd appears to be it's successor and does mention some Bios loader capabilities in it's feature page. So when I've got time I'll try to do some testing with it and see if i can get anywhere.

Jp.
Find all posts by this user
Quote this message in a reply
2012-10-25, 17:37
Post: #10
RE: Netboot and iPXE
I've also been experimenting with alternative methods for booting iPXE on a Mac. Currently, I have only run tests on iMacs with CD drives. CD booting works fine, but as Apple has now killed off the optical drive on their entire product line, it's starting to become necessary to look into other options.

I've made many attempts at booting over USB, including the rEFIt -> Syslinux chainload method. rEFIt boots fine, but booting Syslinux fails with "no bootable device". If a bootable disc is available in the SuperDrive at the time of the failure, it will fall back to that device automatically.

My current theory is that if your Mac is equipped with an internal optical drive (SuperDrive) you can not boot via USB into a legacy (BIOS) environment.

I have seen it mentioned that Boot Camp Assistant will identify whether or not a Mac will boot via USB (http://nonme85851.webs.com/bootcamp.png). I haven't been able to test this myself yet.

The iPXE EFI build is not feature complete yet, so even though it will boot perfectly over USB, there is no support for iSCSI.

Which brings me to the Netboot option. The only EFI software that I've seen so far that can boot a legacy/BIOS environment is rEFIt. I've been waiting for news on an EFI build of Syslinux as that would solve all of the problems, but until that is available, we are stuck with local media.

Of course, a feature complete EFI build of iPXE would also solve these problems, but I imagine that the amount of work to make that happen is incredibly time consuming.

Thanks jpwise for summarizing your experience so far. It's tough to piece together all of the information, so I've tried to add as much as I can. I'm trying new boot methods every day to make some sort of progress. I'll report back with any discoveries.
Find all posts by this user
Quote this message in a reply
2012-11-22, 04:49
Post: #11
RE: Netboot and iPXE
Just like to add 2 cents worth here.

I have noticed that since August 2012 newer MacBook Pros and Macbook Airs do in fact support BIOS legacy mode when booting from USB pen. A quick and simple way to test this is to prepare a USB bootable pen drive with tuxboot and using clonezilla-precisexxxx.iso.

I suspect Apple maybe thinking of keeping the legacy support going a lot longer.

Cheers
Find all posts by this user
Quote this message in a reply
2012-11-23, 04:21
Post: #12
RE: Netboot and iPXE
ndogmail - thanks for that feedback on the newer Mac's. We've had a couple through for repair already, so I'll have to give it a go next time we get one through. I do already have an ipxe.usb loaded flashdisk from our PC work. It would also be interesting to know if it's just a chance on the newer models or something they may have started slipping into the EFI firmware updates as they come out.

naimu - also thank you for your comments, i must have missed your reply earlier on. i haven't had a chance to look into it again since posting my last update as i've been working on other projects. I don't think that ipxe.efi will necessarily resolve the issues even if it was fully implemented as there would still be the issue that any tools subsequently loaded would need to understand the EFI bios interface. I think the trick moving forward will be to force that switch to PC Bios compatibility during the load sequence. For our setup in the workshop we have a functional Apple Netboot server aswell, which ideally I'd like to use to bootstrap the ipxe load so only a network cable is required. I don't know if the Apple netboot protocol and EFI boot handlers supports booting anything 'other' than an EFI file however. It's another area that was on my list to research further to see if I might be able to force it to boot into a linux kernel or similar directly.

Jp.
Find all posts by this user
Quote this message in a reply
Post Reply 




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