[syslinux] configuration directive fixes

Gene Cumm gene.cumm at gmail.com
Sun Oct 17 20:10:53 PDT 2010


On Sun, Oct 17, 2010 at 10:47, Alexey Gladkov <gladkov.alexey at gmail.com> wrote:
> 17.10.2010 06:11, Gene Cumm wrote:
>> Let me restate this as it seems like I might not have been clear.   If
>> a global APPEND is set in a config, it is always inserted after the
>> first argument into the command line of a manually entered command
>> line
>
> Global APPEND is inserted into the command line and can be edited.

Can be edited?  From a "boot: " prompt?  I don't see how.

>From menu.c32/vesamenu.c32, yes.  That's not a manually entered
command line from the perspective of the core.  That's
menu.c32/vesamenu.c32 calling a function to run an exact command.
When this is done, the core doesn't bother with the global APPEND
ever.  menu.c32/vesamenu.c32 inserts the global APPEND at the
appropriate spot when generating the command line string that will
eventually be passed to the function.

I mean being able to insert a special string (ie ":::" as the first
option) or use a special keystroke (ie Ctrl-O for omit APPEND) to
prevent the global APPEND from being used in the "boot: " prompt.

At the same time, introducing such an enhancement should also be
blockable by the config by extending the functionality of ALLOWOPTIONS
(or rather, specifying it will do more than it does now) or with a new
directive (in the interest of security, like PROMPT and IMPLICIT).

>> With a LABEL, if an APPEND is specified, the global APPEND is
>> ignored.  If a LABEL APPEND of "APPEND -" is specified, no arguments
>> are appended.
>
> Yes.
>
>> I think it would be worthwhile to find a way to override this behavior
>> if desired.
>
> I'm using extlinux on my laptop. There is my configuration (almost):
>
> UI vesamenu.c32

Try dropping your UI and see if you can edit/override your global APPEND.

> PROMPT 0
> TIMEOUT 150
> APPEND ro root=/dev/sda2 resume=/dev/sda1 panic=30
>
> LABEL vmlinuz
>   MENU LABEL Linux (^default)
>   LINUX /boot/vmlinuz
>   INITRD /boot/initrd.img
>
> LABEL failsafe
>   MENU LABEL Linux (^failsafe mode)
>   LINUX /boot/vmlinuz
>   INITRD /boot/initrd.img
>   ADDAPPEND failsafe vga=normal
>
> LABEL vmlinuz-2.6.26
>   MENU LABEL Kernel (2.6.26)
>   LINUX  /boot/vmlinuz-2.6.26
>   INITRD /boot/initrd-2.6.26.img
>
> LABEL vmlinuz-2.6.32
>   MENU LABEL Kernel (2.6.32)
>   LINUX  /boot/vmlinuz-2.6.32
>   INITRD /boot/initrd-2.6.32.img
>
> If I load any of the LABELs, it will use the parameters from the
> global 'APPEND'. If I load the 'failsafe', then 'ADDAPPEND' parameters
> will be added to global parameters.
>
> This scheme helps to avoid duplication of parameters and easy
> modification.

I agree this would be a nice feature eventually but must be done
perfectly as messing up the core has a dramatic impact.  Either
ADDAPPEND or a special string which the core would replace with the
global append, allowing it to be placed somewhere other than the
beginning.

-- 
-Gene




More information about the Syslinux mailing list