LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 05-05-2006, 04:20 PM   #1
BobNutfield
Senior Member
 
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,526

Rep: Reputation: 53
Problem Creating Environment for install


Hi Everybody,

I am just finishing with the environment preparation to start installing the tools(Binutils, etc.). I have created the use "lfs" and set the environment:

Code:
lfs@bobsbox:~$ cat > ~/ .bash_profile << "EOF"
> exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w:\$ ' /bin/bash
Code:
lfs@bobsbox:~$ 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
The last instruction for this stage is to source the profile, but I get this error:

Code:
lfs@bobsbox:~$ source ~/.bash_profile
-su: /home/lfs/.bash_profile: No such file or directory
I have no typos, and have followed the instructions exactly.

Anyone have any ideas?

Any help appreciated,

Bob
 
Old 05-05-2006, 04:32 PM   #2
ataraxia
Member
 
Registered: Apr 2006
Location: Pittsburgh
Distribution: Debian Sid AMD64
Posts: 296

Rep: Reputation: 30
You've got an extra space before ".bash_profile" where you cat into it.
 
Old 05-05-2006, 04:57 PM   #3
BobNutfield
Senior Member
 
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,526

Original Poster
Rep: Reputation: 53
Thanks very much, I did track that down eventually. I'll tell this thing is a little tedious now...no sooner do I get that one settled and I run into a permissions problem somehow:

Code:
lfs:/mnt/lfs$ mkdir -v ../binutils-build
mkdir: cannot create directory `../binutils-build': Permission denied
Trying to change permission to user lfs is not working.

Thought I had correct permissions. The owner and group of /mnt/lfs is lfs. How is it that I am not allowed to make a directory as user lfs?

Any help appreciated.

Bob
 
Old 05-05-2006, 06:33 PM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Is /mnt/lfs a mounted partition or a mount point? In other words, was a partition mounted on /mnt, or do you mount a partition on /mnt/lfs.
If it is a place to mount a partition, it will most likely be created by root. The uid/gid will change after being mounted, and you use the chmod or chgrp command after the partition is mounted. A common error is to forget to mount a partition, before copying files there. When later the partition is mounted, those files will be hidden.


On your earlier question about sourcing a script; when it is done in a script during login, it is common to check if the file exists and source it if it does.
Of course, I realize, you where sourcing your .bash_profile in this case manually here, to change your own environment to reflect the changes you just made.

~/.bash_profile or /etc/profile often contains the line
if [ -f $HOME/.bashrc ]; then . $HOME/.bashrc; fi
sometimes there is a file called aliases, and a .bash_profile or /etc/profile script will source it if it exists. This provides a convenient way to change your aliases when you log in.

Last edited by jschiwal; 05-05-2006 at 06:36 PM.
 
Old 05-05-2006, 07:15 PM   #5
BobNutfield
Senior Member
 
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,526

Original Poster
Rep: Reputation: 53
Thanks,jshiwal, for your help. This (mnt/lfs) is a mounted partition. The instruction tell me to export the $LFS to /mnt/lfs, which had been previously mounted as root. I simply cd to $LFS and it puts me at that prompt. I then change to user lfs which had also been created. I seemed to have solved it because it is working now and I have moved on to installing. So far, I have installed binutils and gcc. Unfortunately, I foolishly did the whole configure/make/make install of gcc as root and had to correct all the permissions, but I seem to have successfully done that. I am now moving on to installing the kernel headers.

This is a terrific learning tool. Whether I will actually ever create a bootable LFS distro is still up in the air, but I am learning a lot trying, and, what the heck, if I really mess it up, it is on a partition which can be easily wiped to start over. I am using Slack 10.2 as the host system (didn't have much luck trying from the LiveCD). I don't believe I can, but I am certainly hoping if I do screw up it won't damage my Slack install.

Thank again for your help.

Bob
 
Old 05-05-2006, 11:14 PM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
You will have better luck at not damaging your slackware install if you don't accidently run commands as root.
Hopefully you'll reach a stage where sudo is set up and you can run single commands as root that way.
I agree that what you are doing is a great learning experience. You are finding out what does what, and how everything fits together.
 
  


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
Creating desktop environment without Gnome/KDE Artik Linux - Software 2 08-07-2005 08:01 AM
creating a good test environment ddaas Linux - General 1 01-05-2005 12:11 PM
Creating a Server in a LAN Environment Nukem Linux - General 3 11-06-2004 03:38 PM
Creating a test environment - server mirroring stillontheedge Debian 8 05-24-2004 04:05 PM
Problem in creating Lan in Linux and windows environment ann6260 Linux - Networking 2 08-12-2003 01:30 AM

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

All times are GMT -5. The time now is 06:57 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