Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.


  Search this Thread
Old 06-23-2004, 07:21 AM   #1
LQ Newbie
Registered: Apr 2004
Posts: 8

Rep: Reputation: 0
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\$ ' \

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
Old 07-19-2004, 07:57 PM   #2
LQ Newbie
Registered: Jul 2004
Distribution: Slackware
Posts: 1

Rep: Reputation: 0
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!!

Old 07-20-2004, 12:35 AM   #3
Senior Member
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577

Rep: Reputation: 48
is you $PATH set correctly??
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 .........
Old 07-21-2004, 11:08 AM   #4
LQ Newbie
Registered: Jul 2004
Posts: 1

Rep: Reputation: 0
I'm using slackware 9.1 and I have the same problem... root has read/write access to the directory, but .....
Old 07-21-2004, 12:48 PM   #5
Andrew Benton
Senior Member
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
LFS 6 Chapter 6.3 chroot error gatblast45 Linux From Scratch 8 01-01-2008 04:12 AM
LFS Book Chapter 6 - 1st step (chroot to /mnt/lfs) doens't work bauld Linux From Scratch 11 03-15-2006 01:31 AM
can't chroot back into LFS after install shotokan Linux From Scratch 8 06-01-2005 04:09 PM
Chroot problem PhuckFonix Linux - Newbie 3 05-02-2005 10:15 PM
chroot in lfs shahzadiub Linux - Newbie 5 06-23-2004 01:08 PM

All times are GMT -5. The time now is 06:33 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration