[syslinux] [PATCH v2] Documentation: introduce the working directory

Ferenc Wagner wferi at niif.hu
Sat Jan 15 03:28:15 PST 2011


Paul Bolle <pebolle at tiscali.nl> writes:

> If a /boot/syslinux directory or /syslinux directory is used, is it used
> as a working directory too?

When any Syslinux variant starts up, its working directory is set to the
installation directory, ie. where ldlinux.sys/isolinux.bin/pxelinux.0
was loaded from.

> -This will alter the boot sector on the disk and copy a file named
> -LDLINUX.SYS into its root directory (or a subdirectory, if the -d
> -option is specified.)
> +This will alter the boot sector of that device. A file named ldlinux.sys
> +will be copied into its root directory. That root directory will be the working
> +directory of ldlinux.sys. (If the -d option is given, that file will be copied
> +into the specified subdirectory and that subdirectory will be the working
> +directory of ldlinux.sys.)

In my opinion the original text is better.  The working directory stuff
could be discussed later.

>  The Syslinux loader does not need to know about the kernel file in
> -advance; all that is required is that it is a file located in the root
> -directory on the disk.
> +advance; all that is required is that it is a file located in its working
> +directory.

Neither is true.  What's actually needed is that the file must reside in
the same filesystem.  Of course, if some file is in the working
directory, one can access it without supplying its path.  Basically,
Syslinux works as if PATH=. (ie. working directory only).

>  All the configurable defaults in SYSLINUX can be changed by putting a
> -file called "syslinux.cfg" in the root directory of the boot disk.
> +file called "syslinux.cfg" in its working directory.

Rather in its installation directory.  Which coincides with the working
directory at startup, but loading a new config file via the CONFIG
directive or config.c32 can change that.  The text in 5e50b4d4 or in the
corresponding 4.00 changelog should be molded into the documentation of
CONFIG to make this clear.

>  Starting with version 3.35, the configuration file can also be in
>  either the /boot/syslinux or /syslinux directories (searched in that

I wonder if this part is still relevant...  No time for experiments.

>  Chain loading requires the boot sector of the foreign operating system
> -to be stored in a file in the root directory of the filesystem.
> +to be stored in a file in the ldlinux.sys working directory.

Again, this isn't a requirement, just like with kernel images.

>  Any file that SYSLINUX uses can be marked hidden, system or readonly
>  if so is convenient; SYSLINUX ignores all file attributes.  The
>  SYSLINUX installed automatically sets the readonly/hidden/system
           /
    installer

>  followed by any kernel parameters. The \s-1SYSLINUX\s+1 bootloader
>  does not need to know about the kernel file in advance; all that is
> -required is that it is a file located in the root directory on the
> -disk.
> +required is that it is a file located in its working directory.

Same thing again.

> -Install the \s-1SYSLINUX\s+1 control files in a subdirectory with the
> -specified name (relative to the root directory on the device).
> +Install the ldlinux.sys file in a subdirectory with the
> +specified name (relative to the root directory on the device). ldlinux.sys
> +will then use this subdirectory as its working directory.

At initial startup, yes.

>  All the configurable defaults in \s-1SYSLINUX\s+1 can be changed by putting a
>  file called
>  .B syslinux.cfg
> -in the install directory of the boot disk. This
> +in the ldlinux.sys working directory. This

Again, I find the original text clearer...

>  Chain loading requires the boot sector of the foreign operating system
> -to be stored in a file in the root directory of the filesystem.
> +to be stored in a file in the ldlinux.sys working directory.

The usual thing again: only the same filesystem is required.

> -installed automatically sets the readonly attribute on LDLINUX.SYS.
> +installed automatically sets the readonly attribute on ldlinux.sys.
     /
installer

Thanks for tackling this, hope you don't get discouraged by my
comments.  We should make the documentation understandable for the
newcomers, not us corrupted by following the mailling list for years
(thus taking a lot of things granted).
-- 
Regards,
Feri.




More information about the Syslinux mailing list