LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   chroot problem in LFS (https://www.linuxquestions.org/questions/linux-from-scratch-13/chroot-problem-in-lfs-196742/)

shahzadiub 06-23-2004 06:21 AM

chroot problem in LFS
 
when i issue the command

chroot $LFS /tools/bin/env -i \
HOME=/root TERM=$TERM PS1='\u:\w\$ ' \
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
/tools/bin/bash --login



followng message s dsplayed


/tools/bin/env: /tools/bn/bash:no such drectory or fle


now when i applied the command

chroot $LFS /tools/bin/env -i \
HOME=/root TERM=$TERM PS1='\u:\w\$ ' \
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin


it worked fine.

then i applied the command

/tools/bin/bash --login

it also worked fine.

But when i applied the command

chroot $LFS /tools/bin/bash

following error was displayed
/tools/bin/bash:no such file or directory


then i applied some more commands such as


chroot /mnt/lfs /tools/bin/cc

and they worked.

but for some commands following message was displayed


chroot:/mnt/lfs/command:no such file or diretory.


please tell me why some commands are working and some or not.

should i recompile LFS to overcome this problem.

please help as i'm stuck on chroot problem in LFS for 4 days now

Polytopal 07-19-2004 06:57 PM

I have the exact same problem
 
Are you by any chance trying the 5.0 LFS on slackware 9.1?? That's what I'm using and I'm having the exact same problem!!

:confused:

320mb 07-19-2004 11:35 PM

is you $PATH set correctly??
Code:

echo $LFS
IF your user only has access permissions to the /LFS/tools directory, then root can't use it in the chroot environment............make sure the "root" group can read, write, and exec to it before you chroot .........

stone86 07-21-2004 10:08 AM

I'm using slackware 9.1 and I have the same problem... root has read/write access to the directory, but ..... :(

Andrew Benton 07-21-2004 11:48 AM

Ususally this means you didn't set up the environment properly and /tools/bin/env or whatever has been compiled linked to stuff on your host system. It will work fine in the environment of the host system but as soon as you try to chroot the paths to the things it's linked to don't make sense and so it won't work. The solution is to start again and do it properly. Follow the book. Set up the user lfs just as the book describes and use all the commands the book says. Copy and paste from your browser to avoid typos.


All times are GMT -5. The time now is 11:22 AM.