[syslinux] working directory in 5.00pre8 and 4.06

Ady ady-sf at hotmail.com
Tue Oct 30 08:04:53 PDT 2012


Hello,

The following is a comparison of 4.06 and 5.00pre8 behaving 
differently.

I made a floppy image with Syslinux 4.06. I installed ldlinux.sys 
with:
 syslinux --directory /boot/syslinux/ --install /dev/fd0

and I added pwd.c32 to the same directory, but I intentionally did 
not build a syslinux.cfg file.

While testing the floppy image in a VM, it correctly boots to the 
Syslinux boot prompt, adding:

ERROR: No configuration file found
No DEFAULT or UI configuration directive found!

Since I intentionally did not include syslinux.cfg, I'm not going to 
ask why this message shows up :).

But, since a cfg file CAN be skipped (not included) and the boot 
prompt should still be usable (and indeed it is), I would like to 
request changing the "ERROR:" part of the message.

SUGGESTION#1: Either skip it - leaving "No configuration file found" 
alone - or use a different word, like "INFO:" for example. The 
"ERROR:" word gives the WRONG impression that Syslinux "MUST" find a 
cfg file to work correctly.

Additionally, the second line - "No DEFAULT or UI configuration 
directive found!" - although true, it is not really relevant, since 
the cfg file was not even found.

SUGGESTION#2: Eliminate the second message line when the cfg file is 
not even found.

OTOH, 5.00pre8 doesn't display any info other than the boot prompt.

SUGGESTION#3: For 5.00, use the same principle as suggestion#1.


Now, in the boot prompt, I type pwd.c32, and instead of receiving the 
path where ldlinux.sys was installed (and where pwd.c32 is located 
too), I get:

Could not find kernel image: pwd.c32

If I type the whole path:
/boot/syslinux/pwd.c32

then it works and the result is "/". But, I was expecting it to be 
"/boot/syslinux/" :o) .

The above behavior is not necessarily wrong, considering that the 
documentation states that the (INITIAL) working directory is the one 
where the cfg file is located, and in this case there is no cfg file 
(found). Since the "/" directory was probably the last one in which 
the cfg file was searched, then probably this is the reason why the 
initial CWD is "/".

OTOH, 5.00pre8 behaves as I was expecting. In 5.00pre8, typing 
"pwd.c32" (without the whole path) gives the directory where 
ldlinux.sys was installed. This is not necessarily wrong either.

In 4.06 (and before), if the cfg file is not found then the initial 
CWD seems to be the "/" directory of the boot device. In 5.00pre8, if 
the cfg file is not found then the initial CWD seems to be the 
directory where ldlinux.sys was installed. (Note that the different 
behavior may be a result of something else, like, for example, the 
order of directories in which the cfg file is searched.)

SUGGESTION#4: Unless there is some reason against it, I'd like to 
request that if the cfg file is not found, the INITIAL CWD would be 
the same directory where ldlinux.sys was installed. But, beware not 
to undo the recent improvements in 4.06 for relative paths and how 
pwd.c32 presents its result (as absolute path even if the 
CONFIG+APPEND directives used relative paths).

I don't know how these suggestions would affect the behavior of 
CONFIG+APPEND if the new cfg file or the new working directory (used 
in the CONFIG+APPEND directives) is/are not found.


I repeated the tests, this time with ISOLINUX (isolinux.bin), version 
4.06 and 5.00pre8. The behavior is similar to the corresponding 
SYSLINUX floppy, except that the working directory is "/" in both 
ISOLINUX versions.

SUGGESTION#5: Unless there is some reason against it, use the same 
principle as 
suggestion#4, this time for both ISOLINUX versions.

If I wasn't clear enough, or if there are additional tests for me to 
try, 
please let me know.

TIA,
Ady.



More information about the Syslinux mailing list