build-initrd

Repacks initrd and manages guest binaries for Capsem boot processes.

68|10|Updated Sep 26, 2025
One-click install
npx skills add https://github.com/google/capsem --skill build-initrd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: build-initrd
Source: https://github.com/google/capsem/tree/main/skills/build-initrd
Command: npx skills add https://github.com/google/capsem --skill build-initrd

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Initrd repack and guest-binary management for Capsem during boot setup, enabling fast iteration and deterministic boot behavior by ensuring the correct binaries are loaded from initrd versus rootfs.

Core Features & Use Cases

  • Initrd-first boot: prioritize initrd-bundled binaries (e.g., capsem-init, capsem-net-proxy) over rootfs copies to accelerate boot.
  • Binary lifecycle: coordinate cross-compilation, packaging, and placement of guest binaries when updating the guest toolset.
  • Clear guidance: explain which binaries are injected at boot and which are baked into the rootfs, with a fast feedback loop for testing changes.

Quick Start

Run just run to repack the initrd and update the guest binaries before the next boot.

Frequently Asked Questions about build-initrd

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

FAQPage Schema
How do I repack an initrd to prioritize specific binaries during boot?

To repack an initrd and prioritize binaries, you bundle guest executables like capsem-init directly into the image, overriding rootfs copies to accelerate boot times. This ensures correct binaries load first for deterministic behavior.

What is the best way to manage cross-compiled guest binaries for virtualization boot processes?

Managing cross-compiled guest binaries requires coordinating compilation, packaging, and placement to determine which executables are initrd-bundled versus baked into the rootfs. This lifecycle management enables fast iteration and reliable Capsem boot processes.

Why does my boot process load the wrong binary version from rootfs instead of the initrd?

Boot processes load wrong binary versions when the initrd is not repacked with the latest cross-compiled guest binaries. Bundling updated binaries into the initrd ensures they are prioritized over older rootfs copies during boot setup.

Can I use this approach to override guest binaries at boot time without modifying the rootfs?

Yes, you can override guest binaries at boot time without modifying the rootfs by bundling them into the initrd. This injects specific binaries like capsem-net-proxy during boot setup, maintaining a clean rootfs while enabling fast iteration.

Do I need to manually handle permissions when packaging cross-compiled binaries into an initrd?

No, manual permission handling is not needed when packaging cross-compiled binaries into an initrd. The repack process automatically satisfies permission handling requirements to ensure binaries execute correctly during the Capsem boot process.

When do I need to rebuild an initrd image for Capsem virtualization?

You need to rebuild an initrd image when adding or updating guest binaries, modifying capsem-init, or adjusting which binaries are initrd-bundled versus rootfs-baked. This repacking enables fast iteration and deterministic boot behavior.