# What a Firecracker guest needs: kernel image, root filesystem, boot arguments and devices

> A walkthrough of the pieces a Firecracker microVM boots from: vmlinux or bzImage, guest kernel configs and the support policy, an ext4 rootfs with an init, boot arguments, drives, and the optional vsock, entropy and balloon devices.

A walkthrough of the pieces a Firecracker microVM boots from: vmlinux or bzImage, guest kernel configs and the support policy, an ext4 rootfs with an init, boot arguments, drives, and the optional vsock, entropy and balloon devices.

November 27, 2026 · 4 min read · The Sandscale team

A container starts from an image and shares the host’s kernel. A Firecracker microVM starts from two files you provide, a kernel and a root filesystem, plus a short list of devices you attach through its API. Knowing what goes into each is useful whether you are building your own microVM platform or just want to understand what “its own kernel” means for a sandbox.

This post follows Firecracker’s [rootfs and kernel setup guide](https://github.com/firecracker-microvm/firecracker/blob/main/docs/rootfs-and-kernel-setup.md), [kernel support policy](https://github.com/firecracker-microvm/firecracker/blob/main/docs/kernel-policy.md), [getting started guide](https://github.com/firecracker-microvm/firecracker/blob/main/docs/getting-started.md) and device docs, as of November 2026.

## The kernel image

Firecracker loads the guest kernel image you point it at. On x86_64 it accepts an uncompressed ELF `vmlinux` or a `bzImage` and detects which one it was given. On aarch64 it takes a PE-format `Image`.

The guide recommends `vmlinux` on x86_64. A `bzImage` is compressed and the guest decompresses it at boot, which costs extra work and extra guest memory, and so host memory. The exception is Firecracker’s Nitro Sandbox mode, which boots through UEFI and needs an EFI-stub `bzImage`.

To build one: take the Linux source, check out a version, start from Firecracker’s recommended guest config in `resources/guest_configs/` as `.config`, and run `make vmlinux` (x86_64) or `make Image` (aarch64). Firecracker’s repo also has a recipe that builds the kernels its CI uses.

### Which kernel versions

The [kernel support policy](https://github.com/firecracker-microvm/firecracker/blob/main/docs/kernel-policy.md) lists validated host and guest kernels. As of November 2026 its guest table lists v5.10, v6.1 and v6.18 for 4K pages, each with a minimum end-of-support date, and the policy is that a kernel version is supported for at least two years after it is added. Other versions may work but are not tested. The microVM kernels Amazon Linux builds from these configs are published in the Amazon Linux kernel repository under `microvm-kernel-*` tags.

### Kernel options that matter for devices

Each optional device needs its driver in the guest kernel:

- **vsock**: `CONFIG_VIRTIO_VSOCKETS` in the guest (and `CONFIG_VHOST_VSOCK` on the host).
- **Entropy**: `CONFIG_HW_RANDOM_VIRTIO`, which depends on `CONFIG_HW_RANDOM` and `CONFIG_VIRTIO`.
- **Root filesystem**: whatever filesystem the rootfs uses must be built in, so the kernel can mount it at boot.

A missing option shows up as a device that is simply absent in the guest, not as an error from Firecracker.

## The root filesystem

The guide’s definition is short: a rootfs image is a filesystem image that hosts at least an init system. The final step of Linux boot runs `/sbin/init` and expects it never to exit.

The manual recipe in the guide:

1. Create a file of the size you need and format it: `dd` then `mkfs.ext4`.
2. Mount it.
3. Populate it. The guide uses an Alpine container with the image bind-mounted, installs OpenRC and `util-linux`, sets up a login on the serial console (`ttyS0`), enables the `devfs`, `procfs` and `sysfs` services at boot, and copies `/bin`, `/etc`, `/lib`, `/root`, `/sbin` and `/usr` across, then creates empty `/dev`, `/proc`, `/run`, `/sys` and `/var`.
4. Unmount.

The repo also has a recipe for the minimized Ubuntu 22.04 image its CI uses, and the guide covers building a FreeBSD kernel and rootfs.

For a sandbox, two choices follow from this:

- **The init is yours.** A full init system is convenient, but a sandbox guest often runs a single small agent as init that waits for commands. The less that starts, the less there is to attack.
- **Read-only root, writable scratch.** Firecracker drives have an `is_read_only` flag. A read-only root drive shared by many VMs plus a writable drive per VM keeps the base image clean and makes “throw it away” mean exactly that.

## Boot arguments

The getting started guide configures the boot source with a kernel path and boot arguments; its example is:

```text
console=ttyS0 reboot=k panic=1
```

That sends the console to the serial port, sets how the kernel reboots, and has it reboot shortly after a panic instead of hanging. Firecracker’s design doc says the partial keyboard controller exists so the guest can signal that it wants a reset, which the host side then handles. For production, the [host setup guide](https://github.com/firecracker-microvm/firecracker/blob/main/docs/prod-host-setup.md) recommends not enabling the serial console and suggests `8250.nr_uarts=0` to disable it in the guest, while warning that a guest can turn it back on, so the host must bound that output regardless. See the [host checklist](https://sandscale.dev/blog/firecracker-production-host-checklist).

## Devices

Firecracker’s machine model is small on purpose. Guests see VirtIO network and block devices, a serial console, and part of a keyboard controller used only so the guest can ask for a reset, plus the interrupt controllers and timer KVM provides. You attach, through the API before boot:

- **Drives** (`PUT /drives/{id}`), backed by files on the host and pre-formatted with a filesystem the guest kernel supports. One is marked `is_root_device`.
- **Network interfaces** (`PUT /network-interfaces/{id}`), each backed by a host TAP device. Leave them out and the guest has no network device at all.
- **vsock** (`PUT /vsock`), a host-guest channel over Unix sockets; see [Firecracker vsock](https://sandscale.dev/blog/firecracker-vsock-explained).
- **Entropy** (`PUT /entropy`), a `virtio-rng` device that gives the guest random bytes from the host through `aws-lc-rs`, with an optional rate limiter.
- **Balloon** (`PUT /balloon`), for reclaiming memory from a cooperative guest; see [the balloon device](https://sandscale.dev/blog/firecracker-balloon-device-explained).
- **MMDS** (`PUT /mmds/config`), a metadata store reached over a network interface; see [MMDS](https://sandscale.dev/blog/firecracker-mmds-explained).

Rate limiters can be attached to drives, interfaces and the entropy device; see [rate limiters](https://sandscale.dev/blog/firecracker-rate-limiters-explained). Then `InstanceStart` boots the VM.

## Why “its own kernel” matters

Every one of these pieces is per VM. The guest’s kernel handles its own system calls, so a kernel bug the guest triggers is a bug in the guest’s kernel, not the host’s. The host’s exposure is the small device model above, Firecracker’s process, which runs under seccomp filters and usually the jailer, and KVM. [KVM basics for application engineers](https://sandscale.dev/blog/kvm-basics-for-application-engineers) goes through that boundary.

## Where Sandscale fits

On Sandscale, each sandbox is its own Firecracker microVM with its own kernel, and you do not build kernels or root filesystems. You pick a template, such as the built-in `builtin:node`, `builtin:python` or `builtin:go`, or start from a snapshot of a sandbox’s `/workspace`. The [templates page](https://sandscale.dev/templates) and the [snapshots guide](https://sandscale.dev/docs/guides/snapshots) cover both.

**On this page**

1. The kernel image
2. The root filesystem
3. Boot arguments
4. Devices
5. Why “its own kernel” matters
6. Where Sandscale fits

**Run your agents in a box of their own**

Each sandbox is a Firecracker microVM. Free includes 100 awake vCPU-hours a month.

[Start free](https://cloud.sandscale.dev/auth/signup)

## Keep reading

- [November 27, 2026 · **A LlamaIndex.TS data agent that runs its Python in a Sandscale sandbox** · Use LlamaIndex.TS's agent workflow with tools that write and run Python in a Firecracker sandbox, built per sandbox so a run can only reach its own box. Upload data files, answer with the numbers, clean up. Type-checked.](https://sandscale.dev/blog/llamaindex-ts-agent-with-sandscale)
- [November 27, 2026 · **Adding the Sandscale MCP server to Codex: config.toml, OAuth login and approval modes** · Configure the remote or local Sandscale MCP server in OpenAI Codex, sign in with codex mcp login, and use enabled_tools, approval modes and tool timeouts to match what each tool does.](https://sandscale.dev/blog/sandscale-mcp-server-in-codex)

---
Source: https://sandscale.dev/blog/firecracker-guest-kernel-and-rootfs
