chroot: failed to run command ‘/bin/zsh’: No such file or directory
# This type of error occurs when chroot doesn't find the zsh binary in
# /bin of the 'new root directory'.
root@root~$: ls
debian-stretch
root@root~$: sudo chroot debian-stretch
chroot: failed to run command ‘/bin/zsh’: No such file or directory
root@root~$: cp /bin/zsh debian-stretch/bin/.
root@root~$: cp /lib/x86_64-linux-gnu/libcap.so.2
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2
libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6
debian-stretch
root@root~$: sudo cp /usr/lib/x86_64-linux-gnu/zsh
debian-stretch/usr/lib/x86_64-linux-gnu -r
# After all of this command u can therefore run the chroot command
# normally