[syslinux] Equivalent of pxechain.com for (USB key based) syslinux

Alain Knaff syslinux at misc.lka.org.lu
Fri Jul 23 11:04:56 PDT 2010


On 07/23/2010 04:31 PM, Ferenc Wagner wrote:
> Alain Knaff <syslinux at misc.lka.org.lu> writes:
> 
>> However, how can I achieve the same thing with syslinux (for USB keys)?
>> There is MENU INCLUDE, but it doesn't change the current directory, so
>> the submenu file must be edited to prepend the subdirectory to every
>> kernel, initrd, display, function key, further submenues, ...
> 
> LABEL udpcast
>         menu label Udpcast
>         config /udpcast/syslinux.cfg
>         append /udpcast

Thanks, that works... but only on syslinux4, as far as I can see.
Indeed, syslinux3 seems to ignore the append directive which changes the
current directory.

> But you will have a version mismatch between any modules (*.c32)
> provided by udpcast and the main syslinux version.  This may or may not
> cause problems, but definitely is unsupported.

My tests show that modules are interchangeable withing the same major
version (i.e. 3.63's menu.c32 also works with 3.86) but not between 3
and 4 (3.63's menu.c32 does not work with 4.02)

However, most distributions don't use that many .c32's (only menu.c32
or vesamenu.c32), and it is definitely less work to copy a single .c32
file rather than carefully edit multiple .cfg files (some distributions,
such as 9.04 use a boatload of .cfg files, which include each other,
rather than just one... so it really helps being able to change current
directory rather than having to edit every single one of them)

> 
> It also breaks down if udpcast uses absolute paths or isn't prepared to

... this too is a problem in Ubuntu, which uses /install/initrd.gz
rather than ../install/initrd.gz . However, I can understand why they
are doing this: as far as I can see, syslinux3 did not yet support paths
involving "..", so absolute paths were the only way to reference files
in sibling directories...

It would help here if syslinux had the equivalent of chroot, in addition
to chdir :-)

> find its post-boot data files in a subdirectory.  But these would be a
> problem with the pxechain approach as well.

Indeed. But most distributions put their entire post-boot tree into a
directory named after the distribution (/KNOPPIX, /ubuntu, /LiveOS), so
there is no need to put it in a different place... unless you want
several versions of a same distribution (such as Ubuntu 9.04 and Ubuntu
10.04) or several architectures (i386 and amd64).

For this purpose, Knoppix supports the knoppix_dir boot parameter.

Now, if there was a way to specify a default append for sub config files
loaded in such a way, this problem would be solved as well:

LABEL Knoppix32
        menu label Knoppix32
        config /knoppixBoot32/isolinux.cfg
        append subdir=/knoppixBoot32 dfltAppend=knoppix_dir=/knoppix32

LABEL Knoppix64
        menu label Knoppix64
        config /knoppixBoot64/isolinux.cfg
        append /knoppixBoot64
        append subdir=/knoppixBoot64 dfltAppend=knoppix_dir=/knoppix64

Thanks,

Alain




More information about the Syslinux mailing list