linux-direct-boot

Boots Linux kernels directly from bzImage and initramfs without BIOS or UEFI firmware.

Updated Aug 18, 2026
One-click install
npx skills add https://github.com/doctorspider42/entangled-destop --skill linux-direct-boot-doctorspider42
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: linux-direct-boot
Source: https://github.com/doctorspider42/entangled-destop/tree/main/.agents/skills/linux-direct-boot
Command: npx skills add https://github.com/doctorspider42/entangled-destop --skill linux-direct-boot-doctorspider42

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Implementing direct Linux kernel boot in a custom VMM requires correctly assembling boot_params, E820 memory maps, initramfs placement, and serial console plumbing — small mistakes cause silent boot failures that are hard to diagnose. ## Core Features & Use Cases - bzImage loading via linux-loader: Loads the kernel above HIGH_RAM_START using the linux-loader crate instead of hand-rolled ELF/bzImage parsing, returning the entry point and setup header. - Zero page and boot_params construction: Builds boot_params with E820 entries from machine_x86, ACPI RSDP pointer, initrd fields, and the 64-bit entry configuration helpers. - Serial console and boot-marker testing: Wires a 16550 UART at 0x3f8 through KVM_EXIT_IO and validates boots by scanning captured serial output for the VMHOST_GUEST_READY marker or kernel panic strings. - Use Case: When implementing kernel loading for the entangled VMM (backlog EPIC 2, crates linux-boot and machine-x86), load this Skill to get the exact memory layout, cmdline policy, and test strategy before writing code. ## Quick Start Load this Skill before working on kernel loading or the serial console in the linux-boot crate, then follow its boot_params and initramfs placement rules.

Frequently Asked Questions about linux-direct-boot

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I boot a Linux kernel directly without BIOS or UEFI?

Load the bzImage into guest memory with the linux-loader crate, place the initramfs below initrd_addr_max, build a zero page with boot_params and E820 entries, then start vCPU0 in 64-bit mode at the bzImage entry with rsi pointing to the zero page.

How to test that a Linux guest booted successfully in a VMM?

Have the test initramfs print a marker string like VMHOST_GUEST_READY from /init and capture the 16550 serial output. Fail the test on a missing marker, a kernel panic string, or a deadline timeout, attaching the full serial log.

Should I parse bzImage files manually in Rust?

No. Use the linux-loader crate with the bzimage feature, which handles loading and provides configure_64bit_entry helpers. Hand-rolled ELF or bzImage parsing duplicates maintained code and risks subtle header errors.

Why does direct kernel boot fail silently on some kernels?

Common causes are stale bytes in boot_params reserved fields (zero the struct and set sentinel = 0 explicitly) and initramfs placed above initrd_addr_max from the setup header. Always honor the header limit.

What kernel command line should a minimal test VM use?

Use console=ttyS0 earlyprintk=serial panic=1 reboot=k as the base, plus virtio_mmio.device clauses generated per populated slot. The panic and reboot flags make hung or panicked tests fail fast instead of timing out.