Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make ISO images hybrid and with GPT to improve compatability #2547

Closed
Tracked by #1792
antongisli opened this issue May 8, 2024 · 2 comments · Fixed by kairos-io/enki#107
Closed
Tracked by #1792

Make ISO images hybrid and with GPT to improve compatability #2547

antongisli opened this issue May 8, 2024 · 2 comments · Fixed by kairos-io/enki#107
Assignees
Labels
bug Something isn't working triage Add this label to issues that should be triaged and prioretized in the next planning call unconfirmed

Comments

@antongisli
Copy link
Contributor

Kairos version:
3.0.9

CPU architecture, OS, and Version:
Dell optiplex 7050 (several years old)

Describe the bug
With trusted boot, does not recognize bootable USB stick (UEFI)

To Reproduce
just create TB install iso and try to boot off it, it will not be shown as bootable

Expected behavior
that the stick shows as a bootable device

Additional context
I managed to get it to work by modifying the ISO build command here:

RUN xorriso -as mkisofs -V 'UKI_ISO_INSTALL' -e efiboot.img -no-emul-boot -o $ISO_NAME.iso /tmp/efi

I changed it to:
xorriso -as mkisofs -V 'UKI_ISO_INSTALL' -e efiboot.img -no-emul-boot -isohybrid-gpt-basdat -isohybrid-mbr /usr/lib/ISOLINUX/isohdppx.bin -o test.iso /mnt/original_iso

Before running the above, I had to mount a generated ISO into /mnt/original_iso, and install isolinux + syslinux-common to get /usr/lib/ISOLINUX/isohdppx.bin:
sudo apt-get install isolinux syslinux-common

After this, the device shows as bootable on my dell.

@antongisli antongisli added bug Something isn't working triage Add this label to issues that should be triaged and prioretized in the next planning call unconfirmed labels May 8, 2024
@ci-robbot
Copy link
Collaborator

Hello antongisli, I'm a bot assisting with issue triage in the Kairos repository. Your issue has been labeled 'triage' to indicate that it has been reviewed and meets the basic requirements for further examination. Thank you for providing a clear description of the issue and the steps to reproduce it. It appears that you have already found a solution by modifying the ISO build command. As this is not a bug in the code itself, but rather a specific use case, it might be more appropriate to consider it as a feature request or customization rather than a bug report. Please feel free to open a new discussion or pull request if you'd like to propose changes to the ISO build process. Thank you for helping improve the Kairos project, and don't hesitate to ask if you have any further questions. I am an experiment of @mudler and @jimmykarily.

@mudler mudler mentioned this issue May 9, 2024
33 tasks
@Itxaka
Copy link
Member

Itxaka commented May 9, 2024

-isohybrid-gpt-basdat causes the creation of a partition of type 0xef in the MBR partition table. It also causes production of a GPT which stays invalid, nevertheless, because of the existence of the MBR partition. The MBR partition marks the -e boot image as EFI System Partition. This is needed for booting via EFI from USB stick.

Makes sense to me.

The ISO 9660 filesystem is then supposed to boot from optical media and from disk storage via BIOS and via UEFI. Unfortunately, there seem to be some UEFI implementations that boot from MBR and [fail to boot if GPT is present](http://wiki.osdev.org/Broken_UEFI_implementations#GIGABYTE_Hybrid_EFI). Therefore, some Linux distributions have special ISO images for amd64 containing only BIOS equipment.

xorriso can add the GPT equipment by its "-isohybrid-gpt-basdat" option:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Add this label to issues that should be triaged and prioretized in the next planning call unconfirmed
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants