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

Thomas Schmitt scdbackup at gmx.net
Wed Mar 22 03:24:19 PDT 2017


Hi,

funny or enlightening observation:

With my qemu-system-i386 it would work if the detected Heads/Cylinder and
Sectors/Head factors would change positions !

The effective read operation seems to use H/C = 32 , S/H = 63.
The correct LBA would be addressed by     H/C = 63 , S/H = 32.

--------------------------------------------------------------------------
Reasoning:

I have transplanted the "Force CBIOS" change from isohdpfx.force_cbios.bin
to isohdpfd.bin.
The Intel manual tells me that JNC is 0x73 (= 's') and JC is 0x72 ('r').
Looking for the instruction operand 0xaa55 in isohdpfd.bin leads me to
the value 0x72 at byte position 56.

So i patched isohdpfd.bin to let it force CBIOS by

  cp isohdpfd.bin isohdpfd.force_cbios.bin
  echo -n s | dd conv=notrunc bs=1 count=1 seek=56 of=isohdpfd.force_cbios.bin

composed the proposed diagnostic ISO and ran

  qemu-system-i386 -m 512 -hda bseq_isohybrid.iso

My frankensteining obviously worked.
The result is:

  C00...0020FC/0004/0B/1D
  00...0020FD/0004/0B/1E
  00...0020FE/0004/0B/1F
  00...0020FF/0004/0B/20

  00002251...00002251
  ...
  00002251...00002251

The block content 0x20FE tells that the decimal address is 8785 whereas
the requested address was 8444.

So here we clearly have a wrong translation from LBA to C/H/S.

But the result differs from what David reports. My run did read a
block although it was the wrong one.


I have a guesser function for disk geometry in libisofs. It says that

  HC= 32 , SH= 63

is the only valid combination where 

  HC * SH * 4 + SH * 11 + 29 - 1 = 8785

(The function works by brute force, simply trying all combinations of
 {1...255} x {1 ... 63}. Often it finds more than one solution.)

The only solution for 8444 = (4,11,29) is just the swapped solution
of the effective read address:

  HC = 63 , SH = 32

  HC * SH * 4 + SH * 11 + 29 - 1 = 8444


Have a nice day :)

Thomas



More information about the Syslinux mailing list