[syslinux] "menu quit" entry causing prompt to freeze

Sebastian Herbszt herbszt at gmx.de
Wed Apr 29 12:56:46 PDT 2009


H. Peter Anvin wrote:
> Sebastian Herbszt wrote:
>> 
>> I just tried such an entry in my config using pxelinux and since this label
>> doesn't have a kernel name set pxelinux jumps here to local_boot and
>> tries to boot
>> from local disk. It doesn't matter if the label is called "exit" or "xyz".
>> Does local boot work from isolinux on that system?
>> 
> 
> Clearly the handling of an empty label (which this is from the point of
> view of the CLI) is broken.  It's a failure case and as such hasn't
> gotten much testing.

An empty label is somewhat similar to localboot:

label harddisk
  localboot 0x80

In both cases VKernelBuf is cleared in pc_label.

pc_localboot from parseconfig.inc clears VKernelBuf+vk_rname and sets

%if IS_PXELINUX
                ; PXELINUX uses the first 4 bytes of vk_rname for the
                ; mangled IP address
                mov [VKernelBuf+vk_rname+5], bx ; Return type
%else
                mov [VKernelBuf+vk_rname+1], bx ; Return type
%endif

vk_check from ui.inc has

%if HAS_LOCALBOOT
                ; Is this a "localboot" pseudo-kernel?
%if IS_PXELINUX
                cmp byte [VKernelBuf+vk_rname+4], 0
%else
                cmp byte [VKernelBuf+vk_rname], 0
%endif
                jne get_kernel          ; No, it's real, go get it

                mov ax, [VKernelBuf+vk_rname+1]
                jmp local_boot
%else
                jmp get_kernel
%endif

Questions:

1.  Should "mov ax, [VKernelBuf+vk_rname+1]" be wrapped up with %if IS_PXELINUX?

%if IS_PXELINUX
                mov ax, [VKernelBuf+vk_rname+5]
%else
                mov ax, [VKernelBuf+vk_rname+1]
%endif

The code tries to read the "Return type" set up by pc_localboot, right?

2. Maybe set vk_type to a new value which represents localboot? VK_LOCAL?
We could check for the "localboot" pseudo-kernel by just checking vk_type.

- Sebastian




More information about the Syslinux mailing list