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

Thomas Schmitt scdbackup at gmx.net
Sat Mar 18 15:02:21 PDT 2017


Hi,

David Christensen wrote:
> I use this USB flash drive for bootable installer images; I do not
> attempt to mount it.  I don't know that I could, even if I wanted to:

  mkdir /mnt/iso
  mount /dev/sdc /mnt/iso

or, because partition 1 starts at block 0, you may mount it too

  mount /dev/sdc1 /mnt/iso


> # fdisk -l /dev/sdc
> WARNING: GPT (GUID Partition Table) detected on '/dev/sdc'! The util
> fdisk doesn't support GPT.

That's actually a bug in fdisk. The GPT is invalid because it is not
announced by a "Protective MBR".

>    Device Boot      Start         End      Blocks   Id  System
> /dev/sdc1   *           0     1325055      662528    0  Empty

"Empty" is not a realistic statement but just a human readable representation
of partition tye 0x0. It is unusual but needed to avoid that UEFI sees
partition 2 as nested partition inside partition 1.

> # parted /dev/sdc u s p
> Warning: /dev/sdc contains GPT signatures, indicating that it has a GPT
> table.  However, it does not have a valid fake msdos partition table, as
> it should.

Smarter than fdisk.

> Is this a GPT partition table?
> Yes/No? yes
> Error: Both the primary and backup GPT tables are corrupt. 

That's because of the nested GPT partitions, i assume.

The complaints of parted are justified. But the deviations from GPT
specs and MBR traditions are necessary and intentional.
(The mjg BIOS+EFI+Mac isohybrid layout is king in booting. Otherwise one
 should not look at it while reading the specs.)

In any case, a non-EFI BIOS should not see anything noteworthy in
the GPT equipment. Just some bytes in some blocks of the medium.


> I assume dd will encounter a write error and exit if some file system on
> the USB flash drive is mounted when I attempt to burn the ISO file to
> the device (?).

If you have write permission then dd can overwrite the drive.
A simultaneously active read-write filesystem is likely to alter the
ISO on the drive. But you verified the SHA256. So the ISO is ok.


> I need a debugging version of whatever program is generating the error
> message "isolinux.bin missing or corrupt".

That would be the MBR code at bytes 0 to 432 of the ISO.
Source code (assembler) is at
  http://git.zytor.com/syslinux/syslinux.git/tree/mbr/isohdpfx.S

It's a very narrow piece of space for a program. One may re-use the
"nop" bytes at label "_start:". They serve as fake Apple Partition Map
header block.
If the first ".byte 0x33, 0xed" before the "nop"s gets removed then the
second one after the "nop"s needs to be removed, too.

One could hardcode the block address of "isolinux.bin" (8444 decimal)
and inspect or print the bytes read from there via BIOS INT 13H
(see https://en.wikipedia.org/wiki/INT_13H).
Next one would try on Linux to find the block iaddress which yields that
content.

Further one could try to find out whether "we have EBIOS" with LBA
addressing or "CBIOS" with Cylinder/Head/Sector addressing.
If CBIOS, INT 13 with AH 6 is used for reading, else AH 42.
If C/H/S and if the EBIOS assumes a different size of head and cylinder
than the MBR does ... that would explain a mislead read attempt.
But i understand that INT 13 with AH 8 is used to inquire the C/H/S
factors from the BIOS in line 176 ff. So if the BIOS does not lie then
the computation at label "read_sector_cbios:" should be correct.

Regrettably i still have 4560 pages of the Intel processor manual to read
before i can start to handcode an MBR. ~:o)


Have a nice day :)

Thomas



More information about the Syslinux mailing list