On Sat, 2 Jul 2005, Stephen Liu wrote: > > [EMAIL PROTECTED] ~]$ su - lfs > Password: > > lfs:~$ echo $LFS > /mnt/lfs >
Correct. > lfs:~$ cat > ~/.bash_profile << "EOF" > > exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' > /bin/bash > > EOF > lfs:~$ cat > ~/.bashrc << "EOF" > > set +h > > umask 022 > > LFS=/mnt/lfs > > LC_ALL=POSIX > > PATH=/tools/bin:/bin:/usr/bin > > export LFS LC_ALL PATH > > EOF Any WHY did you do THAT ? The _first_ time you ran that (several days ago), you created /home/lfs/.bash_profile - it isn't volatile, it should already be there for you :) What I intended you to do was run 'printenv' at that point, and observe that the environment variables LFS LC_ALL and PATH were set correctly. > lfs:~$ > > lfs:~$ exit > exit No, No, A thousand times No! Do not exit from user lfs's shell at this point. Here is where you should 'su root' without the '-'. When you've done that, run printenv again and compare the output (e.g. LFS should still be set). To help the learning, next try 'su -' and printenv. After that, you should see the change in the environment, but you'll then need to exit from the second nested root shell [ i.e. 'exit; printenv; whoami' ] - you should be root, with the LFS and other variables set correctly. > [EMAIL PROTECTED] ~]$ umount /mnt/lfs > umount: /mnt/lfs is not mounted (according to mtab) > [EMAIL PROTECTED] ~]$ su > Password: > [EMAIL PROTECTED] satimis]# umount /mnt/lfs > umount: /mnt/lfs: not mounted Heh, you've got another problem - I imagine you've resumed after logging off : each time you do that, you need to mount whatever was not mounted automatically, such as /mnt/lfs. It might pay you to read the references in the 'Prerequisites' part of the book, and perhaps the Bash Programming - Introduction HOWTO and the Advanced Bash Scripting Guide. I'm deliberately not giving you links to these two - we all make errors and mistakes in ours builds, often a working knowledge of how to search google is the quickest way to find out what is wrong. At the moment, I think you are heading for a very frustrating experience trying to build LFS because you have not yet acquired enough background knowledge and experience. For example, if somebody suggested you should 'rm -rf /mnt/lfs/../../* 2>/dev/null' would you understand why that was a VERY BAD idea ? [ it would silently remove everything you had the ability to delete, e.g. /home/lfs and /mnt/lfs for user lfs, everything if you tried it as root outside chroot, or at a minimum your own home directory as user satimis ] You need to have some understanding of what commands are likely to do before you run them, and some familiarity with common commands. Ken -- das eine Mal als Tragödie, das andere Mal als Farce -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
