I try to setup a most minimal chrooted environment using busybox.
I created a directory 'testRoot' and copied 'busybox' into it.
from this directory I execute:
sudo chroot ./ /busybox sh
now I have an interactive environment. commands like 'ls' and 'pwd' work:
BusyBox v1.27.2 (Ubuntu 1:1.27.2-2ubuntu3.2) built-in shell (ash)
Enter 'help' for a list of built-in commands.
/ # ls
busybox testje
/ # pwd
/
/ #
some others (like 'vi') doesn't:
/ # vi
sh: vi: not found
on the otherhand starting vi outside the interactive shell works:
sudo chroot ./ /busybox vi
and outside the chrooted environment in the interactive shell there is also no problem:
eldendo@eldendo-WIM2140:~/testRoot$ busybox sh
BusyBox v1.27.2 (Ubuntu 1:1.27.2-2ubuntu3.2) built-in shell (ash)
Enter 'help' for a list of built-in commands.
~/testRoot $ vi (--- vi starts up here ---)
~/testRoot $
Any idea's ?
0 Answers