chroot error

Floyd Hagen flohagen at
Sat Mar 27 23:45:10 PST 2004

I stepped away from building 5.0 for a while after I finished chapter 5.
I'd like to finish it up, but I'm having problems with chroot.

The sanity check seems to be ok:

-bash-2.05b$ echo 'main(){}' > dummy.c
-bash-2.05b$ gcc dummy.c
-bash-2.05b$ readelf -l a.out | grep ': /tools'
      [Requesting program interpreter: /tools/lib/]

but chroot fails:
[root at desktop sources]# 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
chroot: cannot run command `/tools/bin/env': No such file or directory
[root at desktop sources]# 

I saw the FAQ and tried this:
[root at desktop bin]# readelf -l $LFS/tools/bin/env | grep interpreter
      [Requesting program interpreter: /lib/]
[root at desktop bin]# 

Why is there a diffrence in the sanity check and the readelf?


More information about the lfs-support mailing list