Skip to content

Instantly share code, notes, and snippets.

Chrooting RPi partition using systemd-nspawn

By chrooting a partition, you may issue any user command on a mounted partition as if you had booted on this partition. systemd-nspawn is a systemd-specific command providing better isolation than the traditional chroot command (see the archlinux wiki for a more in-depth description).

Prerequisites

pkcon install qemu qemu-user-static