[syslinux] isohybrid.c, problem reports and questions

Thomas Schmitt scdbackup at gmx.net
Wed May 9 01:49:50 PDT 2012


Hi,

i think i found a further problem in isohybrid.c.
The backup GPT seems to be dislocated by 512 bytes.

The last usable LBA in the GPT headers (byte 40 to 47) is the same
as the start of partition entries in the backup GPT header.
(The value is 0x144fde in http://mjg59.fedorapeople.org/Fedora-LiveCD.iso)
To my understanding of GPT these numbers should differ by 1.

The backup GPT header starts 1024 bytes before the end of the image, despite
this comment in main():
        /*
         * Seek far enough back that the gpt header is 512 bytes before the
         * end of the image
         */

        if (fseek(fp, (isostat.st_size + padding) - orig_gpt_size - 512,
                  SEEK_SET))

Further above, i see that orig_gpt_size accounts for the GPT header size:
        orig_gpt_size = gpt_size = 512 + (128 * 128);

So subtracting 512 in the fseek call seems wrong.


Have a nice day :)

Thomas




More information about the Syslinux mailing list