On Friday 25 Mar 2011 21:21:18 Marcus Grando wrote: > >> Script is something like that: > >> > >> #!ipxe > >> ifopen net0 > >> set net0/ip 192.168.0.10 > >> set net0/netmask 255.255.255.0 > >> set net0/gateway 192.168.0.1 > >> set net0/dns 8.8.8.8 > >> set 209:string pxelinux.cfg/default > >> set 210:string http://some_server_elsewere/ > >> chain ${210:string}pxelinux.0 > > pxelinux.0 loads but fail to load menu (pxelinux.cfg/default).
The following patch to syslinux for core/fs/pxe/pxe.c (also available at http://git.ipxe.org/people/mcb30/syslinux.git/commitdiff/9126eb2) fixes this problem for me. I am not 100% sure about the error handling in __pxe_searchdir(), so would appreciate some review. Michael commit 9126eb27d1d9597eb8751a5ef75c9bdcf4e429a6 Author: Michael Brown <[email protected]> Date: Mon Mar 28 20:44:17 2011 +0100 pxe: allow TFTP server IP to be empty when not using TFTP Reported-by: Marcus Grando <[email protected]> Signed-off-by: Michael Brown <[email protected]> diff --git a/core/fs/pxe/pxe.c b/core/fs/pxe/pxe.c index aef2e7e..12bbdad 100644 --- a/core/fs/pxe/pxe.c +++ b/core/fs/pxe/pxe.c @@ -754,9 +754,6 @@ static void __pxe_searchdir(const char *filename, struct file *file) break; } - if (!ip) - return; /* No server */ - buf++; /* Point *past* the final NULL */ memcpy(buf, rrq_tail, sizeof rrq_tail); buf += sizeof rrq_tail; @@ -792,6 +789,9 @@ static void __pxe_searchdir(const char *filename, struct file *file) } #endif /* GPXE */ + if (!ip) + goto done; /* No server */ + timeout_ptr = TimeoutTable; /* Reset timeout */ sendreq: _______________________________________________ ipxe-devel mailing list [email protected] https://lists.ipxe.org/mailman/listinfo/ipxe-devel

