Gerardo Exequiel Pozzi
2013-Jun-06 00:29 UTC
[syslinux] [5.10] PXE + dhcp opts 209, 210 and path issues in tftp/http
Hello,
First, this setup works fine without any error in syslinux 4.06 as show
below.
For convenience, both versions of syslinux 4.06 [#1] and 5.10 [#2]
directories (~2MB each) are uploaded ready for test.
As said before, this is tested on qemu-1.5.0 + dnsmasq 2.66 in Arch
Linux @ 64-bit.
If more info is needed, please let me know.
Good luck!
Relevant directory structure is at
/run/archiso/bootmnt/arch/boot/syslinux/*.{c32,0,cfg} Where each *.cfg
relevant for PXE booting are:
------------------------------------------------------------------------
------------------------------------------------------------------------
# cat /run/archiso/bootmnt/arch/boot/syslinux/archiso.cfg
DEFAULT select
LABEL select
COM32 boot/syslinux/whichsys.c32
APPEND -pxe- pxe -sys- sys -iso- sys
LABEL pxe
CONFIG boot/syslinux/archiso_pxe_choose.cfg
LABEL sys
CONFIG boot/syslinux/archiso_sys_choose.cfg
------------------------------------------------------------------------
------------------------------------------------------------------------
#cat /run/archiso/bootmnt/arch/boot/syslinux/archiso_pxe_choose.cfg
DEFAULT choose
LABEL choose
COM32 boot/syslinux/ifcpu64.c32
APPEND have64 -- nohave64
LABEL have64
CONFIG boot/syslinux/archiso_pxe_both_inc.cfg
LABEL nohave64
CONFIG boot/syslinux/archiso_pxe_32_inc.cfg
------------------------------------------------------------------------
------------------------------------------------------------------------
# cat /run/archiso/bootmnt/arch/boot/syslinux/archiso_pxe_both_inc.cfg
INCLUDE boot/syslinux/archiso_head.cfg
INCLUDE boot/syslinux/archiso_pxe64.cfg
INCLUDE boot/syslinux/archiso_pxe32.cfg
INCLUDE boot/syslinux/archiso_tail.cfg
------------------------------------------------------------------------
------------------------------------------------------------------------
# cat /run/archiso/bootmnt/arch/boot/syslinux/archiso_head.cfg
SERIAL 0 38400
UI boot/syslinux/vesamenu.c32
MENU TITLE Arch Linux
MENU BACKGROUND boot/syslinux/splash.png
...
...
------------------------------------------------------------------------
------------------------------------------------------------------------
# cat /run/archiso/bootmnt/arch/boot/syslinux/archiso_pxe64.cfg
TEXT HELP
Boot the Arch Linux (x86_64) live medium (Using NBD).
It allows you to install Arch Linux or perform system maintenance.
ENDTEXT
MENU LABEL Boot Arch Linux (x86_64) (NBD)
LINUX boot/x86_64/vmlinuz
INITRD boot/x86_64/archiso.img
APPEND archisobasedir=arch archisolabel=ARCH_201306
archiso_nbd_srv=${pxeserver}
IPAPPEND 3
...
...
------------------------------------------------------------------------
------------------------------------------------------------------------
OK here I go...
This is how dnsmasq running in dhcp + tftp mode output looks, working
fine when using syslinux-4.06. Note how each retrieved entry is
"perfect", no double //, no paths error, and things looks good.
dnsmasq --port=0 \
--no-daemon \
--enable-tftp \
--tftp-root=/run/archiso/bootmnt \
--dhcp-range=192.168.0.2,192.168.0.254,86400 \
--dhcp-boot=/arch/boot/syslinux/pxelinux.0 \
--dhcp-option-force=209,boot/syslinux/archiso.cfg \
--dhcp-option-force=210,/arch/
------------------------------------------------------------------------
------------------------------------------------------------------------
dnsmasq-tftp: sent /run/archiso/bootmnt/arch/boot/syslinux/pxelinux.0 to
192.168.0.90
dnsmasq-tftp: sent /run/archiso/bootmnt/arch/boot/syslinux/archiso.cfg
to 192.168.0.90
dnsmasq-tftp: sent /run/archiso/bootmnt/arch/boot/syslinux/whichsys.c32
to 192.168.0.90
dnsmasq-tftp: sent
/run/archiso/bootmnt/arch/boot/syslinux/archiso_pxe_choose.cfg to
192.168.0.90
dnsmasq-tftp: sent /run/archiso/bootmnt/arch/boot/syslinux/ifcpu64.c32
to 192.168.0.90
dnsmasq-tftp: sent
/run/archiso/bootmnt/arch/boot/syslinux/archiso_pxe_both_inc.cfg to
192.168.0.90
dnsmasq-tftp: sent
/run/archiso/bootmnt/arch/boot/syslinux/archiso_head.cfg to 192.168.0.90
dnsmasq-tftp: sent
/run/archiso/bootmnt/arch/boot/syslinux/archiso_pxe64.cfg to 192.168.0.90
dnsmasq-tftp: sent
/run/archiso/bootmnt/arch/boot/syslinux/archiso_pxe32.cfg to 192.168.0.90
dnsmasq-tftp: sent
/run/archiso/bootmnt/arch/boot/syslinux/archiso_tail.cfg to 192.168.0.90
dnsmasq-tftp: sent /run/archiso/bootmnt/arch/boot/syslinux/vesamenu.c32
to 192.168.0.90
dnsmasq-tftp: sent
/run/archiso/bootmnt/arch/boot/syslinux/archiso_pxe_both_inc.cfg to
192.168.0.90
dnsmasq-tftp: sent
/run/archiso/bootmnt/arch/boot/syslinux/archiso_head.cfg to 192.168.0.90
dnsmasq-tftp: sent
/run/archiso/bootmnt/arch/boot/syslinux/archiso_pxe64.cfg to 192.168.0.90
dnsmasq-tftp: sent
/run/archiso/bootmnt/arch/boot/syslinux/archiso_pxe32.cfg to 192.168.0.90
dnsmasq-tftp: sent
/run/archiso/bootmnt/arch/boot/syslinux/archiso_tail.cfg to 192.168.0.90
dnsmasq-tftp: sent /run/archiso/bootmnt/arch/boot/syslinux/splash.png to
192.168.0.90
------------------------------------------------------------------------
------------------------------------------------------------------------
This is when using http (darkhttpd) instead of tftp for retriving files
(syslinux-4.06). Note how each retrieved entry is "perfect", no double
//, no paths error, and things looks good.
dnsmasq --port=0 \
--dhcp-range=192.168.0.2,192.168.0.254,86400 \
--dhcp-boot=http://192.168.0.218/arch/boot/syslinux/pxelinux.0 \
--dhcp-option-force=209,boot/syslinux/archiso.cfg \
--dhcp-option-force=210,http://192.168.0.218/arch/
darkhttpd /run/archiso/bootmnt
------------------------------------------------------------------------
------------------------------------------------------------------------
1370470692 192.168.0.90 "GET /arch/boot/syslinux/pxelinux.0" 200 26813
"" "iPXE/1.0.0+ (09c5)"
1370470692 192.168.0.90 "GET /arch/boot/syslinux/archiso.cfg" 200 441
""
"iPXE/1.0.0+ (09c5)"
1370470692 192.168.0.90 "GET /arch/boot/syslinux/whichsys.c32" 200
3193
"" "iPXE/1.0.0+ (09c5)"
1370470692 192.168.0.90 "GET
/arch/boot/syslinux/archiso_pxe_choose.cfg"
200 439 "" "iPXE/1.0.0+ (09c5)"
1370470692 192.168.0.90 "GET /arch/boot/syslinux/ifcpu64.c32" 200 1545
"" "iPXE/1.0.0+ (09c5)"
1370470692 192.168.0.90 "GET
/arch/boot/syslinux/archiso_pxe_both_inc.cfg" 200 390 ""
"iPXE/1.0.0+
(09c5)"
1370470692 192.168.0.90 "GET /arch/boot/syslinux/archiso_head.cfg" 200
1041 "" "iPXE/1.0.0+ (09c5)"
1370470692 192.168.0.90 "GET /arch/boot/syslinux/archiso_pxe64.cfg"
200
1259 "" "iPXE/1.0.0+ (09c5)"
1370470692 192.168.0.90 "GET /arch/boot/syslinux/archiso_pxe32.cfg"
200
1235 "" "iPXE/1.0.0+ (09c5)"
1370470692 192.168.0.90 "GET /arch/boot/syslinux/archiso_tail.cfg" 200
849 "" "iPXE/1.0.0+ (09c5)"
1370470692 192.168.0.90 "GET /arch/boot/syslinux/vesamenu.c32" 200
153723 "" "iPXE/1.0.0+ (09c5)"
1370470692 192.168.0.90 "GET
/arch/boot/syslinux/archiso_pxe_both_inc.cfg" 200 390 ""
"iPXE/1.0.0+
(09c5)"
1370470692 192.168.0.90 "GET /arch/boot/syslinux/archiso_head.cfg" 200
1041 "" "iPXE/1.0.0+ (09c5)"
1370470692 192.168.0.90 "GET /arch/boot/syslinux/archiso_pxe64.cfg"
200
1259 "" "iPXE/1.0.0+ (09c5)"
1370470692 192.168.0.90 "GET /arch/boot/syslinux/archiso_pxe32.cfg"
200
1235 "" "iPXE/1.0.0+ (09c5)"
1370470692 192.168.0.90 "GET /arch/boot/syslinux/archiso_tail.cfg" 200
849 "" "iPXE/1.0.0+ (09c5)"
1370470692 192.168.0.90 "GET /arch/boot/syslinux/splash.png" 200 45619
"" "iPXE/1.0.0+ (09c5)"
------------------------------------------------------------------------
------------------------------------------------------------------------
And now syslinux-5.10:
The same result is using pxelinux.0 or lpxelinux.0
See how paths are wrong, or not clean: no slash "/" between directory
and filename, double // (this do not care) or double directory
/arch//arch//, etc.
------------------------------------------------------------------------
------------------------------------------------------------------------
dnsmasq-tftp: sent /run/archiso/bootmnt/arch/boot/syslinux/lpxelinux.0
to 192.168.0.90
dnsmasq-tftp: file /run/archiso/bootmnt/arch/ldlinux.c32 not found
dnsmasq-tftp: file /run/archiso/bootmnt/arch//ldlinux.c32 not found
dnsmasq-tftp: file /run/archiso/bootmnt/arch//boot/isolinux/ldlinux.c32
not found
dnsmasq-tftp: file /run/archiso/bootmnt/arch//isolinux/ldlinux.c32 not found
dnsmasq-tftp: file /run/archiso/bootmnt/arch//boot/syslinuxldlinux.c32
not found
dnsmasq-tftp: sent /run/archiso/bootmnt/arch//boot/syslinux/ldlinux.c32
to 192.168.0.90
dnsmasq-tftp: error 0 No error, file close received from 192.168.0.90
dnsmasq-tftp: failed sending
/run/archiso/bootmnt/arch//boot/syslinux/ldlinux.c32 to 192.168.0.90
dnsmasq-tftp: sent /run/archiso/bootmnt/arch/boot/syslinux/archiso.cfg
to 192.168.0.90
dnsmasq-tftp: sent /run/archiso/bootmnt/arch/boot/syslinux/whichsys.c32
to 192.168.0.90
dnsmasq-tftp: file /run/archiso/bootmnt/arch/libcom32.c32 not found
dnsmasq-tftp: file /run/archiso/bootmnt/arch//libcom32.c32 not found
dnsmasq-tftp: file /run/archiso/bootmnt/arch/libcom32.c32 not found
dnsmasq-tftp: file
/run/archiso/bootmnt/arch//arch//boot/syslinux/libcom32.c32 not found
------------------------------------------------------------------------
------------------------------------------------------------------------
In HTTP, no other files are retrieved, syslinux-5.10 just shows a boot
error when using http instead of tftp. (5.02-pre1 at least retrive more
files, but with errors like in tftp mode [#3]).
------------------------------------------------------------------------
------------------------------------------------------------------------
1370470298 192.168.0.90 "GET /arch/boot/syslinux/lpxelinux.0" 200
81474
"" "iPXE/1.0.0+ (09c5)"
------------------------------------------------------------------------
------------------------------------------------------------------------
[#1]
https://dl.dropboxusercontent.com/u/88891866/archiso_syslinux_406.tar.xz
https://dl.dropboxusercontent.com/u/88891866/archiso_syslinux_406.tar.xz.sig
[#2]
https://dl.dropboxusercontent.com/u/88891866/archiso_syslinux_510.tar.xz
https://dl.dropboxusercontent.com/u/88891866/archiso_syslinux_510.tar.xz.sig
[#3] http://www.syslinux.org/archives/2013-February/019480.html
--
Gerardo Exequiel Pozzi
\cos^2\alpha + \sin^2\alpha = 1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 555 bytes
Desc: OpenPGP digital signature
URL:
<http://www.zytor.com/pipermail/syslinux/attachments/20130605/84b4d096/attachment.sig>
Gene Cumm
2013-Jun-06 05:00 UTC
[syslinux] [5.10] PXE + dhcp opts 209, 210 and path issues in tftp/http
On Wed, Jun 5, 2013 at 8:29 PM, Gerardo Exequiel Pozzi <vmlinuz386 at yahoo.com.ar> wrote:> Hello, > > First, this setup works fine without any error in syslinux 4.06 as show > below. > > For convenience, both versions of syslinux 4.06 [#1] and 5.10 [#2] > directories (~2MB each) are uploaded ready for test. > > As said before, this is tested on qemu-1.5.0 + dnsmasq 2.66 in Arch > Linux @ 64-bit. > > If more info is needed, please let me know.iPXE details. My testing was with an Intel PXE OROM in a VMware hosted platform with 0 issues.> 1370470692 192.168.0.90 "GET /arch/boot/syslinux/pxelinux.0" 200 26813 > "" "iPXE/1.0.0+ (09c5)"-- -Gene
Thomas Bächler
2013-Jun-06 08:25 UTC
[syslinux] [5.10] PXE + dhcp opts 209, 210 and path issues in tftp/http
Am 06.06.2013 07:00, schrieb Gene Cumm:> iPXE details. My testing was with an Intel PXE OROM in a VMware > hosted platform with 0 issues. > >> 1370470692 192.168.0.90 "GET /arch/boot/syslinux/pxelinux.0" 200 26813 >> "" "iPXE/1.0.0+ (09c5)"This is the iPXE version that comes bundled with qemu as the default qemu boot rom. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 901 bytes Desc: OpenPGP digital signature URL: <http://www.zytor.com/pipermail/syslinux/attachments/20130606/9a026ed3/attachment.sig>
Gerardo Exequiel Pozzi
2013-Jun-06 23:02 UTC
[syslinux] [5.10] PXE + dhcp opts 209, 210 and path issues in tftp/http
On 06/06/2013 02:00 AM, Gene Cumm wrote:> On Wed, Jun 5, 2013 at 8:29 PM, Gerardo Exequiel Pozzi > <vmlinuz386 at yahoo.com.ar> wrote: >> Hello, >> >> First, this setup works fine without any error in syslinux 4.06 as show >> below. >> >> For convenience, both versions of syslinux 4.06 [#1] and 5.10 [#2] >> directories (~2MB each) are uploaded ready for test. >> >> As said before, this is tested on qemu-1.5.0 + dnsmasq 2.66 in Arch >> Linux @ 64-bit. >> >> If more info is needed, please let me know. > > iPXE details. My testing was with an Intel PXE OROM in a VMware > hosted platform with 0 issues.Just to be sure, a stupid question, sorry: do you run my testcase [#1], or another thing? The output of dnsmasq is clean/right in all file paths? Remember that syslinux 4.06 testcase works OK. Thanks for your time ;) [#1] https://dl.dropboxusercontent.com/u/88891866/archiso_syslinux_510.tar.xz -- Gerardo Exequiel Pozzi \cos^2\alpha + \sin^2\alpha = 1 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 555 bytes Desc: OpenPGP digital signature URL: <http://www.zytor.com/pipermail/syslinux/attachments/20130606/025e9d30/attachment.sig>
Matt Fleming
2013-Jun-07 09:30 UTC
[syslinux] [5.10] PXE + dhcp opts 209, 210 and path issues in tftp/http
On Wed, 05 Jun, at 09:29:58PM, Gerardo Exequiel Pozzi wrote:> dnsmasq-tftp: file /run/archiso/bootmnt/arch/libcom32.c32 not found > dnsmasq-tftp: file /run/archiso/bootmnt/arch//libcom32.c32 not found > dnsmasq-tftp: file /run/archiso/bootmnt/arch/libcom32.c32 not found > dnsmasq-tftp: file > /run/archiso/bootmnt/arch//arch//boot/syslinux/libcom32.c32 not foundOK, here's the bug - the double /arch. Let me take a look at what's going on inside PXELINUX. -- Matt Fleming, Intel Open Source Technology Center
Gene Cumm
2013-Jun-07 14:52 UTC
[syslinux] [5.10] PXE + dhcp opts 209, 210 and path issues in tftp/http
On Wed, Jun 5, 2013 at 8:29 PM, Gerardo Exequiel Pozzi <vmlinuz386 at yahoo.com.ar> wrote:> [#1] > https://dl.dropboxusercontent.com/u/88891866/archiso_syslinux_406.tar.xz > https://dl.dropboxusercontent.com/u/88891866/archiso_syslinux_406.tar.xz.sig > > [#2] > https://dl.dropboxusercontent.com/u/88891866/archiso_syslinux_510.tar.xz > https://dl.dropboxusercontent.com/u/88891866/archiso_syslinux_510.tar.xz.sigDid dropbox decompress these or were they never compressed? -- -Gene
Gerardo Exequiel Pozzi
2013-Jun-07 16:17 UTC
[syslinux] [5.10] PXE + dhcp opts 209, 210 and path issues in tftp/http
On 06/07/2013 11:52 AM, Gene Cumm wrote:> On Wed, Jun 5, 2013 at 8:29 PM, Gerardo Exequiel Pozzi > <vmlinuz386 at yahoo.com.ar> wrote: > >> [#1] >> https://dl.dropboxusercontent.com/u/88891866/archiso_syslinux_406.tar.xz >> https://dl.dropboxusercontent.com/u/88891866/archiso_syslinux_406.tar.xz.sig >> >> [#2] >> https://dl.dropboxusercontent.com/u/88891866/archiso_syslinux_510.tar.xz >> https://dl.dropboxusercontent.com/u/88891866/archiso_syslinux_510.tar.xz.sig > > Did dropbox decompress these or were they never compressed?Oops, never compressed!. I did "tar cf" instead of "tar caf". -- Gerardo Exequiel Pozzi \cos^2\alpha + \sin^2\alpha = 1 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 555 bytes Desc: OpenPGP digital signature URL: <http://www.zytor.com/pipermail/syslinux/attachments/20130607/8a7b6acb/attachment.sig>
Matt Fleming
2013-Jun-07 21:53 UTC
[syslinux] [5.10] PXE + dhcp opts 209, 210 and path issues in tftp/http
On Fri, 07 Jun, at 10:30:11AM, Matt Fleming wrote:> On Wed, 05 Jun, at 09:29:58PM, Gerardo Exequiel Pozzi wrote: > > dnsmasq-tftp: file /run/archiso/bootmnt/arch/libcom32.c32 not found > > dnsmasq-tftp: file /run/archiso/bootmnt/arch//libcom32.c32 not found > > dnsmasq-tftp: file /run/archiso/bootmnt/arch/libcom32.c32 not found > > dnsmasq-tftp: file > > /run/archiso/bootmnt/arch//arch//boot/syslinux/libcom32.c32 not found > > OK, here's the bug - the double /arch. Let me take a look at what's > going on inside PXELINUX.Right, basically the internal PATH variable that keeps a list of directories in which to search for files doesn't play well when it encounters TFTP-style paths. The entire problem stems from the fact that colons (':') are used to separate entries in the PATH directive and they're also used in TFTP-style paths. While I see that you don't use the PATH directive in your config files, a list is built internally nevertheless. Based on my testing your's will look something like, "::/arch/boot/syslinux/" The code in findpath() sees the first ':' and goes nutso. I'm not quite sure what the proper solution is. Clearly using ':' to separate entries was a terrible idea, but presumably some people are using that syntax now and it would cause issues if we changed it - the PATH directive has been supported since 5.00. -- Matt Fleming, Intel Open Source Technology Center