Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1969562 - The created iso is not bootable
Summary: The created iso is not bootable
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: livecd-tools
Version: 34
Hardware: x86_64
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Neal Gompa
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-08 15:48 UTC by Luca Giuzzi
Modified: 2021-06-29 01:29 UTC (History)
9 users (show)

Fixed In Version: livecd-tools-28.3-1.el8 livecd-tools-28.3-1.fc33 livecd-tools-28.3-1.fc34
Doc Type: ---
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-06-28 00:31:30 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Luca Giuzzi 2021-06-08 15:48:33 UTC
Description of problem:

I created an iso image from a custom kickstart file.
The image is not bootable under ElTorito.

The affected (sub)package is 
python3-imgcreate-28.1-1.fc34.x86_64

Version-Release number of selected component (if applicable):

28.1-1.fc34


How reproducible:

Try to create an iso image


Steps to Reproduce:
1. sudo livecd-creator kickstart.ks
2. wait for the iso image to be created
3. test the iso image with
qemu-system-x86_64 -enable-kvm -m 4096 -cdrom ./image.iso

Actual results:
The image does not boot under bios.

Expected results:
The image should be bootable both under UEFI and in ElTorito compatibility mode.


Additional info:

It appears that in file /usr/lib/python3.9/site-packages/imgcreate/live.py the proper options for xorrisofs are not set.

We have in class x86LiveImageCreator the following

def _get_xorrisofs_options(self,isodir):
   options = []
   if os.path.exists(os.path.join(isodir, "images/efiboot.img")):
     options+=["-no-emul-boot", "-isohybrid-gpt-basdat",
                        "-isohybrid-mbr", "/usr/share/syslinux/isohdpfx.bin",
                        "-eltorito-boot", "isolinux/isolinux.bin",
                        "-boot-load-size", "4", "-boot-info-table",
                        "-eltorito-catalog", "isolinux/boot.cat",
                        "-eltorito-alt-boot", "-e", "images/efiboot.img" ]

However, some options however should be set unconditionally (or, at least, they do not depend on efiboot.img). So the code should rather be

    def _get_xorrisofs_options(self, isodir):
        options = [ "-no-emul-boot", "-isohybrid-gpt-basdat",
                        "-isohybrid-mbr", "/usr/share/syslinux/isohdpfx.bin",
                        "-eltorito-boot", "isolinux/isolinux.bin",
                        "-boot-load-size", "4", "-boot-info-table",
                        "-eltorito-catalog", "isolinux/boot.cat"]

        if os.path.exists(os.path.join(isodir, "images/efiboot.img")):
            options += ["-eltorito-alt-boot", "-e", "images/efiboot.img" ]


With this patch it appears that the disk is correctly generated.

Comment 1 Luca Giuzzi 2021-06-08 17:55:19 UTC
I update my previous remarks. The image created with the patch boots in bios mode, but not in EFI mode.
It seems that the cause is that shimx64.efi is copied with the name BOOTx64.efi but part of the script looks for the old name.

Comment 2 Luca Giuzzi 2021-06-09 10:51:37 UTC
Incidentally, a minimal example of the problem is with
livecd-creator        --config=/usr/share/doc/livecd-tools/livecd-fedora-minimal.ks
The created image is not bootable.

The relevant transcript is:

