Builds on v0.5.9's El Torito detection to make the boot menu honest and clean, and confirms generic El Torito ISOs (ESXi/VMvisor installers, BSDs, firmware tools) boot via iPXE sanboot with no special-casing: - generate_boot_entries: an Unknown-family ISO now produces a sanboot entry only when it's actually bootable — it carries an El Torito catalog, OR it's a remote-share ISO we couldn't introspect (rev 0, assumed bootable). A locally-introspected ISO with no boot catalog (a data/appliance image like a VMware vCenter Server Appliance bundle) yields NO entry, so it stays out of the iPXE menu instead of offering a pick that always fails. ESXi installers (Unknown family + El Torito) surface under the installer menu and sanboot the raw ISO — backed by HTTP range reads, so size is moot. - Dropped the stale "(SAN boot — may fail for >1GiB ISOs)" disclaimer and refreshed the SanBootIso doc: sanboot is the primary path for Windows and any El Torito image, and HTTP range reads remove the size limit. - WebUI: renamed the dashboard panel "Images that won't boot with current settings" -> "Non-bootable images" (there's no setting that would make a data/appliance ISO boot). - Tests: el_torito catalog detection + boot-entry generation across the ESXi / VCSA / remote-share cases. Full v0.5.0->v0.5.9 compatibility sweep: clippy clean; entire workspace test suite green (core 96, http-api 31+68, iso-store 61, dhcp 1, tftp 6, bin 2); app.js syntax-checked. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
42 lines
1.5 KiB
Rust
42 lines
1.5 KiB
Rust
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
pub struct BootEntry {
|
|
/// Stable id (also the URL slug in generated iPXE scripts).
|
|
pub id: String,
|
|
/// Display label shown in the iPXE boot menu.
|
|
pub title: String,
|
|
pub kind: BootKind,
|
|
}
|
|
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
#[serde(tag = "kind", rename_all = "snake_case")]
|
|
pub enum BootKind {
|
|
/// Linux kernel + initrd chainload. Kernel args carry the distro-specific
|
|
/// pointer back to the ISO contents served over HTTP.
|
|
LinuxKernel {
|
|
kernel_url: String,
|
|
initrd_urls: Vec<String>,
|
|
args: KernelArgs,
|
|
},
|
|
/// Windows WinPE boot via wimboot shim. `files` maps in-memory tags to
|
|
/// HTTP URLs the client fetches. See https://ipxe.org/wimboot .
|
|
Wimboot {
|
|
wimboot_url: String,
|
|
files: Vec<(String, String)>,
|
|
},
|
|
/// SAN-boot the raw ISO as an emulated CD (iPXE `sanboot`). The emulated
|
|
/// CD is backed by on-demand HTTP range reads, so ISO size is *not* a
|
|
/// constraint — this is the primary path for Windows (v0.5.8) and for any
|
|
/// El Torito-bootable image we don't special-case: ESXi/VMvisor
|
|
/// installers, BSDs, firmware/diagnostic tools, custom spins (v0.6.0).
|
|
SanBootIso { iso_url: String },
|
|
}
|
|
|
|
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
|
|
pub struct KernelArgs {
|
|
/// Raw kernel command line, already distro-adapted. Do not quote — iPXE
|
|
/// takes a single space-separated command line.
|
|
pub cmdline: String,
|
|
}
|