Created
March 21, 2020 21:31
-
-
Save gsauthof/7c0b65ffe4da38b83c8c61d79b71c6d7 to your computer and use it in GitHub Desktop.
Chroot Example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# assuming /mnt/root/{root,home} are mounts of anothers system root+home filesystems | |
cd /mnt/root/root | |
mount --bind /proc proc | |
mount --bind /sys sys | |
mount --bind /dev dev | |
cp /etc/resolv.conf etc/ | |
cd /mnt/root | |
mount --bind home root/home | |
chroot root /usr/bin/zsh | |
# leave via Ctrl+D (EOT), exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment