[syslinux] A bug in syslinux boot code

j1borries at online.de j1borries at online.de
Tue Feb 8 11:37:30 PST 2011



Am 06.02.11 18:28, schrieb Gene Cumm:
> On Sun, Feb 6, 2011 at 08:50,  <j1borries at online.de> wrote:
>> I used syslinux 4.03 for my brand new usb-stick (16GB FAT32, no Partition Table). It works, but on some computers i get "boot error".
> Part of this may be that the BIOS of some of your computers want to
> treat this as a superfloppy and not an unpartitioned hard disk.
> 2,105,671,680 bytes (256*255*63*512) is the maximum size that should
> be treated as a superfloppy.  Every single UFD (USB flash drive) I
> have came partitioned from the factory just to force it to be treated
> as a hard disk.  I believe anything over ~8GB requires EDD calls to
> work.  What's the type specified in the banner ("CHS" or "EDD") on
> machines that do work and machines that don't?  Here's an example with
> CHS:
>
> SYSLINUX 4.03 2010-10-22 CHS Copyright (C) 1994-2010 H. Peter Anvin et al
>
The type was EDD in all cases.
It works with version 4.04 pre 5 on all my computers.
Thank you
Juergen
>> My investigation reveals three bugs in the boot code.
>>
>> Int 13 function 8 destroys the contents of register ES. Ah, now it is corrected in version 4.04 pre 5. Well done. I am happy now.
>> But there are still other bugs.
>>
>> Look on version 4.04 pre 5, core/bootdisc.inc, line 224: Int 13 function 8 ist called with DL = 0 (in my case), not with DL = Drive. This is because at label "harddisk" a segment address was loaded into DX. So int 13 returns wrong values.
> Yes, DL is garbage at this point however it calls xint13 which sets DL
> prior to issuing INT13h.  You'll need to look there for proper values.
>  The comments in core/diskboot.inc should be updated to reflect this.
>
>> Now look on version 4.04 pre 5, core/bootdisc.inc, line 165 ("mov [di-76+8],cl"):
>> I think the intention was "mov [di-12+4],cl" This is the place of the sector count in the disk drive parameter table.
>>
>> Juergen
> I'm still trying to look at this one.  I know there are some places
> where data is loaded multiple times.
>




More information about the Syslinux mailing list