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

BIOS Boot Support for Raw Images #3061

Open
dnugmanov opened this issue Dec 7, 2024 · 3 comments
Open

BIOS Boot Support for Raw Images #3061

dnugmanov opened this issue Dec 7, 2024 · 3 comments
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

@dnugmanov
Copy link

dnugmanov commented Dec 7, 2024

Issue Description

When attempting to deploy Kairos on Akamai Cloud (formerly Linode), the platform has specific requirements for bootable images:

  • Must be a gzip-compressed RAW image
  • Must have either:
    • DOS/MBR partition table, or
    • GPT partition table with legacy boot support
  • UEFI booting is not supported

UEFI Raw Image Approach

Using auroraboot with --set "disk.raw=true" produces a GPT-partitioned image that appears to support BIOS booting (contains partition type EF02). However:

  1. The BIOS boot partition (EF02) is completely empty (all 2mbs are zeroes)
  2. The image fails to boot in BIOS mode

MBR Approach

Attempted to use undocumented option --set "disk.mbr=true" in auroraboot, but the build process stalls at:
2024-12-07T10:48:03Z INF Generating MBR disk '/tmp/auroraboot/build/disk.raw' from '/tmp/auroraboot/build/kairos.iso'

  1. Legacy Boot Support with GPT

    • Are there plans to support GPT partition tables with legacy boot (EF02 partition)?
    • If yes, will this include proper GRUB installation into the BIOS boot partition?
  2. MBR Image Generation

    • What is the current status of the disk.mbr=true option? Is this feature ready for use, given it's currently undocumented?
    • Can you help with a clue why the image generation got stuck at the ISO to raw conversion stage (qemu is just running vm and not stops it for saving disk )
@dnugmanov dnugmanov 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 Dec 7, 2024
@Itxaka
Copy link
Member

Itxaka commented Dec 9, 2024

IIRC:

  • Out GPT images have legacy MBR support
  • disk.mbr=true does something very special as we dont have a process to generate those images and its, it boots an iso with qemu and runs the install, then uses the disk from that qemu vm as the output.
  • I dont think we tests this raw images geneartion anywhere so their status is unknown at the moment

A workaround could be to get a normal iso and qemu, run the install in the VM and get the resulting VM disk. That should contain a valid GPT-Legacy raw image that should be valid for Akamai once gzipped.

@dnugmanov
Copy link
Author

Out GPT images have legacy MBR support

It looks like this AuroraBoot script is adapted from the Elemental Toolkit script. Interesting that the original has a TODO for legacy boot support—wonder if that's something carried over here.

@dnugmanov
Copy link
Author

About MBR boot from @mudler:

when disk.mbr is set it will use QEMU to generate a raw image, and for that it needs a cloud config which has the following stanza:

# Automated install block
install:
  # Device for automated installs
  device: "auto"
  # Reboot after installation
  reboot: false
  # Power off after installation
  poweroff: true
  # Set to true to enable automated installations
  auto: true

My issue with being stuck on ‘Generating MBR disk’ was because I didn’t have poweroff: true after the install. The VM never stopped and didn’t return control to AuroraBoot.

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
Status: No status
Development

No branches or pull requests

2 participants