LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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 04-17-2012, 02:40 AM   #1
ffx77905
LQ Newbie
 
Registered: Jul 2007
Location: Texas
Distribution: Ubuntu
Posts: 10

Rep: Reputation: 0
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!
 
Old 04-17-2012, 02:48 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371
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.
 
Old 04-17-2012, 02:55 AM   #3
ffx77905
LQ Newbie
 
Registered: Jul 2007
Location: Texas
Distribution: Ubuntu
Posts: 10

Original Poster
Rep: Reputation: 0
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
 
Old 04-17-2012, 03:09 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371
Hi,
Quote:
Originally Posted by ffx77905 View Post
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?
 
Old 04-17-2012, 12:08 PM   #5
ffx77905
LQ Newbie
 
Registered: Jul 2007
Location: Texas
Distribution: Ubuntu
Posts: 10

Original Poster
Rep: Reputation: 0
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?
 
Old 04-17-2012, 12:42 PM   #6
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371
Hi,
Quote:
Originally Posted by ffx77905 View Post
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.
 
Old 04-17-2012, 02:47 PM   #7
ffx77905
LQ Newbie
 
Registered: Jul 2007
Location: Texas
Distribution: Ubuntu
Posts: 10

Original Poster
Rep: Reputation: 0
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.
 
Old 04-17-2012, 02:56 PM   #8
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: Ubuntu 12.04/12.10/13.04/LFS/Centos6.3/Debain/PCBSD/Mageia 3
Posts: 1,614
Blog Entries: 1

Rep: Reputation: 226Reputation: 226Reputation: 226
What commands were you running under sudo?? there should not be any
 
Old 04-17-2012, 03:05 PM   #9
ffx77905
LQ Newbie
 
Registered: Jul 2007
Location: Texas
Distribution: Ubuntu
Posts: 10

Original Poster
Rep: Reputation: 0
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.
 
Old 04-17-2012, 03:15 PM   #10
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: Ubuntu 12.04/12.10/13.04/LFS/Centos6.3/Debain/PCBSD/Mageia 3
Posts: 1,614
Blog Entries: 1

Rep: Reputation: 226Reputation: 226Reputation: 226
You could run sudo bash which will give you root,
 
Old 04-17-2012, 03:19 PM   #11
ffx77905
LQ Newbie
 
Registered: Jul 2007
Location: Texas
Distribution: Ubuntu
Posts: 10

Original Poster
Rep: Reputation: 0
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!!
 
Old 04-17-2012, 03:22 PM   #12
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: Ubuntu 12.04/12.10/13.04/LFS/Centos6.3/Debain/PCBSD/Mageia 3
Posts: 1,614
Blog Entries: 1

Rep: Reputation: 226Reputation: 226Reputation: 226
As druuna mentioned the 1st part is done as user lfs then you chroot in at chapter 6.4
 
Old 04-17-2012, 03:38 PM   #13
ffx77905
LQ Newbie
 
Registered: Jul 2007
Location: Texas
Distribution: Ubuntu
Posts: 10

Original Poster
Rep: Reputation: 0
I still ge the error that lfs is not in sudoers file. It keeps me from running commands. How do i fix that.
 
Old 04-17-2012, 03:42 PM   #14
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: Ubuntu 12.04/12.10/13.04/LFS/Centos6.3/Debain/PCBSD/Mageia 3
Posts: 1,614
Blog Entries: 1

Rep: Reputation: 226Reputation: 226Reputation: 226
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
 
Old 04-17-2012, 03:51 PM   #15
ffx77905
LQ Newbie
 
Registered: Jul 2007
Location: Texas
Distribution: Ubuntu
Posts: 10

Original Poster
Rep: Reputation: 0
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.
 
  


Reply

Tags
api headers, lfs, sh


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
LFS 6.5 : Step 6.7 Installing Linux API headers : make headers_check/install error tsong99 Linux From Scratch 12 12-25-2012 04:26 PM
[SOLVED] Failed on chapter 6.7.1. Installation of Linux API Headers, make headers_check sunmoon Linux From Scratch 11 02-16-2012 12:51 PM
[SOLVED] LFS 6.6 - chap6.7 - Linux-2.6.32.8 API Headers (problems in this step) ukiuki Linux From Scratch 15 05-23-2010 07:36 AM
LFS newbie stuck in Linux API headers step 5.5 LFS book 6.3 Vxplus Linux From Scratch 2 11-10-2008 08:13 PM
Another LFS newb is stuck: Linux API headers won't install smoochie Linux From Scratch 19 06-13-2008 11:26 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration