Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Baguette ephemeral root

Set baguette.ephemeralRoot.enable to true to use a read-only base and a separate writable state disk. Root changes use RAM. Leave this option disabled for a writable root and in-place NixOS upgrades.

Build the image after you enable this option:

nix build .#baguette-zimage

The baguette-zimage output contains baguette_rootfs.img.zst and baguette_state.img.zst. The base uses seekable zstd with 128 KiB frames. ChromeOS reads it directly. Copy both compressed files to a baguette folder in ChromeOS Downloads. Create a new VM with the required state disk size:

vmc create --vm-type BAGUETTE --size 15G \
  --source \
    /home/chronos/user/MyFiles/Downloads/baguette/baguette_state.img.zst \
  baguette
vmc start --vm-type BAGUETTE \
  --rootfs \
    /home/chronos/user/MyFiles/Downloads/baguette/baguette_rootfs.img.zst \
  baguette

Important: Use the full start command after each VM stop or ChromeOS login.

Limitations

  1. Do not launch the VM from the app launcher, which does not retain --rootfs; use it only after the VM starts.
  2. Guest root can make the state disk bootable. A start without --rootfs can then run code from that disk.
  3. Keep the base image outside folders shared with Linux.
  4. Back up the base image with the stopped state disk.
  5. Do not use ChromeOS disk resizing with this layout: ChromeOS assumes its state disk is /dev/vdb; this layout uses /dev/vdc. Instead, export the state disk, then re-import with the new size.