Bug 2278677 - Unable to use mkksiso with Fedora Server 39/40
Summary: Unable to use mkksiso with Fedora Server 39/40
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: pungi
Version: 40
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Lubomír Sedlář
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-05-02 17:20 UTC by Deven Phillips
Modified: 2024-06-16 14:47 UTC (History)
8 users (show)

Fixed In Version: pungi-4.6.2-6.fc41 pungi-4.6.2-6.fc39 pungi-4.6.2-6.fc40
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-05-31 15:23:21 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Deven Phillips 2024-05-02 17:20:01 UTC
When I attempt to create an ISO from the Fedora-Server-dvd image (39 or 40) I get the following output and error:

```
root@p15v:/home/dphillips/Documents/RedHat/Customers/JCI/mk-kickstart-iso# mkksiso -V test /run/media/dphillips/Ventoy/kickstart.cfg ./Fedora-Server-dvd-x86_64-40-1.14.iso ./gateway.iso
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/dphillips/Documents/RedHat/Customers/JCI/mk-kickstart-iso/Fedora-Server-dvd-x86_64-40-1.14.iso'
Drive access : shared:readonly
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,  548g free
Volume id    : 'Fedora-S-dvd-x86_64-40'
xorriso : UPDATE :       1 files restored (  1465b) in 1 seconds = 0.0xD
Extracted from ISO image: file '/boot/grub2/grub.cfg'='/tmp/mkksiso-9b_ii1qn/boot/grub2/grub.cfg'
xorriso : UPDATE :       1 files restored (  1326b) in 1 seconds = 0.0xD
Extracted from ISO image: file '/EFI/BOOT/BOOT.conf'='/tmp/mkksiso-9b_ii1qn/EFI/BOOT/BOOT.conf'
xorriso : UPDATE :       1 files restored (    37b) in 1 seconds = 0.0xD
Extracted from ISO image: file '/.discinfo'='/tmp/mkksiso-9b_ii1qn/.discinfo'
xorriso : UPDATE :       1 files restored (  1326b) in 1 seconds = 0.0xD
Extracted from ISO image: file '/EFI/BOOT/grub.cfg'='/tmp/mkksiso-9b_ii1qn/EFI/BOOT/grub.cfg'
INFO:iso arch = x86_64
INFO:Volume Id = test
WARNING:No isolinux/isolinux.cfg file found
WARNING:No s390 config files found
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/dphillips/Documents/RedHat/Customers/JCI/mk-kickstart-iso/Fedora-Server-dvd-x86_64-40-1.14.iso'
Drive access : shared:readonly
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,  548g free
Volume id    : 'Fedora-S-dvd-x86_64-40'
xorriso : UPDATE :      11 files restored ( 12251k) in 1 seconds = 9.1xD
Extracted from ISO image: file '/EFI'='/tmp/mkksiso-wisw4asn/EFI'
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/dphillips/Documents/RedHat/Customers/JCI/mk-kickstart-iso/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,  548g free
Volume id    : 'Fedora-S-dvd-x86_64-40'
Drive current: -outdev '/home/dphillips/Documents/RedHat/Customers/JCI/mk-kickstart-iso/gateway.iso'
Media current: stdio file, overwriteable
Media status : is blank
Media summary: 0 sessions, 0 data blocks, 0 data,  548g free
xorriso : SORRY : Cannot enable EL Torito boot image #1 because it is not a data file in the ISO filesystem
xorriso : WARNING : -volid text does not comply to ISO 9660 / ECMA 119 rules
xorriso : NOTE : Replayed 15 boot related commands
xorriso : WARNING : -volid text does not comply to ISO 9660 / ECMA 119 rules
Updating '/tmp/mkksiso-9b_ii1qn/boot/grub2/grub.cfg' to '/boot/grub2/grub.cfg'
xorriso : UPDATE : Added/overwrote '/boot/grub2/grub.cfg'  (1523)
Differences detected and updated. (runtime 0.0 s)
Updating '/tmp/mkksiso-9b_ii1qn/EFI/BOOT/grub.cfg' to '/EFI/BOOT/grub.cfg'
xorriso : UPDATE : Added/overwrote '/EFI/BOOT/grub.cfg'  (1384)
Differences detected and updated. (runtime 0.0 s)
Updating '/tmp/mkksiso-9b_ii1qn/EFI/BOOT/BOOT.conf' to '/EFI/BOOT/BOOT.conf'
xorriso : UPDATE : Added/overwrote '/EFI/BOOT/BOOT.conf'  (1384)
Differences detected and updated. (runtime 0.0 s)
Updating '/tmp/mkksiso-9b_ii1qn/.discinfo' to '/.discinfo'
xorriso : UPDATE : Adjusted attributes of '/.discinfo'
Differences detected and updated. (runtime 0.0 s)
xorriso : UPDATE :       1 files added in 1 seconds
Added to ISO image: file '/kickstart.cfg'='/run/media/dphillips/Ventoy/kickstart.cfg'
xorriso : NOTE : Copying to System Area: 32768 bytes from file '--interval:imported_iso:0s-15s:zero_mbrpt,zero_gpt:/home/dphillips/Documents/RedHat/Customers/JCI/mk-kickstart-iso/Fedora-Server-dvd-x86_64-40-1.14.iso'
libisofs: FAILURE : Cannot refer by GRUB2 MBR to data outside of ISO 9660 filesystem.
libisofs: FAILURE : Operation canceled
xorriso : FAILURE : Failed to prepare session write run
xorriso : NOTE : -return_with SORRY 32 triggered by problem severity FAILURE
Traceback (most recent call last):
  File "/usr/bin/mkksiso", line 627, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/bin/mkksiso", line 616, in main
    MakeKickstartISO(args.input_iso, args.output_iso, args.ks or args.ks_pos, args.updates,
  File "/usr/bin/mkksiso", line 533, in MakeKickstartISO
    subprocess.run(cmd, check=True, capture_output=False, env={"LANG": "C"})
  File "/usr/lib64/python3.12/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['xorriso', '-indev', '/home/dphillips/Documents/RedHat/Customers/JCI/mk-kickstart-iso/Fedora-Server-dvd-x86_64-40-1.14.iso', '-outdev', '/home/dphillips/Documents/RedHat/Customers/JCI/mk-kickstart-iso/gateway.iso', '-boot_image', 'any', 'replay', '-volid', 'test', '-append_partition', '2', 'C12A7328-F81F-11D2-BA4B-00A0C93EC93B', '/tmp/efibootimg-7gq87u3q', '-update', '/tmp/mkksiso-9b_ii1qn/boot/grub2/grub.cfg', '/boot/grub2/grub.cfg', '-update', '/tmp/mkksiso-9b_ii1qn/EFI/BOOT/grub.cfg', '/EFI/BOOT/grub.cfg', '-update', '/tmp/mkksiso-9b_ii1qn/EFI/BOOT/BOOT.conf', '/EFI/BOOT/BOOT.conf', '-update', '/tmp/mkksiso-9b_ii1qn/.discinfo', '/.discinfo', '-map', '/run/media/dphillips/Ventoy/kickstart.cfg', 'kickstart.cfg']' returned non-zero exit status 32.
```

