"chroot" problem

Matthias Benkmann matthias at winterdrache.de
Fri Nov 30 16:08:44 PST 2001

On 1 Dec 2001, at 1:44, Peter Varbanov wrote:

> Hello,
> I'm trying to build a LFS system using RedHat 6.1 as host . I followed all
> the steps as described in the book and everything goes fine until I have to
> mount the proc fs on the $LFS partition. I tried (as the book tells me)
> with " mount $LFS/proc -t proc" but the program just prints some usage
> examples and options. Then I add the line " none    $LFS/proc    proc   
> defaults    0 0 " to the /etc/fstab file and with "mount $LFS/proc" it
> seems to work fine... Then I have to run "chroot" but when I type (by the
> book again) " chroot $LFS /usr/bin/env -i HOME=/root TERM=$TERM /bin/bash
> --login " it prints the following : ... cannot execute /usr/bin/env : No
> such file or directory now this is strange because there is such file.

Note that although the command uses /usr/bin/env rather than 
$LFS/usr/bin/env  (there is a space between $LFS and /usr/bin/env, so 
these are separate arguments), the file that is needed is actually 
$LFS/usr/bin/env. Check if it exists and is statically linked:

file $LFS/usr/bin/env

will tell you. I'm willing to bet that it either doesn't exist or is not 
statically linked.

> Then
> I ran " chroot $LFS " and I get into chroot'ed environement with the "I
> have no name!" prompt. But then I can't execute no program. Not even
> /usr/bin/env...It just kepps on telling me " No such file or directory"
> while the file is present. I guess there's something wrong, I mean this is
> not the way things should go is it? Please help me , I any one has an idea
> of misht be the reason. 

>Please note that I've done EXACTLY what the book
> told me to, 

:-)  Yes, sure you did ;-) They _always_ say that. And in the end it turns 
out they made a typo. The reliability of the LFS 3.0 book is an order of 
magnitude higher than the typing skills of any mortal on earth. 


In allen Kulturen haben Muetter ihre Babys mit Vorgekautem
von Mund zu Mund gefuettert.
Bis vor kurzem sogar noch in Schleswig-Holstein.

Irenaeus Eibl-Eibesfeldt im SZ Magazin, No.28

Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-support' in the subject header of the message

More information about the lfs-support mailing list