Writing /var/lib/dokuwiki/data/meta/tutorials/systemd-nspawn.meta failed
tutorials:systemd-nspawn
This is an old revision of the document!
Table of Contents
Debian Chroot using systemd-nspawn
Installation
This tutorial is for creating a Debian chroot inside a system that has systemd fully implemented. This tutorial will not work on current Debian stable (jessie).
First we need to install some dependencies:
sudo pacman -S debootstrap
Depending on you distro, you may use aptitude install instead. Now that we have debootstrap, we can have a basic Debian installation.
sudo mkdir -p /var/chroot sudo debootstrap --arch amd64 jessie /var/chroot http://ftp.us.debian.org/debian/
The chroot is now installed and fully functional.
Using for the first time
In order to access the internal Debian, use:
sudo systemd-nspawn -D /var/chroot
This will let you to use Debian as root user. It is a bad idea to use root, so first setup a root password, and then create a user. Once this is done, you chroot is ready for everyday usage.
Usage
tutorials/systemd-nspawn.1475218904.txt.gz · Last modified: 2022/09/20 00:08 (external edit)