LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (http://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Cannot install Linux API Headers in LFS 7.1 chapter 6.7 (http://www.linuxquestions.org/questions/linux-from-scratch-13/cannot-install-linux-api-headers-in-lfs-7-1-chapter-6-7-a-940182/)

ffx77905 04-17-2012 03:40 AM

Cannot install Linux API Headers in LFS 7.1 chapter 6.7
 
So I'm on 6.7 of LFS 7.1 using Ubuntu 11.10 as my host system and when I was trying to install the API headers this is what I got.

Code:

root:/sources/linux-3.2.6# make mrproper
make: /bin/sh: Command not found
make: /bin/sh: Command not found
Makefile:567: /sources/linux-3.2.6/arch//Makefile: No such file or directory
make: /bin/sh: Command not found
make: /bin/sh: Command not found
make: /bin/sh: Command not found
make: /bin/sh: Command not found
make: /bin/sh: Command not found
make: /bin/sh: Command not found
make: /bin/sh: Command not found
make: /bin/sh: Command not found
make: execvp: /sources/linux-3.2.6/scripts/gcc-goto.sh: Permission denied
make: /bin/sh: Command not found
make: *** No rule to make target `/sources/linux-3.2.6/arch//Makefile'.  Stop.

I can only assume I typed something wrong previously. Thank you!

druuna 04-17-2012 03:48 AM

Hi,

Looks like /bin/sh isn't present (should be a link to /bin/bash).

Did you forget this step in chapter 5.16:
Code:

ln -vs bash /tools/bin/sh
Hope this helps.

ffx77905 04-17-2012 03:55 AM

I tried that seems I did that already:

Code:

root:/sources/linux-3.2.6# ln -vs bash /tools/bin/sh
ln: failed to create symbolic link `/tools/bin/sh': File exists

I'm totally confused

druuna 04-17-2012 04:09 AM

Hi,
Quote:

Originally Posted by ffx77905 (Post 4654748)
I tried that seems I did that already:

Code:

root:/sources/linux-3.2.6# ln -vs bash /tools/bin/sh
ln: failed to create symbolic link `/tools/bin/sh': File exists


I'm not sure what you are doing, but you cannot execute the mentioned ln -vs ... command from within the chrooted environment (the command is from chapter 5).

Chapter 5 is done as user lfs and sets up a temporary environment. (Most of) Chapter 6 is done as root user and from within a chrooted environment (this step: 6.4. Entering the Chroot Environment). Are you sure the PATH setting is correct?

ffx77905 04-17-2012 01:08 PM

Now it's telling me that the directory /tools/bin/sh does not exist. But it is there. Why can't it find it if it does exist?

druuna 04-17-2012 01:42 PM

Hi,
Quote:

Originally Posted by ffx77905 (Post 4655253)
Now it's telling me that the directory /tools/bin/sh does not exist. But it is there. Why can't it find it if it does exist?

Can I assume you are still at chapter 6.7.Linux-3.2.6 API Headers?

Did you have any problems in the previous steps leading up to chapter 6.7? Especially when you enter the chrooted environment (6.4. Entering the Chroot Environment)

If you are at chapter 6.7: What is the output of the following commands:
Code:

echo $PATH
id

Please provide more details and info next time you post.

ffx77905 04-17-2012 03:47 PM

Here is what I got:

Code:

root:/sources/linux-3.2.6# echo $PATH
/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin

And:

Code:

root:/sources/linux-3.2.6# id
uid=0(root) gid=0(root) groups=0(root)

The only problem I had was with the user you create in the book "lfs". At one point I discovered that I couldn't use "sudo" with that user and that the commands run under sudo did not work. I was getting the error:

Code:

lfs is not in sudoers file. This incident will be reported
So I just switched to the user profile I created with my Ubuntu install originally. Which makes me wonder which commands I ran earlier that did not run because of that error.

spiky0011 04-17-2012 03:56 PM

What commands were you running under sudo?? there should not be any

ffx77905 04-17-2012 04:05 PM

I'm on Ubuntu so when running certain commands like mount or even when I chroot I have to sudo. I figured it out in 6.2 when running:

Code:

mkdir -v $LFS/{dev,proc,sys}
That when trying to sudo as my lfs user that the error mentioned in my last post was stopping the command from doing anything. So i switched users. Now if there is something I missed that would keep from having to sudo constanly that would be great.

spiky0011 04-17-2012 04:15 PM

You could run sudo bash which will give you root,

ffx77905 04-17-2012 04:19 PM

Well that would have been useful when I started I Think I might just start over I need to go over that again anyway not sure what commands might not have been run. Thanks everyone for your help!!

spiky0011 04-17-2012 04:22 PM

As druuna mentioned the 1st part is done as user lfs then you chroot in at chapter 6.4

ffx77905 04-17-2012 04:38 PM

I still ge the error that lfs is not in sudoers file. It keeps me from running commands. How do i fix that.

spiky0011 04-17-2012 04:42 PM

What are you trying to do and where are you in the book? I logged in as my ubuntu user the sudo su which gives me the root user.
If you open 2 terminals you can run them seperate

ffx77905 04-17-2012 04:51 PM

Running commands like in the first part of chapter 6 as the lfs user dont work I dont have permission and it makes me use sudo which doesnt work because im not in the sudoers file. I can do anything as my normal Ubuntu user but does that hurt anything if it's not run as user lfs.


All times are GMT -5. The time now is 11:46 PM.