On 24.04.2018 15:41, Viktor VM Mihajlovski wrote: > On 23.04.2018 09:58, Thomas Huth wrote: > [...] >> + >> +static int net_try_pxelinux_cfgs(filename_ip_t *fn_ip) >> +{ >> + int rc, idx; >> + char basedir[256]; >> + int has_basedir; >> + >> + cfgbuf[sizeof(cfgbuf) - 1] = 0; /* Make sure that it is >> NUL-terminated */ >> + >> + /* Did we get a usable base directory via DHCP? */ >> + idx = strlen((char *)fn_ip->filename); >> + if (idx > 0 && idx < sizeof(basedir) - 40 && >> + fn_ip->filename[idx - 1] == '/') { >> + has_basedir = true; >> + strcpy(basedir, (char *)fn_ip->filename); >> + } else { >> + has_basedir = false; >> + strcpy(basedir, "pxelinux.cfg/"); >> + } >> + >> + printf("Trying pxelinux.cfg files...\n"); >> + >> + /* Look for config file with MAC address in its name */ >> + sprintf((char *)fn_ip->filename, "%s%02x-%02x-%02x-%02x-%02x-%02x", >> + basedir, mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); > Just noticed that the filename has to be <basedir>/pxelinux.cfg/01-<mac> > per [1].
Ok. I just also had a closer look at the URL that you've mentioned on IRC (http://jk.ozlabs.org/blog/post/158/netbooting-petitboot/), and noticed that there is even an additional DHCP option (210) for specifying the prefix path ... so I'll try to rework my patches accordingly. Thomas