Linux From ScratchThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
It sounds like bash is not finding the program because it is not loaded with the correct config (/etc/profile , ~/.bash_profile, ~/.bashrc). I don't know why it would suddenly do that, but try this:
go to your home directory (/root) and type "source .bash_profile". This should change the prompt (if this is where you configured it), and have the correct path settings.
hmm... How did you set up your prompt to have "linux$"? Either way, you should have the .bash_profile... here's a copy of mine (with irrevelant stuff pulled out)
About the chroot stuff (it's kindof important... you can screw things up). You are installing the LFS from an other system, correct? ok, that system has it's own directory tree ( "/" being at the top, with /root /usr/ , ect....) Now, when you are installing the lfs from that system, you are installing it in a directory WITHIN that directory tree (in the book, they call it $LFS). When you do "chroot $LFS" from the command line in the origonal system, it tells bash that the top level of the directory tree should be $LFS, and FOR THAT SESSION OF BASH ONLY, it considers $LFS on your base system to be "/". This way, when you install programs, they don't go all over the place in your base system, and stay right there in your $LFS directory. this means that every time you open a new window from your base system, you have to do that chroot command. In chapter 6 of the book, look again @ "entering the chrooted environment". the command
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
sets up that path stuff for you (instead of using ~/.bash_profile)
yeah, maybe your $LFS variable didn't work... that happened to me too at first. I installed it all with the actual path (/mnt/lfs/) instead of doing the $LFS thing. you should probably just delete all of the stuff in $LFS.
***Unless you think you can install a few missing packages again, this time in the correct path
Good Luck...
ooh yeah... look @ "install software as an unprivelaged user" again... this way you can set up a user "lfs" in your base system that won't be able to write damaging stuff to your base system, and will have the $LFS variable set for you
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.