El Torito boot image corrupted by truncation
Bug #1266461 reported by
TJ
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ISO Master |
Fix Released
|
Unknown
|
|||
isomaster (Ubuntu) |
Fix Released
|
High
|
David Johnson |
Bug Description
El Torito Boot records are being truncated resulting in un-bootable ISO images.
Starting with two professionally mastered bootable DVD-ROMs I saved their boot images (4096 bytes) and added them to new newly created ISO images containing the same files.
I also opened one of the professional ISO images and then did Save As... without making any changes.
Both times, after saving, ISO Master and 'geteltorito' report the boot image size is now 2048 bytes.
tags: | added: patch |
tags: | added: patch-forwarded-debian patch-forwarded-upstream |
Changed in isomaster (Ubuntu): | |
status: | In Progress → Confirmed |
assignee: | TJ (tj) → nobody |
Changed in isomaster (Ubuntu): | |
assignee: | nobody → David Johnson (dj-david-web) |
Changed in isomaster: | |
status: | Unknown → New |
Changed in isomaster: | |
status: | New → Fix Released |
To post a comment you must log in.
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:
/****** ******* ******* ******* ******* ******* ******* ******* ******* ******* ******* ** otCatalog( ) otCatalog( VolInfo* volInfo,
bk_off_ t* bootRecordSecto rNumberOffset)
* writeElToritoBo
* 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 writeElToritoBo
... yteArray( &(buffer[ 38]), 4);
/* sector count. i have yet to see a boot record with a sector count
* that's not 4 */
write721ToB
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 7_professional_ with_sp1_ x64_dvd_ u_676939. 2.iso' for writing
mangling
opening 'en_windows_
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.