lfs-4.0 : chroot problem

Ken Moffat ken at kenmoffat.uklinux.net
Tue Jan 21 13:30:45 PST 2003

On Tue, 21 Jan 2003, Benoit wrote:

> Hi everybody,
> I'm installing lfs-4.0 on my PC and I meet a problem  at the first step of 
> Chapter 6 : "Entering the chroot environment".
> Command "chroot $LFS /static/bin/env -i ... /static/bin/bash --login" seem 
> to work fine, BUT I'm not able to run any external command as "ls", "mkdir" 
> or "chown".
> The only result is the error message : "bash: /static/bin/<thecommand>: No 
> such file or directory".

 From the host system:

0. ensure $LFS is still set (e.g. `echo $LFS')

1. verify that $LFS/static/bin/{ls,mkdir,chown} exist (just in case you
built chapter 5 without mounting anything at $LFS.)

2. does `file $LFS/static/bin/{ls,mkdir,chown}' tell you they are
statically linked ?

If it doesn't, redo chapter 5 fileutils as the book says, i.e. put
LDFLAGS=-static in front of the ./configure (in the same command),
possibly you had problems with the '\' if you cut and pasted, or maybe
you had a typo such as LDFLAGS=static. 

 As a general rule, if you get a "no such file or directory" message and
you can see the file, it usually means it's trying to load a shared
library that isn't being found.

> I changed some binary owner, before "chroot", to root : no change !
> FAQ don't seem to have some info about that !
> What did I forget ???
> regards
> Benoit

 Out of the darkness a voice spake unto me, saying "smile, things could be
worse". So I smiled, and lo, things became worse.

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