entering the chroot environment ,ch6

Erik Postma epostma at nl.tue.win
Tue Nov 11 05:09:46 PST 2003


On Tue, 11 Nov 2003 00:53:46 -0200, michael <michael8110 at terra.com.br>
wrote:
> thank you for your answers to my previous question about the sanity
> check in sec 'locking in glibc',after i did su - lfs it worked/
>  now i have another problem,the chroot $LFS  (with $LFS=/mnt/lfs)
>  returns 
> /bin/bash : no such file or directory,which is quite reasonable because
> the command should have been chroot /mnt/lfs/tools since that's where  a
> /bin/bash is to be seen ,but then i get /bin/bash permission denied 
> (i'm as root) .Boy,is this tough!

The book says:

chroot $LFS /tools/bin/env -i \
    HOME=/root TERM=$TERM PS1='\u:\w\$ ' \
    PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
    /tools/bin/bash --login

so in the /mnt/lfs chroot it refers to /tools/bin/bash. That is the file
which you'd refer to from outside chroot as /mnt/lfs/tools/bin/bash. The
permission denied message seems to indicate a more serious issue. Is your
LFS-partition mounted noexec?

-- 
Erik Postma (Email: reverse the order of nl, tue and win.)



More information about the lfs-support mailing list