stuck on chroot

Gerard Beekmans gerard at
Sat Mar 16 08:35:02 PST 2002

On Sat, Mar 16, 2002 at 12:30:46PM -0500, Lewi wrote:
> I use rh7.1 with kernel 2.4.17, and
> [root at mbone /root]# cd /lfs &&
> > chroot /lfs /usr/bin/env -i HOME=/root \
> >    TERM=$TERM /bin/bash --login
> [root at mbone /lfs]# rpm -qa |grep glibc

Try to run the commands seperate without the && at the end of the cd

It is strangely possible that the return value of the "cd /lfs" command is
'1' which indicates error. If that's the case, bash will not even run the
chroot command. So run it like this:

	cd /lfs
	chroot /lfs /usr/bin/env ....the other options here....

to see if that 'cd' command ran properly you can run this:

	cd /lfs
	echo $?

the echo command should output a 0. If it does and chroot still doesn't
work, it could very well be a bug in redhat 7.1 somewhere. Redhat 7.1 is
known to have a few problems that make LFS'ing hard.

Gerard Beekmans

-*- If Linux doesn't have the solution, you have the wrong problem -*-
Unsubscribe: send email to listar at
and put 'unsubscribe lfs-support' in the subject header of the message

More information about the lfs-support mailing list