Hi, You also need the shared libs that ls needs, or a static version of it. create /tmp/empty/lib and put there the files it needs (which you can find with ldd(1)).
Didi On Mon, Feb 04, 2002 at 09:34:00PM +0200, Gil Elad wrote: > Hi, > > I'm running Debian woody with 2.4.17. > > For some reason, I'm having trouble getting chroot(8) to work. i.e., > running the following commands as root (taken almost word for word from > the info page): > > # mkdir /tmp/empty > # cp /bin/ls /tmp/empty > # cd /tmp/empty > # ls -l > total 44 > -rwxr-xr-x 1 root root 43916 Feb 4 21:26 ls > # chroot /tmp/empty /ls / > > yields: > chroot: cannot execute /ls: No such file or directory > > executing > # chroot /tmp/empty /bin/ls > > yields the expected: > chroot: cannot execute /bin/ls: No such file or directory > > > What am I doing wrong? Is there a kernel config I should (un)set that I > don't know about? > > Any input will be appreciated > > Gil Elad > > ================================================================= > To unsubscribe, send mail to [EMAIL PROTECTED] with > the word "unsubscribe" in the message body, e.g., run the command > echo unsubscribe | mail [EMAIL PROTECTED] ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]