Skip to content

kexec-iso-init: improve hybrid ISO detection and boot param handling#2083

Draft
tlaurion wants to merge 3 commits intolinuxboot:masterfrom
tlaurion:iso-boot-detection
Draft

kexec-iso-init: improve hybrid ISO detection and boot param handling#2083
tlaurion wants to merge 3 commits intolinuxboot:masterfrom
tlaurion:iso-boot-detection

Conversation

@tlaurion
Copy link
Copy Markdown
Collaborator

@tlaurion tlaurion commented Apr 12, 2026

Summary

  • Add check_hybrid_iso() using MBR signature at offset 510 (0x55AA)
  • Add detect_iso_boot_method() to extract boot params from initrd via strings
  • Add inspect_iso_boot_config() to extract boot params from GRUB configs
  • Add resolve_grub_vars() to substitute GRUB variables like ${iso_path} with actual ISO path
  • Simplify header to document Dracut vs Anaconda boot methods
  • Use DEBUG level for NOTE/WARN/STATUS spam per logging.md
  • Change terminal prompts to [Y,d] style with Enter defaulting to yes
  • Remove Anaconda blocking - let user attempt boot (Qubes R4.3 works)
  • Keep combined boot params approach (let ISO initrd pick what it needs)

Testing

  • Tested with Qubes R4.3 on Q35 QEMU (works)
  • Fixed Kicksecure GRUB variable resolution issue

Related

Copilot AI review requested due to automatic review settings April 12, 2026 16:59
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds ISO-on-USB boot compatibility detection and improved UX/logging around kexec-based booting, including documentation of supported ISO behaviors.

Changes:

  • Add initrd/GRUB scanning and USB filesystem compatibility checks for ISO-file boot, with user warnings on likely failures.
  • Improve boot option selection UX and display of applied kernel parameter add/remove operations.
  • Log the final kernel command line in debug output and document the ISO boot flow + compatibility matrix.

Reviewed changes

Copilot reviewed 1 out of 4 changed files in this pull request and generated no comments.

File Description
initrd/bin/kexec-select-boot.sh Simplifies menu display and improves confirmation/add/remove parameter UX.
initrd/bin/kexec-iso-init.sh Adds ISO boot-method detection, USB FS probing, initrd capability heuristics, and broader distro parameter support.
initrd/bin/kexec-boot.sh Refactors option parsing and adds debug logging of the final kernel cmdline.
doc/boot-process.md Documents “Stage 2b” ISO-on-USB boot flow and known compatibility results.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tlaurion tlaurion force-pushed the iso-boot-detection branch from b4b1383 to cb30626 Compare April 12, 2026 17:04
@tlaurion tlaurion changed the title initrd: add ISO boot detection, USB filesystem validation, and distro kernel params initrd: add ISO boot detection and USB filesystem validation Apr 12, 2026
@tlaurion tlaurion force-pushed the iso-boot-detection branch 2 times, most recently from d810864 to d5b268c Compare April 12, 2026 19:43
@tlaurion tlaurion marked this pull request as draft April 12, 2026 19:43
@tlaurion tlaurion force-pushed the iso-boot-detection branch from 29fb8da to ab2fc17 Compare April 12, 2026 20:14
@tlaurion tlaurion closed this Apr 13, 2026
@tlaurion tlaurion force-pushed the iso-boot-detection branch from ab2fc17 to 8f78967 Compare April 13, 2026 00:32
- Add check_hybrid_iso() using MBR signature at offset 510 (0x55AA)
- Add detect_iso_boot_method() to extract boot params from initrd via strings
- Add inspect_iso_boot_config() to extract boot params from GRUB configs
- Simplify header to document Dracut vs Anaconda boot methods
- Use DEBUG level for NOTE/WARN/STATUS spam per logging.md
- Change terminal prompts to [Y,d] style with Enter defaulting to yes
- Remove Anaconda blocking - let user attempt boot (Qubes R4.3 works)
- Keep combined boot params approach (let ISO initrd pick what it needs)

Tested with Qubes R4.3 on Q35 QEMU (works).

Ref: linuxboot#2083, linuxboot#2008
@tlaurion tlaurion changed the title initrd: add ISO boot detection and USB filesystem validation kexec-iso-init: improve hybrid ISO detection and boot param handling Apr 13, 2026
@tlaurion tlaurion reopened this Apr 13, 2026
tlaurion added a commit to tlaurion/heads that referenced this pull request Apr 13, 2026
Add resolve_grub_vars() to substitute GRUB variables like ${iso_path}
and ${isofile} with the actual ISO path when extracting boot params
from GRUB configs.

Fixes boot failure where iso-scan/filename=${iso_path} wasn't being
resolved to the actual ISO path.

Ref: linuxboot#2083
Add resolve_grub_vars() to substitute GRUB variables like ${iso_path}
and ${isofile} with the actual ISO path when extracting boot params
from GRUB configs.

Fixes boot failure where iso-scan/filename=${iso_path} wasn't being
resolved to the actual ISO path.

Ref: linuxboot#2083
@tlaurion tlaurion force-pushed the iso-boot-detection branch from 90f3faf to 16b9805 Compare April 13, 2026 00:44
Add TRACE/DEBUG to understand how boot parameters flow through
kexec-boot.sh, especially the cmdline and cmdadd parameters.

Ref: linuxboot#2083
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants