Linux From Scratch Permission Error when installing Binutils-2.27 Package

Hello, I recently decided to create a Linux Operating System from Scratch using the Linux from Scratch Guide. Everything was going great until it was time to finish installing the package Binutils-2.27. Once I entered "make install" into the terminal, I get this error:

make[1]: Entering directory '/mnt/lfs/sources/binutils-2.27/build'
/bin/bash ../mkinstalldirs /tools /tools
mkdir -p -- /tools /tools
mkdir: cannot create directory '/tools': Permission denied
mkdir: cannot create directory '/tools': Permission denied
Makefile:2501: recipe for target 'installdirs' failed
make[1]: *** [installdirs] Error 1
make[1]: Leaving directory '/mnt/lfs/sources/binutils-2.27/build'
Makefile:2255: recipe for target 'install' failed
make: *** [install] Error 2

I have tried installing the package using various Linux Distributions, added the L.F.S. user to the sudoers file, and even tried replacing the packages; but none of it got passed this error. If you tried using this guide before and passed this error, please advise on what I should do to get rid of this error.

Can you tell us where the "Linux from Scratch Guide" is. It's a bit vague for us to guess what's wrong having not seen anything of what you have done other than the issue make install

Can I presume it is not something obvious like you are not running the command as the super-user account, usually root? The problem we have is that you have a single symptom but not really any context.

Thanks, in advance,
Robin

Some questions first:

Which version of the LFS documentation are you following? V7.1 ?

Which guest Linux version are you using to compile your tool chain?

Which version of Cross GCC did you compile?

Is it Binutils Pass 1 or Pass 2 that fails?

Do note that some guest Linux distribution versions lack some essential utilities for a LFS build (e.g. Debian (Squeeze) doesn't install bison and gawk by default).

Are you building a kernel with specific features?

(To answer your question, yes, I have done this whole thing to create specific kernels for cloud use.)

1 Like

In answer to your question hicksd8, these are the respective versions for each of your questions:

version of LFS: 8.0

Guest Linux Version: 4.10.0 (on Kubuntu 17.04)

Cross GCC version: 6.3.0

Binutils Step: Pass 1

As for what my purpose is for the Operating System, I was originally planning for it to be an O.S. used by Chemists and other Scientists.

So are you planning to build a special kernel for these users?

Okay, so based on your answers I guess that you are following the book step-by-step. If that is so, then your permissions issue is most likely that (1) you are logged in as user lfs, (2) your root filesystem right now is the Kubuntu boot volume, (3) you are build on a directory named 'lfs' or a separately mounted filesystem under mountpoint 'lfs'.

Don't take the book literally (I'm afraid that is so). If you are logged in as user lfs you will not have permission to create a directory '/tools'. You should be creating '/lfs/tools' and you need to either give that directory on the command line or use a $PATH variable (which is the same thing).

The 'tools' directory should be created in your build area. That is why you have a permissions error.

---------- Post updated 05-08-17 at 04:17 PM ---------- Previous update was 04-08-17 at 07:25 PM ----------

If your target users are chemists and other scientists have you looked at Scientific Linux?

Scientific Linux

Do you need a kernel to behave differently (eg, bespoke security behaviour or fitting of a back door)? That's why we build our own kernels. If it's just scientific functionality that you want, you may be able to avoid having to build your own.