[GH-ISSUE #38] Easy way to generate a bootable ISO (install-media phase 6: El Torito CD) #31

Closed
opened 2026-11-03 22:02:38 -07:00 by gitea-mirror · 1 comment
Owner

Originally created by @raynorpat on GitHub (Oct 6, 2026).
Original GitHub issue: https://github.com/RhapsodiOS/RhapsodiOS/issues/38

Goal. One command that builds a bootable El Torito ISO of the installer, which boots under qemu -cdrom with SeaBIOS and with IA32 UEFI, runs sysinstall, and installs a disk that boots to login: and accepts SSH. This is phase 6 of docs/superpowers/specs/2026-09-22-install-media-design.md and the next piece after phase 5a (sysinstall, merged in 197a04b60; record in docs/build/sysinstall.md).

What exists now. python -m instmedia.collect + python -m instmedia.build make a hard-disk-form image: boot0 MBR, 64 MB ESP, 0xA7 partition with the live UFS root (/System/Installation/Packages holds the apks named by Sets/*.set). It boots as IDE hd1 in the harness.

From the umbrella spec, phase 6 (CD form, 2048-byte sectors).

  • bytes 0–32767: ISO 9660 system area, with a NeXT label (secsize 2048) at byte 7680, the offset DR2 used; the ISO volume descriptors start at byte 32768.
  • BIOS boot image: 2.88 MB floppy emulation holding boot1f, boot2, mach_kernel.rcz, sarld, the boot drivers and an Instance0.table with rootdev=cdrom.
  • UEFI boot image: a FAT ESP image holding BOOTIA32.EFI.
  • dl_front × 2048 onward: the same live-root UFS (fsize 2048), invisible to ISO readers.
  • bootefi must accept 2048-byte BLOCK_IO media (efi_disk.c currently rejects it): read the containing block into a bounce buffer and return the 512-byte sectors.
  • The kernel mounts the CD root through rootdev=cdrom (EIDE/AHCI present ATAPI drives as sd*).
  • New builder pieces: vm/instmedia/iso.py (ISO 9660 and El Torito writer plus the floppy image) and a --form disk|cd switch on build.py.

Known risks (umbrella spec).

  • The ATAPI CD root is untested; docs/drivers/drvEIDE-issues.md records past ATAPI command failures.
  • Capacity: installed tree plus the apks may exceed 650 MB; the fallback is a live.list subset.
  • The media's boot drivers are limited by the sarld node count.

Done when.

  • -cdrom boots under SeaBIOS and under IA32 UEFI to the installer's Welcome screen.
  • An install from it completes.
  • The installed disk boots alone under both firmwares to login: with working SSH.
  • A single documented command produces the ISO.

Needs a brainstorm and plan first (new subsystem: ISO writer, floppy image, bootefi change, ATAPI root).

Originally created by @raynorpat on GitHub (Oct 6, 2026). Original GitHub issue: https://github.com/RhapsodiOS/RhapsodiOS/issues/38 **Goal.** One command that builds a bootable El Torito ISO of the installer, which boots under `qemu -cdrom` with SeaBIOS and with IA32 UEFI, runs `sysinstall`, and installs a disk that boots to `login:` and accepts SSH. This is phase 6 of `docs/superpowers/specs/2026-09-22-install-media-design.md` and the next piece after phase 5a (`sysinstall`, merged in 197a04b60; record in `docs/build/sysinstall.md`). **What exists now.** `python -m instmedia.collect` + `python -m instmedia.build` make a hard-disk-form image: `boot0` MBR, 64 MB ESP, `0xA7` partition with the live UFS root (`/System/Installation/Packages` holds the apks named by `Sets/*.set`). It boots as IDE `hd1` in the harness. **From the umbrella spec, phase 6 (CD form, 2048-byte sectors).** - bytes 0–32767: ISO 9660 system area, with a NeXT label (`secsize` 2048) at byte 7680, the offset DR2 used; the ISO volume descriptors start at byte 32768. - BIOS boot image: 2.88 MB floppy emulation holding `boot1f`, `boot2`, `mach_kernel.rcz`, `sarld`, the boot drivers and an `Instance0.table` with `rootdev=cdrom`. - UEFI boot image: a FAT ESP image holding `BOOTIA32.EFI`. - `dl_front` × 2048 onward: the same live-root UFS (fsize 2048), invisible to ISO readers. - `bootefi` must accept 2048-byte BLOCK_IO media (`efi_disk.c` currently rejects it): read the containing block into a bounce buffer and return the 512-byte sectors. - The kernel mounts the CD root through `rootdev=cdrom` (EIDE/AHCI present ATAPI drives as `sd*`). - New builder pieces: `vm/instmedia/iso.py` (ISO 9660 and El Torito writer plus the floppy image) and a `--form disk|cd` switch on `build.py`. **Known risks (umbrella spec).** - The ATAPI CD root is untested; `docs/drivers/drvEIDE-issues.md` records past ATAPI command failures. - Capacity: installed tree plus the apks may exceed 650 MB; the fallback is a `live.list` subset. - The media's boot drivers are limited by the `sarld` node count. **Done when.** - `-cdrom` boots under SeaBIOS and under IA32 UEFI to the installer's Welcome screen. - An install from it completes. - The installed disk boots alone under both firmwares to `login:` with working SSH. - A single documented command produces the ISO. Needs a brainstorm and plan first (new subsystem: ISO writer, floppy image, `bootefi` change, ATAPI root).
Author
Owner

@raynorpat commented on GitHub (Oct 7, 2026):

Done on master (c6c392a00). cd vm && python -m instmedia.build --repo DIR --efi ../src/bootefi-1/BUILD/BOOTIA32.EFI --form cd --out installer.iso builds a ~295 MB El Torito ISO (hard-disk emulation for BIOS, the ESP image for UEFI, the live root on the CD with rootdev=cdrom). It boots from IDE and AHCI CD-ROMs under SeaBIOS and IA32 UEFI to sysinstall, installs complete, and the installed disks boot alone to login: with SSH. Floppy and DOS boot code, including boot0's partition menu, is removed. Record: docs/build/instmedia-cd.md.

<!-- gh-comment-id:6034678074 --> @raynorpat commented on GitHub (Oct 7, 2026): Done on master (c6c392a00). `cd vm && python -m instmedia.build --repo DIR --efi ../src/bootefi-1/BUILD/BOOTIA32.EFI --form cd --out installer.iso` builds a ~295 MB El Torito ISO (hard-disk emulation for BIOS, the ESP image for UEFI, the live root on the CD with rootdev=cdrom). It boots from IDE and AHCI CD-ROMs under SeaBIOS and IA32 UEFI to sysinstall, installs complete, and the installed disks boot alone to login: with SSH. Floppy and DOS boot code, including boot0's partition menu, is removed. Record: docs/build/instmedia-cd.md.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github-starred/RhapsodiOS#31
No description provided.