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

1633 use enki as lib for build iso #68

Merged
merged 13 commits into from
Oct 22, 2024

Conversation

jimmykarily
Copy link
Contributor

No description provided.

until I figure out where they are set in enki any how

Signed-off-by: Dimitris Karakasilis <[email protected]>
Signed-off-by: Dimitris Karakasilis <[email protected]>
@jimmykarily jimmykarily self-assigned this Oct 21, 2024
Signed-off-by: Dimitris Karakasilis <[email protected]>
Signed-off-by: Dimitris Karakasilis <[email protected]>
Signed-off-by: Dimitris Karakasilis <[email protected]>
Signed-off-by: Dimitris Karakasilis <[email protected]>
@jimmykarily jimmykarily force-pushed the 1633-use-enki-as-lib-for-build-iso branch from 244299b to 82817b4 Compare October 22, 2024 07:21
Signed-off-by: Dimitris Karakasilis <[email protected]>
Signed-off-by: Dimitris Karakasilis <[email protected]>
@jimmykarily jimmykarily marked this pull request as ready for review October 22, 2024 07:30
Signed-off-by: Dimitris Karakasilis <[email protected]>
@Itxaka
Copy link
Member

Itxaka commented Oct 22, 2024

I had a quick look, the /grub2 location provides grub BIOS files for arm and x86 hybrid boot.

hybrid boot means we build isos that can boot both on BIOS and EFI.

for this we need syslinux and grub2 files for x86_64, arm64 AND i386

arm64 does not have BIOS boot but enki iso builder does not do any distinction and when building isos it tries to build hybrid issues no matter the arch.

i386 files are needed to build the eltorito.img which is used for the hybrid boot

Things that we can do down the road

  • make isobuilder aware that for arm64 we dont build hybrid isos, so the call to xorriso needs to be different (this means no grub2 arm64 packages needed)
  • try to get the grub2 artifacts from the rootfs (this mneans no grub2-x86_64 packages needed, they are already shipped in the rootfs)
  • move the livecd configs into the iso builder directly and allow overriding them when building.

The only problem with this is that we still need the eltorito.img and the boot_hybrid.img files in order to build hybrid isos. Not all distros provide those, nor all distros allows you to install grub2-i386 and generate one yourself!

to build a eltorito.img:

  • install grub2-i386
  • generate a grub core.img with 386 platform and some modules bundled:
grub2-mkimage -O i386-pc -o core.img -p /boot/grub2 -d /usr/share/grub2/i386-pc ext2 iso9660 linux echo configfile search_label search_fs_file search search_fs_uuid ls normal gzio png fat gettext font minicmd gfxterm gfxmenu all_video xfs btrfs lvm luks gcry_rijndael gcry_sha256 gcry_sha512 crypto cryptodisk test true loadenv part_gpt part_msdos biosdisk vga vbe chain boot
  • merge the resulting core.img with the cdboot.img(shipped by grub2-i386) cat cdboot.img core.img > eltorito.img

the when building the iso you pass the following to xorisso for the BIOS part:

-boot_image grub bin_path=eltorito.img -boot_image grub grub2_mbr=/boot_hybrid.img

So maybe there is an alternative approach to this with xorriso as well? Maybe we only need the eltorito.img and we can ship a prebuilt one with auroraboot already bundled with the binary? Maybe xorriso already has some built in stuff? Maybe we should deprecate BIOS booting already (it been 20 years of EFI come on)

@jimmykarily jimmykarily merged commit 3d4d410 into master Oct 22, 2024
3 of 4 checks passed
@jimmykarily jimmykarily deleted the 1633-use-enki-as-lib-for-build-iso branch October 22, 2024 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants