LinuxQuestions.org
Review your favorite Linux distribution.
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 09-10-2002, 06:21 PM   #1
safrout
Member
 
Registered: Mar 2002
Location: egypt
Distribution: Gentoo
Posts: 457

Rep: Reputation: 30
bash: bzcat: command not found


bash-2.05a$ cd /mnt/lfs/usr/src/
bash-2.05a$ bzcat bzip2-1.0.2.tar.bz2 | tar xv
bash: bzcat: command not found
bash-2.05a$


this how my bash shel appear

i am in the stage of installing bzip2 in chapter 6

when i open my bash shell i found written " bash-2.05a$ " instead of " linux$ "

and when i type anycomman as u can see above like cd /mnt/lfs it stays on bash also

and when trying to unbz2 the bzip2 file it says command not found although i am sure i unbz2 all the previos packages with the same command

can anyone help me plz
 
Old 09-10-2002, 06:31 PM   #2
adam_boz
Member
 
Registered: Jul 2002
Location: Santa Cruz, CA
Distribution: lfs
Posts: 538

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

Or you could do "/usr/bin/bzcat"

Good Luck

***I had those profile file names wrong***

Last edited by adam_boz; 09-10-2002 at 06:53 PM.
 
Old 09-10-2002, 06:35 PM   #3
safrout
Member
 
Registered: Mar 2002
Location: egypt
Distribution: Gentoo
Posts: 457

Original Poster
Rep: Reputation: 30
bash-2.05a# cd /root
bash-2.05a# source .bash_profile
bash: .bash_profile: No such file or directory
 
Old 09-10-2002, 06:42 PM   #4
adam_boz
Member
 
Registered: Jul 2002
Location: Santa Cruz, CA
Distribution: lfs
Posts: 538

Rep: Reputation: 30
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)

# Begin /root/.bash_profile

PS1='\u:\w\$ '
PATH=/bin:/usr/bin:/sbin:/usr/sbin

export PS1 PATH

# End /root/.bash_profile
 
Old 09-10-2002, 06:45 PM   #5
adam_boz
Member
 
Registered: Jul 2002
Location: Santa Cruz, CA
Distribution: lfs
Posts: 538

Rep: Reputation: 30
Are you still chrooted into the $LFS directory?

This makes bash think that $LFS is / (the root dir. of the system)

Once you get some time, check out this how-to:

http://www.linux.org/docs/ldp/howto/...WTO/index.html

Last edited by adam_boz; 09-10-2002 at 06:48 PM.
 
Old 09-10-2002, 06:49 PM   #6
safrout
Member
 
Registered: Mar 2002
Location: egypt
Distribution: Gentoo
Posts: 457

Original Poster
Rep: Reputation: 30
sorry but i am not sure how to check if i am still chrooted or not

i typed source .bash_profile under /mnt/lfs/root

and the result was that the bash shel retuned to the normal state :

but when i closed the bash shel and reopened it again
it returned to write " bash-2.05a $ '

again
 
Old 09-10-2002, 06:55 PM   #7
safrout
Member
 
Registered: Mar 2002
Location: egypt
Distribution: Gentoo
Posts: 457

Original Poster
Rep: Reputation: 30
i was able it unbiz2 the file with the command u said in the other thread
;

tar -jxvf <file.bz2>
 
Old 09-10-2002, 07:08 PM   #8
adam_boz
Member
 
Registered: Jul 2002
Location: Santa Cruz, CA
Distribution: lfs
Posts: 538

Rep: Reputation: 30
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)

Good Luck

-Adam




Last edited by adam_boz; 09-10-2002 at 07:10 PM.
 
Old 09-10-2002, 07:10 PM   #9
safrout
Member
 
Registered: Mar 2002
Location: egypt
Distribution: Gentoo
Posts: 457

Original Poster
Rep: Reputation: 30
i think that i will start the lfs from the start again and be more carefull cos i think i made smale mistakes while procceding in the step

hope i have good luck this time
 
Old 09-10-2002, 07:10 PM   #10
safrout
Member
 
Registered: Mar 2002
Location: egypt
Distribution: Gentoo
Posts: 457

Original Poster
Rep: Reputation: 30
thanx alot for ur help my friend
 
Old 09-10-2002, 07:13 PM   #11
safrout
Member
 
Registered: Mar 2002
Location: egypt
Distribution: Gentoo
Posts: 457

Original Poster
Rep: Reputation: 30
bash-2.05a# 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
chroot: cannot execute /static/bin/env: No such file or directory
bash-2.05a#



i think will restart from the start again

but do i have to do anything to clean the old lfs system
and to remove the bash-2.05a
 
Old 09-10-2002, 07:15 PM   #12
adam_boz
Member
 
Registered: Jul 2002
Location: Santa Cruz, CA
Distribution: lfs
Posts: 538

Rep: Reputation: 30
ooh yeah, to get the "source .bash_profile" to work in chapter 6, you have to add ":/static/bin:/static/bin/bash:" at the end of "PATH=" in that file
 
Old 09-10-2002, 07:21 PM   #13
adam_boz
Member
 
Registered: Jul 2002
Location: Santa Cruz, CA
Distribution: lfs
Posts: 538

Rep: Reputation: 30
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
 
Old 09-10-2002, 07:22 PM   #14
safrout
Member
 
Registered: Mar 2002
Location: egypt
Distribution: Gentoo
Posts: 457

Original Poster
Rep: Reputation: 30
th same error msg
 
Old 09-10-2002, 07:23 PM   #15
adam_boz
Member
 
Registered: Jul 2002
Location: Santa Cruz, CA
Distribution: lfs
Posts: 538

Rep: Reputation: 30
after that, try re-booting, maybe the "bash-2.05a" will go away... because your system will re-load the bash config stuff
 
  


Reply


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
Bash: command not found! Adil_uk Linux - General 14 04-09-2012 01:04 AM
bash: g++: command not found m_lp_ql_m Linux - Software 8 07-08-2010 01:45 PM
bash: command not found intels_ss Linux - Newbie 5 07-20-2005 07:41 PM
bash: pg: command not found Chomper Programming 2 02-05-2005 02:22 AM
-bash: cp: command not found johnlittlepeap Fedora 2 11-15-2004 08:52 AM

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

All times are GMT -5. The time now is 09:38 AM.

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