[syslinux] isolinux.bin checksum

Thomas Schmitt scdbackup at gmx.net
Thu Jan 11 23:51:39 PST 2018


H,

Ady wrote:
> A_ The default checksum included in the tested isolinux.bin (offset 20, 
> 4-bytes-long) is the "correct" one (as oppose to the current situation, 
> since version 4.00).

That's good news.


> F_ In the tested isolinux.bin file, there are two additional bytes that 
> I found to be changed/affected by some ISO-building tools (e.g. 
> mkisofs), at offset 12 and offset 13.

This is the block number where the file content of isolinux.bin starts in
the ISO filesystem. It is the main reason to have a boot info table.

By mkisofs option -boot-load-size 4 the El Torito Boot Catalog tells BIOS
to load only the first 2048 bytes of isolinux.bin, because some BIOSes are
said to fail if they shall load all of isolinux.bin.
So the program must find and load the rest of itself. At that stage it
does not understand ISO 9660 filesystems. A simple block address helps
a lot.

man mkisofs paragraph "EL TORITO BOOT INFORMATION TABLE" says:
-----------------------------------------------------------------------------
   The  format  of  this  table is as follows; all integers are in section
   7.3.1 ("little endian") format.

     Offset    Name           Size      Meaning
      8        bi_pvd         4 bytes   LBA of primary volume descriptor
     12        bi_file        4 bytes   LBA of boot file
     16        bi_length      4 bytes   Boot file length in bytes
     20        bi_csum        4 bytes   32-bit checksum
     24        bi_reserved    40 bytes  Reserved

          The 32-bit checksum is the sum of all the 32-bit  words  in  the
          boot  file  starting  at  byte  offset  64.   All  linear  block
          addresses (LBAs) are given in CD sectors (normally 2048 bytes).
-----------------------------------------------------------------------------

The "primary volume descriptor" of a first session on medium is always at
Logical Block Address 16 = 0x10 0x00 0x00 0x00.
"Boot file length" and "32-bit checksum" get filled in by prepcore and do
not change by the -boot-info-table changes. Nevertheless the ISO producer
programs set these values too.


> G_ I have not tested isolinux-debug.bin nor any isohybrid features.

I understand that the isohybrid MBR loads and runs the first 2048 bytes of
isolinux.bin like BIOS would do with CD/DVD/BD media. From there on
everything should work fine. (Well, we know that a bug with handing over
of C/H/S geometry made it fail on old BIOS until last year ...)


Have a nice day :)

Thomas



More information about the Syslinux mailing list