Comment 1 for bug 1266461

Revision history for this message
TJ (tj) wrote :

The professionally mastered images I am working with are 4096 bytes in size consisting of 8 x 512-bytes sectors.

The bug is that ISO master assumes all boot sectors are 2048 bytes (4 sectors) and has hard-coded the sector-count value:

/******************************************************************************
* writeElToritoBootCatalog()
* Write the el torito boot catalog (validation entry and inital/default entry).
* Returns the offset where the boot record sector number should
* be written (7.3.1).
* */
int writeElToritoBootCatalog(VolInfo* volInfo,
                             bk_off_t* bootRecordSectorNumberOffset)

...
    /* sector count. i have yet to see a boot record with a sector count
    * that's not 4 */
    write721ToByteArray(&(buffer[38]), 4);

Here's the before and after results of simply cloning an 8-sector bootable image:

$ geteltorito en_windows_7_professional_with_sp1_x64_dvd_u_676939.iso >/dev/null
Booting catalog starts at sector: 22
Manufacturer of CD: Microsoft Corporation
Image architecture: x86
Boot media type is: no emulation
El Torito image starts at sector 734 and has 8 sector(s) of 512 Bytes
Image has been written to stdout ....

$ isomaster
mangling
opening 'en_windows_7_professional_with_sp1_x64_dvd_u_676939.2.iso' for writing
writing blank at 0
writing terminator at 9800
sorting 9660
writing primary directory tree at C000
sorting joliet
writing supplementary directory tree at C800
writing 9660 path tables at D000
writing joliet path tables at E000
writing files at F000
writing long NMs at F800
writing pvd at 8000
writing svd at 9000
freeing memory
Quitting

$ geteltorito en_windows_7_professional_with_sp1_x64_dvd_u_676939.2.iso >/dev/null
Booting catalog starts at sector: 20
Manufacturer of CD: Edited with ISO Master
Image architecture: x86
Boot media type is: no emulation
El Torito image starts at sector 21 and has 4 sector(s) of 512 Bytes
Image has been written to stdout ....

I am working on a patch.