LinuxQuestions.org
Help answer threads with 0 replies.
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-31-2005, 05:12 PM   #1
matthewa
Member
 
Registered: Mar 2005
Distribution: Slackware 10.1
Posts: 123

Rep: Reputation: 15
mkdir ../binutils-build gives me "Permission Denied"!!!


I have been working with lfs for days and cant get past this. When I am logged in as user lfs I cannot mkdir ../binutils-build or any other directory in the book that starts with ../

It tells me "Permission Denied". Is the two dots followed by a forward slash in front of these directories just a typo or am I doing something wrong? Im following the book to the letter and this still stops me cold!
 
Old 05-31-2005, 05:24 PM   #2
channelzero
LQ Newbie
 
Registered: May 2005
Distribution: lfs-svn
Posts: 11

Rep: Reputation: 0
Do you set ownership of $LFS/sources, as advised in chapter 4.3 to user lfs?

You can do this anytime as root with:

chown lfs $LFS/sources

If your sources are not in a subdir ../sources, then:

chown lfs $LFS/
 
Old 05-31-2005, 05:31 PM   #3
matthewa
Member
 
Registered: Mar 2005
Distribution: Slackware 10.1
Posts: 123

Original Poster
Rep: Reputation: 15
Yup....as I said Im following the book to the letter. I hav'nt missed a thing. As a matter of fact I have started over twice to make absolute sure. I get the same thing every time...when im in user lfs I cannot create these directories.

Thanks for trying, though
 
Old 05-31-2005, 08:19 PM   #4
channelzero
LQ Newbie
 
Registered: May 2005
Distribution: lfs-svn
Posts: 11

Rep: Reputation: 0
When logged in as user lfs what is output of

ls -l in the $LFS dir?

If dirs owned by root maybe your hostsystem changes
the ownership

Or you can try to mkdir in the source dir itself without ../
 
Old 06-01-2005, 07:15 AM   #5
rblythe
LQ Newbie
 
Registered: May 2005
Posts: 14

Rep: Reputation: 0
I had this same issue at first. What I had to do is make sure that I was in the correct directory before I started creating other directories. ex:

after untarring the binutils, cd binutils-2.15.91.0.2. Then mkdir ../binutils-build. Then cd ../binutils-build.

You should be able to continue with the instsall at that point.

It is critical that with all instructions, you are in the directory created after you untar the packages.

Hope this helps.
 
Old 06-01-2005, 10:31 AM   #6
freakyg
Member
 
Registered: Apr 2005
Distribution: LFS 5.0 and 6.1
Posts: 705

Rep: Reputation: 30
Quote:
Originally posted by matthewa
Yup....as I said Im following the book to the letter. I hav'nt missed a thing. As a matter of fact I have started over twice to make absolute sure. I get the same thing every time...when im in user lfs I cannot create these directories.

Thanks for trying, though
OK, post your /etc/fstab
maybe your user does not have the proper permissions to access .......
 
Old 06-02-2005, 01:00 AM   #7
matthewa
Member
 
Registered: Mar 2005
Distribution: Slackware 10.1
Posts: 123

Original Poster
Rep: Reputation: 15
Thanks for all the help guys..but lemme ask this...

Where exactly are you suppose to build the binutils-2.15.91.0.2 source at? Let me be more specific.....

1.) At the beginning 4.2. Creating the $LFS/tools Directory it says, " All programs compiled in Chapter 5 will be installed under $LFS/tools to keep them separate from the programs compiled in Chapter 6."

2.) But, at the beginning of the binutils-2.15.91.0.2 builf chapter it states that, " The Binutils documentation recommends building Binutils outside of the source directory in a dedicated build directory"

3.) To make things even more confusing the prefix ../ at the beginning of mkdir ../binutils-build usually refers to the root file tree, which is where bash puts the directory if I give that command while in root mode.

