LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 03-09-2010, 03:04 PM   #1
andrea_g90
Member
 
Registered: Mar 2010
Posts: 34

Rep: Reputation: 0
How to compile linux packages as lfs user


hi, I want to know how to compile packages as lfs user instead of default host user. I'm following the 6.6 guide, but when I try to create a folder or giving './configure' as lfs, a message tells me that I haven't the permission to do that...What I wrong?? ..thanks!
 
Old 03-09-2010, 03:35 PM   #2
ProtoformX
Member
 
Registered: Feb 2004
Location: Canada
Distribution: LFS SVN
Posts: 334

Rep: Reputation: 34
Quote:
Originally Posted by andrea_g90 View Post
hi, I want to know how to compile packages as lfs user instead of default host user. I'm following the 6.6 guide, but when I try to create a folder or giving './configure' as lfs, a message tells me that I haven't the permission to do that...What I wrong?? ..thanks!
Look at the permissions of $LFS/sources and $LFS/tools do these belong to user lfs? if they don't then you skipped a step and you need to retrace your steps.
 
Old 03-09-2010, 03:37 PM   #3
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Chapter 2 and 3 should be done as user root. Chapter 4.1, 4.2 and 4.3 also as root user.

The rest of 4 and all of chapter 5 should be done as user lfs.

Are you sure you did not miss a step or made a mistake in chapters 3 and 4 (4.1, 4.2 and 4.3)??

Although this is a rather new release, these parts of the LFS book are common to the previous releases and have always worked.
 
Old 03-09-2010, 03:41 PM   #4
andrea_g90
Member
 
Registered: Mar 2010
Posts: 34

Original Poster
Rep: Reputation: 0
I have tryed two times to compile the LFS, and i found always the same problem.. however, I've set the permission of the user lfs to all the device /mount/lfs as it is explaned in the guide...
 
Old 03-09-2010, 04:44 PM   #5
andrea_g90
Member
 
Registered: Mar 2010
Posts: 34

Original Poster
Rep: Reputation: 0
Quote:
Hi,

Chapter 2 and 3 should be done as user root. Chapter 4.1, 4.2 and 4.3 also as root user.

The rest of 4 and all of chapter 5 should be done as user lfs.

Are you sure you did not miss a step or made a mistake in chapters 3 and 4 (4.1, 4.2 and 4.3)??

Although this is a rather new release, these parts of the LFS book are common to the previous releases and have always worked.
I have a question: When you say as root you mean that i have to digit before 'su' to login as root or I can simply digit sudo before the comamnd??
 
Old 03-09-2010, 06:16 PM   #6
crts
Senior Member
 
Registered: Jan 2010
Posts: 2,020

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
Quote:
Originally Posted by andrea_g90 View Post
I have a question: When you say as root you mean that i have to digit before 'su' to login as root or I can simply digit sudo before the comamnd??
I think, preceding every command with sudo is rather inconvinient. But it should work.
Still, I recommend you do it as follows:
Code:
su root
And then enter your password.

BTW, I do not really understand what you mean with digit.
 
Old 03-09-2010, 07:02 PM   #7
andrea_g90
Member
 
Registered: Mar 2010
Posts: 34

Original Poster
Rep: Reputation: 0
Quote:
BTW, I do not really understand what you mean with digit.
Sorry, I've done a wrong translation, I meant type!!
Thanks, I'll try and I let you know!
 
Old 03-09-2010, 07:09 PM   #8
andrea_g90
Member
 
Registered: Mar 2010
Posts: 34

Original Poster
Rep: Reputation: 0
Quote:
andrea@HpDuoInside:~$ su root
Password:
su: Authentication Error
andrea@HpDuoInside:~$
I think that i haven't the root user set!! Is it right??
 
Old 03-09-2010, 09:06 PM   #9
crts
Senior Member
 
Registered: Jan 2010
Posts: 2,020

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
Quote:
Originally Posted by andrea_g90 View Post
I think that i haven't the root user set!! Is it right??
Then I suspect you are using Ubuntu as host?

Just try
Code:
su
then and enter your normal user password.
 
Old 03-09-2010, 09:50 PM   #10
andrea_g90
Member
 
Registered: Mar 2010
Posts: 34

Original Poster
Rep: Reputation: 0
It doesn't work, my user password doesn't work with 'su' because i haven't got the password (I don't know how it is possible), the only way to became root is 'sudo su', but I think that it is different between the first one...
 
Old 03-10-2010, 11:36 AM   #11
crts
Senior Member
 
Registered: Jan 2010
Posts: 2,020

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
Quote:
Originally Posted by andrea_g90 View Post
It doesn't work, my user password doesn't work with 'su' because i haven't got the password (I don't know how it is possible), the only way to became root is 'sudo su', but I think that it is different between the first one...
sorry, my bad! Of course, in Ubuntu you have to do 'sudo su' and then enter your normal user password.
If you do sudo su then you do have root privileges.
However, Ubuntu is almost a sure source for trouble, when you try to build you LFS for the first time. I recommend to download the LFS liveCD and use the liveCD as host.
 
Old 03-10-2010, 11:39 AM   #12
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

use sudo su - instead of sudo su!!

The first gives you a full-blown root account, the second does not and will get you in to trouble with building LFS.
 
Old 03-14-2010, 09:50 AM   #13
andrea_g90
Member
 
Registered: Mar 2010
Posts: 34

Original Poster
Rep: Reputation: 0
thanks everybody...I'll try to make as you say!!
Quote:
However, Ubuntu is almost a sure source for trouble, when you try to build you LFS for the first time. I recommend to download the LFS liveCD and use the liveCD as host.
I would like to use ubuntu because I know very well it even if I was forced to download Ubuntu 8.04 in order to prevent trouble with gcc>4.3..
I have the last question. I have got an Intel core 2 Duo (64bit), but I want to compile a X86 LFS from a X86 ubuntu..Is it necessary that I use CLFS or LFS is good????
 
Old 03-14-2010, 11:18 AM   #14
crts
Senior Member
 
Registered: Jan 2010
Posts: 2,020

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
Quote:
Originally Posted by andrea_g90 View Post
I would like to use ubuntu because I know very well it even if I was forced to download Ubuntu 8.04 in order to prevent trouble with gcc>4.3..
The problem is not just to match the gcc version in Ubuntu, the problem is that Ubuntu probably modifies its version of gcc. When you check the version you will get somehthing like
Code:
gcc version 4.3 (ubuntu-generic)
Quote:
I have the last question. I have got an Intel core 2 Duo (64bit), but I want to compile a X86 LFS from a X86 ubuntu..Is it necessary that I use CLFS or LFS is good????
AFAIK, you do not need to cross-compile for that. Only if you were to build a x86_64 on a 32bit machine, for example.
 
Old 03-15-2010, 07:01 AM   #15
andrea_g90
Member
 
Registered: Mar 2010
Posts: 34

Original Poster
Rep: Reputation: 0
I'll try with LFS live cd...Thanks everybody for your help!!
 
  


Reply



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
user lfs: need to be in root to compile jpeters Linux From Scratch 2 03-28-2009 11:53 AM
Getting Packages of the LFS Disk Qwo Linux From Scratch 5 05-24-2006 03:01 AM
cannot login as user 'lfs' [su - lfs] mayasedai Linux From Scratch 2 07-26-2005 06:10 AM
LFS all packages? blackzone Linux From Scratch 3 08-23-2004 12:25 AM
LFS 3.2 book, but LFS packages 3.0 CragStar Linux From Scratch 2 04-07-2002 03:15 PM

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

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