I am going through a new build and I am having trouble entering the chroot
after building the toolchain.
---------------------------------------------------
$ sudo ./03-chroot.sh
[sudo] password for rking:
## Entering chroot.
chroot: failed to run command ‘/tools/bin/env’: No such file or directory
----------------------------------------------------
$ cat ./03-chroot.sh
#!/usr/bin/env bash
set -u +h
export LFS="/mnt/lfs"
echo "## Entering chroot."; echo;
if [[ $EUID -ne 0 ]]; then
echo "Must run script as root user. exiting..." 2>&1
exit 1
fi
chroot "$LFS" /tools/bin/env -i \
HOME=/root \
TERM="xterm" \
PS1='\u:\w\$ ' \
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
/tools/bin/bash --login +h
----------------------------------------------------
$ ldd /tools/bin/env
linux-vdso.so.1 (0x00007fff2b9fe000)
libc.so.6 => /tools/lib/libc.so.6 (0x00007f0b26936000)
/tools/lib64/ld-linux-x86-64.so.2 (0x00007f0b26cd9000)
$ ldd /tools/bin/bash
linux-vdso.so.1 (0x00007fffa41fe000)
libdl.so.2 => /tools/lib/libdl.so.2 (0x00007f54dd34c000)
libc.so.6 => /tools/lib/libc.so.6 (0x00007f54dcfa9000)
/tools/lib64/ld-linux-x86-64.so.2 (0x00007f54dd550000)
----------------------------------------------------
$ readelf -l /tools/bin/bash | grep interpreter
[Requesting program interpreter: /tools/lib64/ld-linux-x86-64.so.2]
$ readelf -l /tools/bin/env | grep interpreter
[Requesting program interpreter: /tools/lib64/ld-linux-x86-64.so.2]
----------------------------------------------------
$ find -L /tools -name bash 2>/dev/null
/tools/share/doc/bash
/tools/bin/bash
$ find -L /tools -name env 2>/dev/null
/tools/bin/env
----------------------------------------------------
$ ls -l /tools
lrwxrwxrwx 1 root root 18 Dec 22 02:37 /tools -> /mnt/lfs/wrk/tools
$ ls -l /tools/bin/bash
-rwxr-xr-x 1 root root 3544126 Dec 22 03:00 /tools/bin/bash
$ ls -l /tools/bin/env
-rwxr-xr-x 1 root root 132979 Dec 22 03:01 /tools/bin/env
----------------------------------------------------
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page
Do not top post on this list.
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
http://en.wikipedia.org/wiki/Posting_style