iPXE as a chain-load target - Printable Version +- iPXE discussion forum (https://forum.ipxe.org) +-- Forum: iPXE user forums (/forumdisplay.php?fid=1) +--- Forum: General (/forumdisplay.php?fid=2) +--- Thread: iPXE as a chain-load target (/showthread.php?tid=7057) |
iPXE as a chain-load target - thecoda - 2013-10-16 09:56 So the plan is: 1 - Start GRUB2 over PXE as my initial booloader (to give me the whizzy graphics), using a script-generated config file based on a folder of ISOs 2 - When an entry is selected, chain-load iPXE (for the sanboot capability) 3 - Chain-load (via sanboot or memdisk) the required ISO All good in theory, but the documentation doesn't suggest any way to pass parameters into iPXE other than via DHCP. My current thinking is to roll a custom TFTP server and undionly hard-wired to run a script from that server. I can then embed the ISO name or index into the chain-load path (e.g. tftp://myserver/path/undionly?iso=hiren.iso) and reuse it when the script is requested (e.g. tftp://mysever/path/dynscript.ipxe) The TFTP server would then return undionly and remember the iso param from this request (keyed to the asking IP or MAC). When asked for the hard-coded script from the same IP it would use the retained param to return a script that proceeded directly into a sanboot of the requested ISO. This is a bit easier than my original idea of implementing an http module for GRUB2, but it's still a fairly involved solution! So my question: Is there an easier way to pass parameters directly into iPXE when chain-loading it from GRUB2? I could then use an off-the-shelf TFTP implementation and my server-side logic would be restricted to generating the grub config file. RE: iPXE as a chain-load target - robinsmidsrod - 2013-10-20 10:00 This is what the "scriptlet" feature does for you. You can load ipxe.lkrn just like any other Linux kernel from grub, and you can specify a command line. The command line is basically a mini-ipxe-script. The most common way to use this feature is like this: Code: # Syslinux syntax, can't recall grub syntax If you're want to just boot a custom script for each type of ISO you have, then you could do something like this: Code: # Syslinux syntax, can't recall grub syntax or you could let boot.ipxe use a variable to boot everything using one script, like this: Code: # Syslinux syntax, can't recall grub syntax RE: iPXE as a chain-load target - thecoda - 2013-10-20 13:54 So I moved to lpxelinux 6.02. It doesn't quite get me the theming I was after from grub2, but the vesamenu support is "good enough" for now. I can't get any response from ipxe at all, and no mention of the iso in my http server logs. Despite trying almost every possible permutation of: - loading ipxe.lkrn from TFTP - loading ipxe.lkrn from HTTP (possible with lpxelinux) - direct to sanboot from the syslinux config: "APPEND dhcp && sanboot http://server/hiren.iso" - direct-to-shell from the syslinux config: "APPEND shell" - putting the sanboot command in an ipxe script - trying the script both with and without the "#!ipxe" header - trying the script both with and without "dhcp" - trying the syslinux config both with and without "dhcp &&" RE: iPXE as a chain-load target - robinsmidsrod - 2013-10-22 10:06 Syslinux 6.x has some issues with iPXE. You should use a version of syslinux older than v6 until it has been resolved. |