[ale] chroot problems

Joe Sechman joe.sechman at gmail.com
Mon Nov 29 10:58:05 EST 2004


Did you find the required libraries and include them in a 'lib'
directory in your chroot env?
# ldd /bin/bash
        libtermcap.so.2 => /lib/libtermcap.so.2 (0x0062f000)
        libdl.so.2 => /lib/libdl.so.2 (0x00a06000)
        libc.so.6 => /lib/tls/libc.so.6 (0x0016f000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00408000)

# mkdir /virtual/1/lib
# cp <lib files from above preserving directory heirarchy> /virtual/1/lib/

Just a thought....

On Mon, 29 Nov 2004 10:40:32 -0500, Eric Anderson <eric at afaik.us> wrote:
> I am having some problems with chroot. To isolate my problem I have
> reduced it down to the following command lines.
> 
>    # chroot /virtual/1/ /bin/bash
> chroot: cannot run command `/bin/bash': No such file or directory
>    # cd /virtual/1/
> 1 # ls -la bin/bash
> -rwxr-xr-x  8 root root 693116 Feb 21  2004 bin/bash
> 
> So my goal is to chroot into the /virtual/1/ directory and run /bin/bash
> once I have chrooted. It gives me back an error that /bin/bash cannot be
> found. But if I cd to /virtual/1/ and then ls bin/bash it is clearly
> there. And bash is just an example. Just about any executable I have
> tried does not seem to work. I know I am missing something extremely
> obvious but it is not coming to me. Any suggestions?
> 
> Eric
> 
> 
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale
> 
> 
> 


-- 
Joe Sechman
Unix / Linux Systems Administrator
RLU: #367555
http://counter.li.org



More information about the Ale mailing list