[syslinux] real serial port output from pxelinux.0

Sergey Vlasov vsu at altlinux.ru
Sun Aug 9 08:05:08 PDT 2009


On Sun, Aug 09, 2009 at 03:19:22PM +0200, Geert Stappers wrote:
> On a computer with a real serial port do I mis some output.
> It is 'real serial port' as opposed to virtual hardware.
> The text that I mis is 'My IP address seems to be' and
> the decreasing hexadecimal IP-adress staircase.
> 
> The banner and the copyright message are displayed.
> pxelinux.cfg/default is fetched and its "SAY command" is shown.
> 
> Have a look at this <screenshot>
> PXELINUX 3.83 pre6-2-g8e01231*  Copyright (C) 1994-2009 H. Peter Anvin et al
> About to boot Debian Installer
> Loading di/linux..
> Loading di/initrd.gz...ready.
> </screenshot>
> 
> Being curious why only the banner is shown, I dived in core/pxelinux.asm.
> 
> Modifing the banner string was easy
> and did prove that my modified pxelinux.0 was being run.
> 
> Then it did took me several hours of in loop of
>  edit-compile-client_reboot-dhcp-pxelinux_run
> to find out that I was modifing death code.
> 
> With <patch>
> --- a/core/pxelinux.asm
> +++ b/core/pxelinux.asm
> @@ -259,15 +259,6 @@ _start1:
>  %include "init.inc"
>  
>  ;
> -; Tell the user we got this far
> -;
> -               mov si,syslinux_banner
> -               call writestr_early
> -
> -               mov si,copyright_str
> -               call writestr_early
> -
> -;
>  ; Assume API version 2.1, in case we find the !PXE structure without
>  ; finding the PXENV+ structure.  This should really look at the Base
>  ; Code ROM ID structure in have_pxe, but this is adequate for now --
> </patch> I got the same output as in <screenshot/>

Actually the code above works, but the output goes only to the VGA
console.  Serial console output starts only after the config file has
been found and the SERIAL command has been processed.  You still see
the banner and copyright string on the serial console, because the
pc_serial function (in core/parseconfig.inc) explicitly outputs
syslinux_banner and copyright_str to the serial port (but not to the
VGA console, because write_serial_str is used directly).

If you are trying to debug the code which runs before the config file
is loaded, you could try to modify the PXELINUX startup code to set up
serial port output (like pc_serial does) using hardcoded parameters.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://www.zytor.com/pipermail/syslinux/attachments/20090809/20062011/attachment.sig>


More information about the Syslinux mailing list