LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 11-24-2004, 02:32 AM   #1
icoming
Member
 
Registered: Feb 2004
Posts: 96

Rep: Reputation: 15
why my bash doesn't work correctly?


There should be no error when I compile Bash and other softwares.
After I finish the preparing part, I use the below command to change the root:
chroot $LFS /static/bin/env -i \
HOME=/root TERM=$TERM PS1='\u:\w\$ ' \
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/static/bin \
/static/bin/bash --login
However, to my surprise, there will be such an error like 'bash: cd: static/bin/ls: No such file or directory' when I input most of commands.
But when I type /static/bin/l , and type the key TAB, the bash shows the right files
ld ln locate logname ls ls_tmp

And I type /static/bin/ls, there is still the same error.
I have no name!:/# /static/bin/ls
bash: /static/bin/ls: No such file or directory

What is the matter? Is there something wrong with my Bash. I have compile it twice.
And the more surprising is that there is no error when I input the command such as 'chroot' and 'env'.
I really don't know what is the problem and what should I do.
Please help!
Thank you
 
Old 11-24-2004, 06:24 AM   #2
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
It could be that /static/bin/ls is generating this error, rather than BASH. Try running it, and check that all the ldd links (if any) are present and correct.

What is the value of $LFS? If it's /static then BASH is actually looking for /static/static/bin/ls because it's being chrooted to /static/
 
Old 11-24-2004, 08:10 AM   #3
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
What's this directory /static? I've not seen that in the book. The book works. Try following the book.
 
Old 11-27-2004, 12:41 PM   #4
320mb
Senior Member
 
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577

Rep: Reputation: 48
sounds like $LFS is not in the $PATH

Code:
 export LFS=/LFS
 
Old 11-28-2004, 07:59 AM   #5
icoming
Member
 
Registered: Feb 2004
Posts: 96

Original Poster
Rep: Reputation: 15
I know the problem now.
The program ls is compiled with dynamic link.
After I compile it with static link, everything is OK now.
Thank you for your help
 
  


Reply



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
php will NOT work correctly :( arichardson Fedora 3 11-17-2005 03:10 PM
bash does not wrap long lines correctly monkeyman2000 Linux - General 8 09-08-2004 09:30 PM
Nvidia tv-out won't work correctly. bruno buys Linux - Software 0 04-14-2004 06:09 PM
Can Not Get POP3d to work correctly jmnovak Linux - Networking 2 12-01-2002 02:24 PM
iptables doesn't work correctly themorph Linux - Networking 1 02-20-2002 09:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

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

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