From 6d6bc2b91b83c0fa6889a48ec0f9c7bed92e8df7 Mon Sep 17 00:00:00 2001 From: rascul Date: Sat, 24 Aug 2019 18:03:48 -0500 Subject: [PATCH] add note for systemd-nspawn and rename target to rootfs in examples because cargo has a target directory --- README.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6685313..0aa0bb4 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,12 @@ putting them and their necessary libs into a target rootfs directory example: ```shell -cargo run -- -v target/ /bin/bash /bin/ls -sudo chroot target /bin/bash +cargo run -- -v rootfs/ /bin/bash /bin/ls + +# chroot +sudo chroot rootfs /bin/bash + +# systemd nspawn +wget -O rootfs/sbin/init https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_amd64 +systemd-nspawn -D rootfs /sbin/init /bin/bash ```