[syslinux] Problems booting from local hd

H. Peter Anvin hpa at zytor.com
Thu Apr 26 10:24:53 PDT 2012


On 04/26/2012 06:58 AM, Stefan Titze wrote:
> Hi,
> 
> I've got a question regarding pxelinux:
> 
> It seems that there is a buck in syslinux 3.86 (or still is in the
> current build) in the reset_pxe function. If I call
> "syslinux_local_boot(0)" (in a COM32 binary) the KeepPXE variable is
> always 1 which resets the PXE stack instead of unloading it:
> 

Yes, because we return to the PXE stack which then is supposed to unload
itself.

> local_boot:
> 		push cs
> 		pop ds
> 		mov [LocalBootType],ax
> 		call vgaclearmode
> 		mov si,localboot_msg
> 		call writestr_early
> 		; Restore the environment we were called with
> 		call reset_pxe
> .
> reset_pxe:
> 		or byte [KeepPXE],1
> 		; Fall through
> 
> unload_pxe:
> 		push ds
> 		push es
> 
> 		mov ax,cs
> 		mov ds,ax
> 		mov es,ax
> 
> 		cmp byte [KeepPXE],0		; Should we keep PXE around?
> 		jne do_reset_pxe
>  
> on Dell Precision M4600 Laptops (BIOS Rev. A08) reseting the PXE
> stack causes a reboot and Dell Latitude E5520 laptops (BIOS Rev. A05)
> start over with another PXE boot (-> PXE boot cycle until not enough
> free memory is left over to startup  syslinux).
> 
> With syslinux 4.05 both laptops try to exit PXE but they will freeze
> before they can boot the local disk.
> 
> The question is why is it necessary to reset PXE when local_boot (0)
> is called? I looked in the syslinux 3.61 source code (which works
> great by the way) and there the PXE stack will not be resetted.
> 
> If I change the code to (quick fix):
> 
> reset_pxe:
> 		;or byte [KeepPXE],1
> 		; Fall through
> 
> unload_pxe:
> 		push ds
> 		push es
> 
> everything works fine again.
> 

OK, this is definitely wrong, since you're unloading the PXE stack and
then return to it... that's just plain broken.  In fact, it is amazing
that you don't end up crashing the system.

Now, as to why resetting the PXE stack... this was added in 3.85 without
any comments as to why.  I suspect it was based on what made logical
sense (trying to get the PXE stack back to the state it was in before),
but if it causes problems then perhaps it is something we need to deal with.

	-hpa



More information about the Syslinux mailing list