[syslinux] DEFAULT versus UI

Gene Cumm gene.cumm at gmail.com
Tue Sep 14 04:47:31 PDT 2010


On Mon, Sep 13, 2010 at 09:02, Gene Cumm <gene.cumm at gmail.com> wrote:
> On Thu, Sep 9, 2010 at 14:44, H. Peter Anvin <hpa at zytor.com> wrote:
>> On 08/28/2010 04:32 AM, Gene Cumm wrote:
>>> I'm posting this as I'm trying to evaluate DEFAULT versus UI.
>>>
>>> As it stands right now, the use of the UI directive means that DEFAULT
>>> is effectively ignored from the command line.  If you specify UI and
>>> DEFAULT and use (vesa)menu.c32, (vesa)menu.c32 will use DEFAULT unless
>>> a MENU DEFAULT option exist in the current context.  If the attempt to
>>> execute a command fails, returning you to the "boot: " prompt, hitting
>>> enter will return you to the menu (assuming you haven't switched
>>> configs).  If your specified UI does not exist, hitting enter will
>>> again attempt to load the UI (probably unsuccessfully unless it's
>>> PXELINUX and you encountered an error that won't repeat on a
>>> particular retry).
>>>
>>> If you've specified UI and DEFAULT but the UI file can not be found or
>>> otherwise loaded from media completely, I think it would be more
>>> advantageous to the user to return an error stating (probably in
>>> addition to the existing output) "UI could not be loaded" and then
>>> hitting enter at "boot: " would activate DEFAULT rather than failing
>>> again on UI.  Alternatively, it could again attempt to load UI but on
>>> failure, run DEFAULT.  However, if loading UI was successful, hitting
>>> enter from the "boot: " prompt should return to the menu.
>>>
>>> Thoughts/comments?
>>>
>>> HPA, I'm interested in working on this if there's interest.
>>>
>>
>> Sounds reasonable to me.
>>
>>        -hpa
>
> I've got step one on this done.  If UI fails with a file not found,
> use DEFAULT as the auto_boot entry (tweaking DefaultLevel).  Next is
> to then attempt auto_boot again with the new DefaultLevel.  I also
> need to look into other error conditions (not COM32R, for example) and
> possibly a few more minor things.

I've created a new branch genec_ui_hpa to make it easier to merge into
the current tree.  git://gnx.ath.cx as usual.  hpa, I can quickly
merge these commits into my genec_hpa branch if that's easier.

DefaultLevel is changed if the file is not found or it's not a COM32R
module.  If the file is not found and ONERROR is not used or it's not
a COM32R module, it attempts to use DEFAULT if not null.

The last use each of DEFAULT and UI will be stored for use.  Before
these changes, the core stored the last use of UI, if specified, or
last use of DEFAULT if no UI specified.

I'm still reading through the core to see if there are other KERNEL
failures can be caught.

-- 
-Gene




More information about the Syslinux mailing list