beginner's problem with lfs book 2004-02-14

Sheesh at address.unknown
Fri Apr 2 21:39:37 PST 2004

Joel Miller wrote:
> Muczy wrote:
>> Hello everyone!
>> So here is my problem:
>> I'm using a Redhat 9 on a 2ghz celeron, 256Mb ram.
>> When I get to the section "Change chroot", I copy and past the chroot 
>> command to the terminal (cause I'm using X), so I make no mistakes!
>> Then Redhat says that "env" is not a directory. Well, honestly, he's 
>> right, but this problem didn't existed on Mandrak 9.2 .
>> I changed to Redhat because there were some problems on Mandrake with 
>> Gcc, but that is another story.
>> So, what have I done bad?
>> Thanx 4 helping!!!
>> Muczy ( muczy at )
> This sounds like the LFS variable is not set. Do an `echo $LFS' before 
> running the chroot command. If it prints the directory you are 
> installing lfs to then something else is a problem. If it prints nothing 
> then it means that the LFS variable is unset. In that case you need to 
> do something like `export LFS=/mnt/lfs' to set the variable before you 
> chroot. Alternatively, you can just provide the absolute directory path 
> to the chroot command instead of using the LFS variable in the chroot 
> command.

That one caught me too.  The echo $LFS worked fine while logged
into the lfs account but after becoming root with 'su -' the
$LFS variable was lost.  In chapter 6, the note to check the $LFS
environment variable is before the line "Become root and run the
following command to enter the chroot environment:" so, being
a bit more brain dead than usual after getting through chapter 5,
I just did what the book said... step by step.  I did the check
*before* becoming root, but since it didn't say to do it again
*after* becoming root, I figured I was good to go.  The reason I
did 'su -' instead of just 'su' was because chroot wasn't in the
path without doing the login shell method.

Everything else went without a hitch using the Version 5.1-pre1
book except I forgot to set the kernel ext3 option so I had to
compile the kernel twice.


More information about the lfs-support mailing list