So, do I compile the binutils-2.15.91.0.2 package in /mnt/lfs/tools? Or, do I compile it in /mnt/lfs/binutils-build? It doesnt make much since using mkdir ../binutils-build, then moving the binutils-2.15.91.0.2 package into that file and building it on the host system. My host already has the binutils package on it! It's suppose to be built on the mnt/lfs partition, right???



Another question...............nothing seems to work for me when Im in user lfs mode! So, why cant I just build everything in root mode? Is it absolutley nesseccary to build within the user lfs mode?????

Last edited by matthewa; 06-02-2005 at 01:28 AM.
 
Old 06-02-2005, 01:43 AM   #8
freegianghu
Member
 
Registered: Oct 2004
Location: somewhere in the street
Distribution: Window$
Posts: 192

Rep: Reputation: 30
Quote:
Originally posted by matthewa
1.) At the beginning 4.2. Creating the $LFS/tools Directory it says, " All programs compiled in Chapter 5 will be installed under $LFS/tools to keep them separate from the programs compiled in Chapter 6."
Right
Quote:
Originally posted by matthewa
2.) But, at the beginning of the binutils-2.15.91.0.2 builf chapter it states that, " The Binutils documentation recommends building Binutils outside of the source directory in a dedicated build directory"
Yes
Quote:
Originally posted by matthewa
3.) To make things even more confusing the prefix ../ at the beginning of mkdir ../binutils-build usually refers to the root file tree, which is where bash puts the directory if I give that command while in root mode.
You were in [/mnt/lfs/sources/binutils-2.15.91.0.2] so absulute of [../binutils-build] is [/mnt/lfs/sources/binutils-build]
Quote:
Originally posted by matthewa
So, do I compile the binutils-2.15.91.0.2 package in /mnt/lfs/tools? Or, do I compile it in /mnt/lfs/binutils-build? It doesnt make much since using mkdir ../binutils-build, then moving the binutils-2.15.91.0.2 package into that file and building it on the host system. My host already has the binutils package on it! It's suppose to be built on the mnt/lfs partition, right???
You should compile in [/mnt/lfs/sources/binutils-build] then install to [/mnt/lfs/tools]
Quote:
Originally posted by matthewa
Another question...............nothing seems to work for me when Im in user lfs mode! So, why cant I just build everything in root mode? Is it absolutley nesseccary to build within the user lfs mode?????
You can make everything in root mode with your own risk ;-)

Good luck!
 
Old 06-02-2005, 09:23 AM   #9
matthewa
Member
 
Registered: Mar 2005
Distribution: Slackware 10.1
Posts: 123

Original Poster
Rep: Reputation: 15
Guys, thanks for the help. Im half way through the process now and Im loving it!
 
Old 06-29-2005, 04:34 AM   #10
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Rep: Reputation: 56
Hi folks,

I followed
5.4. Binutils-2.15.91.0.2 - Pass 1
http://www.sg.linuxfromscratch.org/l...ils-pass1.html

to install LFS and came to the same problem;

lfs:~$ mkdir ../binutils-build
mkdir: cannot create directory `../binutils-build': Permission denied

(remark: all packages and patches in /mnt/lfs/sources/ )

Whether I should first untar 'binutils-2.15.91.0.2.tar.bz2' with following steps;
lfs:~$ cd /mnt/lfs/sources/
lfs:/mnt/lfs/sources$ tar jxvf binutils-2.15.91.0.2.tar.bz2
lfs:/mnt/lfs/sources$ cd ./binutils-2.15.91.0.2
lfs:/mnt/lfs/sources/binutils-2.15.91.0.2$ mkdir ../binutils-build
lfs:/mnt/lfs/sources/binutils-2.15.91.0.2$ cd mkdir ../binutils-build

to run
../binutils-2.15.91.0.2/configure --prefix=/tools \
--disable-nls

and afterwards continue to proceed

Please advise. TIA

B.R.
satimis
 
Old 06-29-2005, 05:11 AM   #11
freegianghu
Member
 
Registered: Oct 2004
Location: somewhere in the street
Distribution: Window$
Posts: 192

Rep: Reputation: 30
Quote:
Originally posted by satimis
Hi folks,

I followed
5.4. Binutils-2.15.91.0.2 - Pass 1
http://www.sg.linuxfromscratch.org/l...ils-pass1.html

to install LFS and came to the same problem;

lfs:~$ mkdir ../binutils-build
mkdir: cannot create directory `../binutils-build': Permission denied
................................................................
satimis
You were in lfs:~$ so when you mkdir ../binutils-build mean you want to make a directory in users directory (ex: /home) => Permission denied
You should be in $/mnt/lfs/sources/binutils-x.x.x before run mkdir ../binutils-build

