Initially when I was in the chroot shell I kept getting command not found for 'sed'.
-------------------------
need more information. but sed(1) is either not in PATH= or not installed in the chroot OR ..
glibc is "dorked" and fails to do library loading in which case bash tells you incorrectly "it wasn't found" when actually it was but wasn't loaded. now library loaded is part of binutils but also part of libc. so that's a little complicated
now, if your files seem to be all there? try checking existence of files and symlinks in /lib /usr/lib and run "ldconfig"
sometimes you can run ldconfig even if things can't be found (strange huh?)
HERE'S WHAT YOU CAN'T DO: install new libc without logging out of chroot and expect nothing will go wrong. you'll still be running libraries from old chroot after you alter it and invoking new libc with a different LD. ouch.
in "Totally Built Linux"
http://totally-built-linux-distro.s3...com/index.html (smaller than LFS not updated as much but supposedly 100% build automated), libc and ld updates are done with root not running inside chroot. also old ldconfig .cache are deleted before first login attempt. /etc/ of course must be correct
actually i forget what TBL has to do with it, but anyway - i'm saying probably there are some things you were told to do earlier in book, not repeated, that are more important than you think and you forgot to do those things. that's only my guess.
in TBL the
were many fixable probles causing "sed(1) not found" (now automated). the MOST FREQUENT ONE was a failed update of libc usually from a failed build (warnings in build can be fatal - just because libc builds doesn't mean it will work - you have to use all the right build options some are non-optional). either corrupted libc or lack of installation (say, symlinks in /lib not complete or pointing wrong) was, simple things aside, the problem.
this can also be binutils mismatch - since binutils gcc libc are intertwined to some effect (LD, the symbol loader) (the effect is libc will build 'ok' but with wrong version of binutils the result never works and chroot fails). but for LFS that should never occur since your building from a known good versions list of versions that match i assume.