I use CONFIG directives between several cfg files. When I use CONFIG, I also change the syslinux base directory.
(Note: I know the following example seems too much complicated, and I could potentially make the paths easier, but that's not the point of the topic, so please keep reading. TIA.)
Example with ABSOLUTE paths (I am posting only the relevant info) :
/boot/syslinux/syslinux.cfg : # Current syslinux base directory is /boot/syslinux/ DEFAULT 1 LABEL 1 CONFIG /DIRA/DIR22/DIR23/2nd.cfg APPEND /DIRA/DIR22/
/DIRA/DIR22/DIR23/2nd.cfg : # Current syslinux base directory is /DIRA/DIR22/ DEFAULT 2 LABEL 2 CONFIG /DIRA/DIR32/DIR33/3rd.cfg APPEND /DIRA/DIR32/DIR33/
/DIRA/DIR32/DIR33/3rd.cfg : # Current syslinux base directory is /DIRA/DIR32/DIR33/ DEFAULT 3 CONFIG /DIRA/DIR32/DIR33/4th.cfg APPEND /DIRA/ # 3rd.cfg and 4th.cfg are in the same location as the base directory. # Note that the new syslinux base directory is going up in the path.
/DIRA/DIR32/DIR33/4th.cfg : # Current syslinux base directory is /DIRA/ UI /DIRA/DIR22/DIR23/menu.c32 # menu.c32 and 2nd.cfg are in the same location. # ... # ... whatever menu you want # ... # Or use /DIRA/DIR22/DIR23/hello.c32 or # or /DIRA/DIR22/DIR23/pwd.c32 for testing purposes.
Now I take the above working example and make the paths to be RELATIVE to the relevant syslinux base directory.
The same cfg files using RELATIVE paths:
boot/syslinux/syslinux.cfg : # Current syslinux base directory is boot/syslinux/ DEFAULT 1 LABEL 1 CONFIG ../../DIRA/DIR22/DIR23/2nd.cfg APPEND ../../DIRA/DIR22/
DIRA/DIR22/DIR23/2nd.cfg : # Current syslinux base directory is DIRA/DIR22/ DEFAULT 2 LABEL 2 CONFIG ../DIR32/DIR33/3rd.cfg APPEND ../DIR32/DIR33/
DIRA/DIR32/DIR33/3rd.cfg : # Current syslinux base directory is DIRA/DIR32/DIR33/ DEFAULT 3 CONFIG 4th.cfg APPEND ../../ # 3rd.cfg and 4th.cfg are in the same location as the base directory. # Note that the new syslinux base directory is going up in the path.
DIRA/DIR32/DIR33/4th.cfg : # Current syslinux base directory is DIRA/ UI DIR22/DIR23/menu.c32 # menu.c32 and 2nd.cfg are in the same location. # ... # ... whatever menu you want # ... # Or use DIR22/DIR23/hello.c32 or # or DIR22/DIR23/pwd.c32 for testing purposes.
The above examples (with ABSOLUTE paths or with RELATIVE paths) work correctly when booting with ISOLINUX (with isolinux.bin in /boot/syslinux/ ).
But when using SYSLINUX (ldlinux.sys in /boot/syslinux/ ), only the first case (ABSOLUTE paths) works correctly. For the RELATIVE paths case, SYSLINUX parses the CONFIG + APPEND statements in a different way than ISOLINUX does. It seems as if SYSLINUX would "concatenate" the relative paths.
By the time SYSLINUX gets to the last "4th.cfg" file (the one with UI or hello.c32 ) the resulting PWD should be "DIRA/" (using the RELATIVE path notation), but it is not. Since SYSLINUX wrongly understands the intended PWD, SYSLINUX fails to complete the whole procedure successfully.
BTW, I am using Syslinux v.4.05.
Am I doing something wrong? Can anyone confirm or reproduce this problem? Is this a bug? Are ISOLINUX and SYSLINUX known to interpret the same cfg files differently when using RELATIVE paths?