Re: Problem in entering chroot: /bin/bash not found

"Bhaumik Tripathi" ([email protected] via lfs-support Mailing List) <[email protected]> Wed, 18 Jun 2025 18:44:00 +0530
Newsgroups gmane.linux.lfs.support
Message-ID <[email protected]>

On 15/06/25 17:40, tjoen ([email protected] via lfs-support Mailing List) wrote:
> On 6/15/25 12:30 PM, Bhaumik Tripathi ([email protected] via lfs-
> support Mailing List) wrote:
> ...
>> But since chown has changed the owner of all directories to root in
>> chapter 7's starting. Should I try rebuilding bash as root from its
>> tarball and see if it works? or change the ownership back to lfs and
>> then rebuild bash?
> 
> By user:
> $ ./configure --prefix=/usr --bindir=/bin --without-bash-malloc \
>   --with-installed-readline
> $ make
> 
> By root:
> # make DESTDIR=/mnt/lfs install
> 
>> In that case would I need to rebuild binutils, gcc and packages that
>> I built after it again?
> 
> Just
> # chown root:root /mnt/lfs/usr/bin/*
> and /mnt/lfs/bin/*
> Also /mnt/lib64/* and /mnt/lfs/usr/lib/*

Pardon, for the late response, some sudden work came up.
Since, I have already changed ownership of directories to root so I
shifted back to lfs from the following command.
`chown --from root -R lfs:lfs
$LFS/{usr,lib,var,etc,bin,sbin,tools,lib64}`
(lib64 is included as uname -m is x86_64). Then, unzipped bash and ran
`./configure --prefix=/usr \
--build=$(sh support/config.guess) \
--host=$LFS_TGT \
--without-bash-malloc`
then running make gives the the error precisely mentioned in
https://github.com/openwrt/packages/issues/26469
Though it is mentioned in the project that error is happenening because
of the 15th version of gcc, so setting `CFLAGS_FOR_BUILD="-std=gnu17"`
fixed the issue.I must have missed it. It was very careless of me,
nonetheless recompilation worked and I have entered chroot environment.
I thank you for guiding and helping me.

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