Cheers,
GH
 
Old 06-29-2005, 05:17 AM   #12
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Rep: Reputation: 56
Hi freegianghu,

Tks for your advice.

Quote:
You should be in $/mnt/lfs/sources/binutils-x.x.x before run mkdir ../binutils-build
If I understand it correctly I must untar/extract 'binutils-x.x.x' in /mnt/lfs/sources/ directory first.

B.R.
satimis
 
Old 06-29-2005, 05:29 AM   #13
freegianghu
Member
 
Registered: Oct 2004
Location: somewhere in the street
Distribution: Window$
Posts: 192

Rep: Reputation: 30
Quote:
Originally posted by satimis
Hi freegianghu,

Tks for your advice.

If I understand it correctly I must untar/extract 'binutils-x.x.x' in /mnt/lfs/sources/ directory first.

B.R.
satimis
Yes!!! I used to installed packages as below steps:
Code:
$ cd /mnt/lfs/sources
$ tar jxf package.tar.bz2
$ cd package*
$ and then follow LFS guide :D
 
Old 06-29-2005, 05:43 AM   #14
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Rep: Reputation: 56
Hi freegianghu,

Quote:
Code:
$ cd /mnt/lfs/sources
$ tar jxf package.tar.bz2
$ cd package*
$ and then follow LFS guide
Noted with thanks.

An additional question;
There are bundle of package-tarballs and patches in /mnt/lfs/sources. After their extraction, the pcakage-tarballs and their decompressed packages are co-existing in the directory. After building LFS completed is there a simple method to delete all package-tarballs together rather than deleting them manually one-by-one to free HD space.

B.R.
satimis
 
Old 06-29-2005, 06:36 AM   #15
freegianghu
Member
 
Registered: Oct 2004
Location: somewhere in the street
Distribution: Window$
Posts: 192

Rep: Reputation: 30
Quote:
Originally posted by satimis
Hi freegianghu,

Noted with thanks.

An additional question;
There are bundle of package-tarballs and patches in /mnt/lfs/sources. After their extraction, the pcakage-tarballs and their decompressed packages are co-existing in the directory. After building LFS completed is there a simple method to delete all package-tarballs together rather than deleting them manually one-by-one to free HD space.

B.R.
satimis
To delete all extracted directories, run script like:
Code:
for input in `ls` ; do
  if [ -d $input ]; then
    echo "Removing $input" && rm -rf $input
  fi
done
 
  


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
can't execute c++ binaries, "permission denied"... even though permission is 777 SerfurJ Programming 14 02-20-2009 04:50 AM
Submount, "permission denied" when writing to floppy as normal user DaneM Linux - Software 5 02-22-2006 02:05 PM
Installation of binutils....can't mkdir...../binutils-build hmonster Linux From Scratch 6 08-22-2004 04:07 AM
mkdir ../binutils-build permission denied TheBman Linux From Scratch 11 02-16-2004 08:39 AM
"permission denied" when I try to send raw data to the sound device. Travis86 Linux - Hardware 2 10-29-2003 09:08 AM

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

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