Traceback (most recent call last):         
  File "/usr/sbin/mkefiboot", line 168, in <module>                                    
    main()                                 
  File "/usr/sbin/mkefiboot", line 161, in main                                        
    mkefiboot(opt.bootdir, opt.outfile, opt.label)                                     
  File "/usr/sbin/mkefiboot", line 33, in mkefiboot                                    
    mkdosimg(None, outfile, label=label, graft={'EFI/BOOT':bootdir})                   
  File "/usr/lib/python3.9/site-packages/pylorax/imgutils.py", line 515, in mkdosimg   
    mkfsimage("msdos", rootdir, outfile, size, mountargs=mountargs,                    
  File "/usr/lib/python3.9/site-packages/pylorax/imgutils.py", line 489, in mkfsimage  
    with LoopDev(outfile, size) as loopdev:                                            
  File "/usr/lib/python3.9/site-packages/pylorax/imgutils.py", line 355, in __init__   
    mksparse(self.filename, size)     
  File "/usr/lib/python3.9/site-packages/pylorax/imgutils.py", line 143, in mksparse   
    with open(outfile, "w") as fobj:       
FileNotFoundError: [Errno 2] No such file or directory: '/var/tmp/imgcreate-qr244tp5/is
o-xlh3c83a/images/efiboot.img'             
Traceback (most recent call last):                                                     
  File "/usr/sbin/mkefiboot", line 168, in <module>                                    
    main()           
  File "/usr/sbin/mkefiboot", line 158, in main                                        
    mkmacboot(opt.bootdir, opt.outfile, opt.label, opt.icon, opt.product,              
  File "/usr/sbin/mkefiboot", line 45, in mkmacboot                                    
    mkhfsimg(None, outfile, label=label, graft=graft, size=size)                       
  File "/usr/lib/python3.9/site-packages/pylorax/imgutils.py", line 530, in mkhfsimg   
    mkfsimage("hfsplus", rootdir, outfile, size, mountargs=mountargs,                  
  File "/usr/lib/python3.9/site-packages/pylorax/imgutils.py", line 489, in mkfsimage  
    with LoopDev(outfile, size) as loopdev:                                            
  File "/usr/lib/python3.9/site-packages/pylorax/imgutils.py", line 355, in __init__   
    mksparse(self.filename, size)                                                      
  File "/usr/lib/python3.9/site-packages/pylorax/imgutils.py", line 143, in mksparse       with open(outfile, "w") as fobj:       
FileNotFoundError: [Errno 2] No such file or directory: '/var/tmp/imgcreate-qr244tp5/iso-xlh3c83a/images/macboot.img'

Comment 3 Luca Giuzzi 2021-06-09 12:13:09 UTC
I apologize if I keep on adding comments, but now I am looking at mkefiboot (which perhaps is the true culprit).

in /usr/lib/python3.9/site-packages/pylorax/imgutils.py there is the following line

            dev = runcmd_output(["losetup", "--find", "--show", outfile]).strip()

which should call losetup with the proper parameters.
However, even if outfile exists, it does fail. Actually, after I created a file out.img also this fails

from pylorax.executils import runcmd, runcmd_output  
runcmd(["losetup","--find","--show","out.img"]).strip()

while the shell command
losetup --find --show ./out.img

runs correctly

Comment 4 Fedora Update System 2021-06-26 13:06:10 UTC
FEDORA-EPEL-2021-28a6b0ea69 has been submitted as an update to Fedora EPEL 8. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2021-28a6b0ea69

Comment 5 Fedora Update System 2021-06-26 13:06:11 UTC
FEDORA-2021-d997907ec1 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-d997907ec1

Comment 6 Fedora Update System 2021-06-26 13:06:13 UTC
FEDORA-2021-b5ad7217c5 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-b5ad7217c5

Comment 7 Fedora Update System 2021-06-27 01:07:55 UTC
FEDORA-2021-d997907ec1 has been pushed to the Fedora 33 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-d997907ec1`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-d997907ec1

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

Comment 8 Fedora Update System 2021-06-27 01:08:05 UTC
FEDORA-2021-b5ad7217c5 has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-b5ad7217c5`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-b5ad7217c5

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

Comment 9 Fedora Update System 2021-06-27 01:57:49 UTC
FEDORA-EPEL-2021-28a6b0ea69 has been pushed to the Fedora EPEL 8 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2021-28a6b0ea69

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

Comment 10 Fedora Update System 2021-06-27 18:50:43 UTC
FEDORA-EPEL-2021-28a6b0ea69 has been submitted as an update to Fedora EPEL 8. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2021-28a6b0ea69

Comment 11 Fedora Update System 2021-06-27 18:51:02 UTC
FEDORA-2021-d997907ec1 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-d997907ec1

Comment 12 Fedora Update System 2021-06-27 18:52:09 UTC
FEDORA-2021-b5ad7217c5 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-b5ad7217c5

Comment 13 Fedora Update System 2021-06-28 00:31:30 UTC
FEDORA-EPEL-2021-28a6b0ea69 has been pushed to the Fedora EPEL 8 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 14 Fedora Update System 2021-06-28 00:57:33 UTC
FEDORA-2021-d997907ec1 has been pushed to the Fedora 33 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-d997907ec1`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-d997907ec1

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

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

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

Comment 16 Fedora Update System 2021-06-29 01:19:20 UTC
FEDORA-2021-d997907ec1 has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 17 Fedora Update System 2021-06-29 01:29:41 UTC
FEDORA-2021-b5ad7217c5 has been pushed to the Fedora 34 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.