Reproducible: Always

Steps to Reproduce:
1. Download Fedora Server DVD ISO
2. Use mkksiso to add a kickstart file to the ISO and output a new ISO
3. mkksiso -V test /run/media/dphillips/Ventoy/kickstart.cfg ./Fedora-Server-dvd-x86_64-40-1.14.iso ./gateway.iso
Actual Results:  
Error shown in the summary above

Expected Results:  
A bootable ISO image with my kickstart configuration included

Comment 1 Brian Lane 2024-05-02 20:51:57 UTC
Thanks for the bug report, I can reproduce it here with DVDs from F38, F39, F40. At this point I'm not sure if DVDs ever worked -- I don't use them myself, I use it with the netinst iso. I'll see if I can sort out what's going on here, but it may take a while.

Comment 2 Brian Lane 2024-05-09 22:12:09 UTC
I've tracked this down to how pungi is updating the boot.iso, it ends up they are mapping files that don't need to be mapped and that is interfering with the hidden eltorito boot image that is already on the iso. Reassigning to pungi with an explanation of what is happening:

You can check for the problem by running:
xorriso -indev ~/disk-images/isos/Fedora-Server-dvd-x86_64-40-1.14.iso -report_el_torito plain -report_system_area plain

and checking the output for "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." and also note that "El Torito img path :   1  /images/eltorito.img" is missing.


