LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (http://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   mkdir ../binutils-build gives me "Permission Denied"!!! (http://www.linuxquestions.org/questions/linux-from-scratch-13/mkdir-binutils-build-gives-me-permission-denied-329012/)

matthewa 05-31-2005 05:12 PM

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!

channelzero 05-31-2005 05:24 PM

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/

matthewa 05-31-2005 05:31 PM

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

channelzero 05-31-2005 08:19 PM

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 ../

rblythe 06-01-2005 07:15 AM

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.

freakyg 06-01-2005 10:31 AM

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 .......

matthewa 06-02-2005 01:00 AM

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?????

freegianghu 06-02-2005 01:43 AM

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!

matthewa 06-02-2005 09:23 AM

Guys, thanks for the help. Im half way through the process now and Im loving it!

satimis 06-29-2005 04:34 AM

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

freegianghu 06-29-2005 05:11 AM

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

satimis 06-29-2005 05:17 AM

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

freegianghu 06-29-2005 05:29 AM

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


satimis 06-29-2005 05:43 AM

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

freegianghu 06-29-2005 06:36 AM

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



All times are GMT -5. The time now is 12:36 PM.