weldr / lorax

Tools for creating images, including the Anaconda boot.iso, live disk images, iso's, and filesystem images.
GNU General Public License v2.0
294 stars 157 forks source link

mkksiso isn't working with DVD isos #1393

Closed bcl closed 2 months ago

bcl commented 5 months ago

I've confirmed with F38, 39, and 40 DVDs that it fails with:

libisofs: FAILURE : Cannot refer by GRUB2 MBR to data outside of ISO 9660 filesystem.

https://bugzilla.redhat.com/show_bug.cgi?id=2278677

bcl commented 5 months ago

Output from xorriso -indev dvd.iso -report_el_torito plain -report_system_area plain looks like this:

xorriso 1.5.6 : RockRidge filesystem manipulator, libburnia project.

xorriso : NOTE : Loading ISO image tree from LBA 0
xorriso : UPDATE :    2618 nodes read in 1 seconds
libisofs: WARNING : Found hidden El-Torito image. Its size could not be figured out, so image modify or boot image patching may lead to bad results.
libisofs: NOTE : Found hidden El-Torito image for EFI.
libisofs: NOTE : EFI image start and size: 1269243 * 2048 , 25552 * 512
xorriso : NOTE : Detected El-Torito boot information which currently is set to be discarded
Drive current: -indev '/home/bcl/disk-images/isos/Fedora-Server-dvd-x86_64-40-1.14.iso'
Media current: stdio file, overwriteable
Media status : is written , is appendable
Boot record  : El Torito , MBR protective-msdos-label grub2-mbr cyl-align-off GPT
Media summary: 1 session, 1275647 data blocks, 2491m data, 58.7g free
Volume id    : 'Fedora-S-dvd-x86_64-40'
El Torito catalog  : 898  1
El Torito images   :   N  Pltf  B   Emul  Ld_seg  Hdpt  Ldsiz         LBA
El Torito boot img :   1  BIOS  y   none  0x0000  0x00      4         899
El Torito boot img :   2  UEFI  y   none  0x0000  0x00  25552     1269243
El Torito img blks :   1  18
El Torito img blks :   2  6388
System area options: 0x00004201
System area summary: MBR protective-msdos-label grub2-mbr cyl-align-off GPT
ISO image size/512 : 5102588
Partition offset   : 16
MBR heads per cyl  : 0
MBR secs per head  : 0
MBR partition table:   N Status  Type        Start       Blocks
MBR partition      :   1   0x00  0xee            1      5102587
GPT                :   N  Info
GPT disk GUID      :      56e2eba8250b39458b6e53a0af829784
GPT entry array    :      2  248  separated
GPT lba range      :      64  5102524  5102587
GPT partition name :   1  490053004f003900360036003000
GPT partname local :   1  ISO9660
GPT partition GUID :   1  56e2eba8250b39458b6f53a0af829784
GPT type GUID      :   1  a2a0d0ebe5b9334487c068b6b72699c7
GPT partition flags:   1  0x1000000000000001
GPT start and size :   1  64  5076908
GPT partition name :   2  41007000700065006e006400650064003200
GPT partname local :   2  Appended2
GPT partition GUID :   2  56e2eba8250b39458b6c53a0af829784
GPT type GUID      :   2  28732ac11ff8d211ba4b00a0c93ec93b
GPT partition flags:   2  0x0000000000000000
GPT start and size :   2  5076972  25552

I've tried patching mkksiso to make it fail when rebuilding the boot.iso but so far haven't hit the right combination. Pungi uses a slightly different method to create the dvd from the boot.iso and I suspect this is what is causing the issue but I have not nailed it down yet.

The pungi code is here: https://pagure.io/pungi/blob/master/f/pungi/createiso.py#_135

bcl commented 2 months ago

The problem was with how pungi was creating the iso, more details here: https://bugzilla.redhat.com/show_bug.cgi?id=2278677#c2

and a script to fix a broken iso here: https://bcl.fedorapeople.org/scripts/fix-fedora-dvds