Problem in entering chroot: /bin/bash not found

"Bhaumik Tripathi" ([email protected] via lfs-support Mailing List) <[email protected]> Sat, 14 Jun 2025 10:26:28 +0530
Newsgroups gmane.linux.lfs.support
Message-ID <[email protected]>
Hello everyone,

LFS Book Version: 12.3
Host OS: Artix Linux
Version-Check script Output:
OK:
Coreutils 9.7    >= 8.1
OK:
Bash      5.2.37 >= 3.2
OK:
Binutils  2.44.0 >= 2.13.1
OK:
Bison     3.8.2  >= 2.7
OK:
Diffutils 3.12   >= 2.8.1
OK:
Findutils 4.10.0 >= 4.2.31
OK:
Gawk      5.3.2  >= 4.0.1
OK:
GCC       15.1.1 >= 5.2
OK:
GCC (C++) 15.1.1 >= 5.2
OK:
Grep      3.12   >= 2.5.1a
OK:
Gzip      1.14   >= 1.3.12
OK:
M4        1.4.20 >= 1.4.10
OK:
Make      4.4.1  >= 4.0
OK:
Patch     2.8    >= 2.5.4
OK:
Perl      5.40.2 >= 5.8.8
OK:
Python    3.13.3 >= 3.4
OK:
Sed       4.9    >= 4.1.5
OK:
Tar       1.35   >= 1.22
OK:
Texinfo   7.2    >= 5.0
OK:
Xz        5.8.1  >= 5.0.0
OK:
Linux Kernel 6.14.10 >= 5.4
OK:
Linux Kernel supports UNIX 98 PTY
Aliases:
OK:
awk  is GNU
OK:
yacc is Bison
OK:
sh   is Bash
Compiler check:
OK:
g++ works
OK: nproc reports 4 logical cores are available


Problem Section: 7.4 First command to enter chroot.
Error Message: `env: '/bin/bash': No such file or directory`
Error Description: First of all, I am making lfs for the first time,
hence there is no deviation that I did, most of the commands outputs
are logged with `tee`. General FAQ doesn't address the issue and
I couldn't find a relevent post on mailing list.
As in this case I presume chroot command is not
finding `bash` in `/bin/bash` which would be `/lfs/mnt/bin/bash`. On
checking the directory with `ls -la | grep bash` gives the symlinked
path of `sh -> bash`. So, bash is not present in bin/bash. On checking
the logs of bash when compiled in Section 6.4, There is no major issue I
could find. Here is the logs of .compile and make commands.

http://pastie.org/p/7agMoHk7TmWnU7Fx0XcLX5/raw

There is an exact issue I found here
(https://www.linuxquestions.org/questions/showthread.php?s=de19ba08150b3c1978c13ef22fb2ef44&p=6537169#post6537169)
but it suggested that I compiled bash wrong, which doesn't seems to be
the case (you can see the logs). Also, at the end of chapter 5, the
command to check the proper compilation
(i.e. ` echo 'int main(){}' | $LFS_TGT-gcc -xc -
readelf -l a.out | grep ld-linux`)
ran successfully with expected output. So, the problem is maybe
afterwards in chapter 6 (if there is something I messed up).

What can I do to fix it?

-- 
http://lists.linuxfromscratch.org/sympa/info/lfs-support
Unsubscribe: See the above information page