When the DVD is created by pungi using the xorriso dialog script (eg. https://kojipkgs.fedoraproject.org/compose/40/latest-Fedora-40/work/x86_64/tmp-Server/xorriso-140162580703776.txt) it is including mappings of files that already exist on the boot.iso, and have not changed. You only need to map files that are different or are being added to the boot.iso, that's the whole idea behind using "-boot_image any replay". 

I ran some experiments and was able to reproduce the problem by:

- Mounting a f40 DVD iso on /mnt/iso/
- exiting the above script to point there as the path for all the files to be mapped
- ran the script with xorriso -dialog on

the result is a broken dvd. If I edit the dialog script to remove the lines that touch "images/eltorito.img" then the resulting DVD is just fine, has no errors about the size of the El-Torito image and include the path as expected in the output of the repo.

pungi should be updated to only map files that have changed or are being added. This will also make the resulting DVD slightly smaller (about 12M in my tests).

Comment 3 Brian Lane 2024-05-09 23:16:54 UTC
In the meantime here is a quick script to make a 'clean' DVD from a boot.iso and a dvd.iso - https://bcl.fedorapeople.org/scripts/fix-fedora-dvds just call it like 'fix-fedora-dvds boot.iso dvd.iso fixed.iso'

Comment 4 Lubomír Sedlář 2024-05-16 07:54:53 UTC
The detection of what is already on the boot.iso is not working because the compose host does not have xorriso installed. The creation itself runs in runroot environment in Koji, so that's not affected. But preparation of the commands to run happens on the compose host, and absence of xorriso makes the tool think there's nothing on the boot.iso.

There are multiple issues here (xorriso should be required by pungi, the failure should not be silent like this).

Comment 5 Lubomír Sedlář 2024-05-16 11:48:39 UTC
One more thing: once this is fixed and the files from boot.iso are not modified anymore, it's going to break checksums in .treeinfo file. At least the images/eltorito.img file is different between the boot.iso and the filesystem.

Comment 6 Fedora Update System 2024-05-31 11:39:36 UTC
FEDORA-2024-7a36d17395 (pungi-4.6.2-2.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-7a36d17395

Comment 7 Fedora Update System 2024-05-31 11:53:32 UTC
FEDORA-2024-59b45f73c5 (pungi-4.6.2-6.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-59b45f73c5

Comment 8 Fedora Update System 2024-05-31 13:16:44 UTC
FEDORA-2024-66288a4e9a (pungi-4.6.2-6.fc40) has been submitted as an update to Fedora 40.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-66288a4e9a

Comment 9 Fedora Update System 2024-05-31 13:16:44 UTC
FEDORA-2024-e6ce686bfe (pungi-4.6.2-6.fc39) has been submitted as an update to Fedora 39.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-e6ce686bfe

Comment 10 Fedora Update System 2024-05-31 15:23:21 UTC
FEDORA-2024-59b45f73c5 (pungi-4.6.2-6.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 11 Fedora Update System 2024-06-01 01:41:59 UTC
FEDORA-2024-e6ce686bfe has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-e6ce686bfe`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-e6ce686bfe

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 12 Fedora Update System 2024-06-01 01:53:46 UTC
FEDORA-2024-66288a4e9a has been pushed to the Fedora 40 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-66288a4e9a`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-66288a4e9a

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 13 Fedora Update System 2024-06-16 01:28:18 UTC
FEDORA-2024-e6ce686bfe (pungi-4.6.2-6.fc39) has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 14 Fedora Update System 2024-06-16 14:47:17 UTC
FEDORA-2024-66288a4e9a (pungi-4.6.2-6.fc40) has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.