iPXE discussion forum
ipxe inside pxelinux/syslinux with static ip configuration - 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 inside pxelinux/syslinux with static ip configuration (/showthread.php?tid=7318)



ipxe inside pxelinux/syslinux with static ip configuration - sschneid - 2014-05-11 09:40

hi everyone,
i want to boot ipxe kernel from inside my pxelinux.cfg without a second dhcp request, because i want to keep my dhcp configuration.
After the first dhcp request my nic is configured and i am loading the kernel with an embedded ipxe script like that:

DEFAULT XXX
LABEL XXX
KERNEL ipxe/ipxe.lkrn

When i ifstat my nic in the ipxe script, the nic link is down and i have to configure it with "ifconf" command. My first question:
- Is it possible to keep the nic link open and just reuse the configuration from the first dhcp request in my ipxe.krnl env?
- If it is not possible how can i pass the pre-configured nic settings (ip, gw ...) from syslinux to the ipxe env to set it up manually? In syslinux i can append the settings with "IPAPPEND 1" but i don't know how to pass it to my ipxe.lkrn? I could edit an additional "static" configurator (dhcp/ipv6/static(new)) and compile it into the ipxe kernel.

Any ideas to that?
kind regards,
stefan


RE: ipxe inside pxelinux/syslinux with static ip configuration - mcb30 - 2014-05-14 12:58

(2014-05-11 09:40)sschneid Wrote:  i want to boot ipxe kernel from inside my pxelinux.cfg without a second dhcp request, because i want to keep my dhcp configuration.

As a general rule I would strongly recommend against doing this. However, if you insist then there are a couple of viable approaches:

- load ipxe.pxe rather than ipxe.lkrn: this will reuse the existing DHCP configuration. You will need to open the interface with "ifopen", but it will already have an IP address.

- provide a command line to ipxe.lkrn which uses the "set" command to configure the relevant settings.

Michael


RE: ipxe inside pxelinux/syslinux with static ip configuration - robinsmidsrod - 2014-05-19 08:30

I'd also like to mention that the IPAPPEND feature in pxelinux is basically a macro that expands the IP information pxelinux has into proper kernel command line arguments to configure a (static, I believe) IP address in the kernel to be run. As iPXE doesn't adhere to the same kernel parameters as Linux, the IPAPPEND approach would never work with an ipxe kernel.