On Mon, 4 Feb 2002, 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

Yes, this should be the correct syntax

>
> 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?

ls needs a number of other files in order to work:

run 'ldd /bin/ls' to get a list.

I believe that 'ld-*' needs to be in /bin, (that is: /tmp/empty/bin), as
its path is hardwierd.

-- 
Tzafrir Cohen                        /"\
mailto:[EMAIL PROTECTED]        \ /  ASCII Ribbon Campaign
Taub 229, 972-4-829-3942,             X   Against  HTML  Mail
http://www.technion.ac.il/~tzafrir   / \


=================================================================
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]

Reply via email to