[syslinux] "isolinux.bin missing or corrupt" when booting USB flash drive in old PC

Martin Str|mberg
Wed, 22 Mar 2017 07:01:15 -0000

On Tue, Mar 21, 2017 at 09:03:35AM +0100, Thomas Schmitt via Syslinux
wrote:
> I think we should offer David a binary which he can combine with
> the MBR of the ISO and the image with the recognizable blocks.
> I will later today upload a binary version of my block producer
> and post the URL.
>
> The combination will be:
>   432 bytes from Martin's MBR
>    80 bytes from the Debian ISO with isolinux block address
>   647 MiB from my block producer
>
> --------------------------------------------------------------------
> Looking at the assembler code:
>
> What's the meaning of
>         call    print_string
>         .ascii  "Key?\r\n"

It's waiting for a key because the debian iso displays some graphics
stuff so you won't have time to see any of the debug printing.

> How large is the binary currently ?
> Would there be room to print the (Cylinder, Head, Sector) address in
> case of CBIOS ?

Yes. It becoming very tight now, so I shortened the error messages.


First though I want to say I've managed to simulate David's error in
qemu by forcing isohdpfx.bin to fail the EBIOS test.

        /* Check to see if we have EBIOS */
        pushw   %dx             /* drive number */
        movb    $0x41, %ah      /* %al == 0 already */
        movw    $0x55aa, %bx
        xorw    %cx, %cx
        xorb    %dh, %dh
        stc
        int
        $0x13
//XXX   jc      1f
        jnc     1f
        cmpw    $0xaa55, %bx
        jne     1f
        andw    $1,%cx        /* Bit 0 = fixed disk subset */
        jz      1f

With that jc changed to jnc you will invert the result of the EBIOS
test and my qemu always has EBIOS.

Download the resulting isohdpfx here:
<http://www.ludd.ltu.se/~ams/tmp/isohdpfx.force_cbios.bin>


Back to Thomas' debug prints.

You can download my logger version of isohdpfx called isohdpfd here:
<http://www.ludd.ltu.se/~ams/tmp/isohdpfd.bin>
<http://www.ludd.ltu.se/~ams/tmp/isohdpfd.S>

In the EBIOS case it will print:

E<LBA0>/<LBA1>/<LBA2>/<LBA3>/

Key?

and wait for a key press.

In the CBIOS case it will print

C<LBA0>/<C0>/<H0>/<S0>
<LBA1>/<C1>/ /<S1>
<LBA2>/<C2>/ /<S2>
<LBA3>/<C3>/ /<S3>


Key?

and wait for a key press.


--
MartinS